Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ed2d44d6
authored
Aug 07, 2021
by
孙喜旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
会话列表sql修改
1 parent
aa3baaab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeChatContactMsg.java
linkwe-wecom/src/main/resources/mapper/wecom/WeChatContactMsgMapper.xml
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeChatContactMsg.java
View file @
ed2d44d
...
@@ -86,4 +86,7 @@ private static final long serialVersionUID=1L;
...
@@ -86,4 +86,7 @@ private static final long serialVersionUID=1L;
@ApiModelProperty
(
value
=
"是否为外部聊天 0 外部 1 内部"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"是否为外部聊天 0 外部 1 内部"
,
hidden
=
true
)
private
Integer
isExternal
;
private
Integer
isExternal
;
@ApiModelProperty
(
"名称"
)
@TableField
(
exist
=
false
)
private
String
name
;
}
}
linkwe-wecom/src/main/resources/mapper/wecom/WeChatContactMsgMapper.xml
View file @
ed2d44d
...
@@ -110,27 +110,26 @@
...
@@ -110,27 +110,26 @@
if((case when LOCATE('wm', from_id) or LOCATE('wo', from_id) then 0 else 1 end),
if((case when LOCATE('wm', from_id) or LOCATE('wo', from_id) then 0 else 1 end),
(select wu.user_name from we_user wu where wccm.from_id = wu.user_id),
(select wu.user_name from we_user wu where wccm.from_id = wu.user_id),
(select wc.name from we_customer wc where wccm.from_id = wc.external_userid)) as name,
(select wc.name from we_customer wc where wccm.from_id = wc.external_userid)) as name,
if((case when LOCATE('wm', from_id) or LOCATE('wo', from_id) then 0 else 1 end),
if((case when LOCATE('wm', from_id) or LOCATE('wo', from_id) then 0 else 1 end),
(select wu.user_name from we_user wu where wccm.from_id = wu.user_id),
(select wu.head_image_url from we_user wu where wccm.from_id = wu.user_id),
(select wc.name from we_customer wc where wccm.from_id = wc.external_userid)) as name,
(select wc.avatar from we_customer wc where wccm.from_id = wc.external_userid)) as avatar
from we_chat_contact_msg wccm
from we_chat_contact_msg wccm
<where>
<where>
<if
test=
"fromId != null and fromId != ''"
>
<if
test=
"fromId != null and fromId != ''"
>
and
t
.fromId = #{fromId}
and
wccm
.fromId = #{fromId}
</if>
</if>
<if
test=
"action != null and action != ''"
>
<if
test=
"action != null and action != ''"
>
and
t
.action = #{action}
and
wccm
.action = #{action}
</if>
</if>
<if
test=
"contact != null and contact != ''"
>
<if
test=
"contact != null and contact != ''"
>
and
t
.contact like concat('%', #{contact}, '%')
and
wccm
.contact like concat('%', #{contact}, '%')
</if>
</if>
<if
test=
"beginTime != null and beginTime != ''"
>
<!-- 开始时间检索 -->
<if
test=
"beginTime != null and beginTime != ''"
>
<!-- 开始时间检索 -->
AND date_format(
t
.msg_time,'%y%m%d')
>
= date_format(#{beginTime},'%y%m%d')
AND date_format(
wccm
.msg_time,'%y%m%d')
>
= date_format(#{beginTime},'%y%m%d')
</if>
</if>
<if
test=
"endTime != null and endTime != ''"
>
<!-- 结束时间检索 -->
<if
test=
"endTime != null and endTime != ''"
>
<!-- 结束时间检索 -->
AND date_format(
t
.msg_time,'%y%m%d')
<
= date_format(#{endTime},'%y%m%d')
AND date_format(
wccm
.msg_time,'%y%m%d')
<
= date_format(#{endTime},'%y%m%d')
</if>
</if>
</where>
</where>
) t
) t
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment