Commit 886fa7ff by 水库浪子

修改欢迎语模板BUG;修改客户群搜索BUG;修改客户搜索BUG

1 parent 40dd0bf1
......@@ -49,4 +49,18 @@ public class WeGroup {
@TableField(exist = false)
private String groupLeaderName;
@TableField(exist = false)
private String groupLeader;
@TableField(exist = false)
@JsonFormat( pattern = "yyyy-MM-dd")
private String beginTime;
@TableField(exist = false)
@JsonFormat(pattern = "yyyy-MM-dd")
private String endTime;
}
......@@ -68,18 +68,24 @@ public class WeMsgTlpServiceImpl implements IWeMsgTlpService
int returnCode = weMsgTlpMapper.insertWeMsgTlp(weMsgTlp);
if(returnCode>0){
List<WeMsgTlpScope> weMsgTlpScopess = weMsgTlp.getWeMsgTlpScopes();
if(CollectionUtil.isNotEmpty(weMsgTlpScopess)){
List<WeMsgTlpScope> weMsgTlpScopes=weMsgTlp.getWeMsgTlpScopes().stream().filter(c -> c.getUseUserId() != null).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(weMsgTlpScopes)){
List<WeMsgTlpScope> weMsgTlpScopes=weMsgTlp.getWeMsgTlpScopes().stream().filter(c -> c.getUseUserId() != null).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(weMsgTlpScopes)){
weMsgTlpScopes.forEach(v->{
v.setMsgTlpId(weMsgTlp.getId());
v.setId(SnowFlakeUtil.nextId());
});
weMsgTlpScopes.forEach(v->{
v.setMsgTlpId(weMsgTlp.getId());
v.setId(SnowFlakeUtil.nextId());
});
iWeMsgTlpScopeService.batchInsetWeMsgTlpScope(weMsgTlpScopes);
}
iWeMsgTlpScopeService.batchInsetWeMsgTlpScope(weMsgTlpScopes);
}
}
return returnCode;
}
......
......@@ -19,7 +19,14 @@
LEFT JOIN we_user wu ON wg.`owner`=wu.user_id
<where>
<if test="groupName != null and groupName != ''"> and wg.group_name like concat('%', #{groupName}, '%')</if>
<if test="owner != null and owner != ''"> and owner = #{owner}</if>
<if test="groupLeader != null and groupLeader != ''"> and wu.user_name like concat('%', #{groupLeader}, '%')</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
AND date_format(wg.create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
AND date_format(wg.create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if>
</where>
</select>
......
......@@ -16,18 +16,24 @@
(
SELECT wu.user_name FROM we_user wu
WHERE wu.user_id=wgm.user_id
<if test="memberName != null and memberName != ''">
AND wu.user_name like concat('%', #{memberName}, '%')
</if>
)
WHEN wgm.type = 2 THEN
(
SELECT wc.name FROM we_customer wc
WHERE wc.external_userid=wgm.user_id
<if test="memberName != null and memberName != ''">
AND wc.name like concat('%', #{memberName}, '%')
</if>
)
END memberName
FROM
we_group_member wgm
<where>
<if test="chatId != null "> and wgm.chat_id = #{chatId}</if>
<if test="memberName != null and memberName != ''"> and HAVING wc.`name` like concat('%', #{memberName}, '%')</if>
<if test="memberName != null and memberName != ''">HAVING memberName IS NOT NULL</if>
</where>
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!