Commit 13c1f7bc by 徐高华

排序

parent 52bd0bad
...@@ -161,13 +161,14 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -161,13 +161,14 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
@Override @Override
public ServiceResponse<List<HmLinkDTO>> listForSms(String wxEnterpriseId, String enterprieId, String linkName, public ServiceResponse<List<HmLinkDTO>> listForSms(String wxEnterpriseId, String enterprieId, String linkName,
Integer linkType) { Integer linkType) {
return this.listForSms(wxEnterpriseId, enterprieId, linkName, linkType,null); return this.listForSms(wxEnterpriseId, enterprieId, linkName, linkType, null);
} }
@Override @Override
public ServiceResponse<List<HmLinkDTO>> listForSms(String wxEnterpriseId, String enterprieId, String linkName, public ServiceResponse<List<HmLinkDTO>> listForSms(String wxEnterpriseId, String enterprieId, String linkName,
Integer linkType, List<String> creatorIdList) { Integer linkType, List<String> creatorIdList) {
List<HmLinkBO> list = this.hmLinkService.listForSms(wxEnterpriseId, enterprieId, linkName, linkType,creatorIdList); List<HmLinkBO> list = this.hmLinkService.listForSms(wxEnterpriseId, enterprieId, linkName, linkType,
creatorIdList);
List<HmLinkDTO> retList = EntityUtil.changeEntityListByJSON(HmLinkDTO.class, list); List<HmLinkDTO> retList = EntityUtil.changeEntityListByJSON(HmLinkDTO.class, list);
return ServiceResponse.success(retList); return ServiceResponse.success(retList);
} }
...@@ -201,8 +202,10 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -201,8 +202,10 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
} }
if (CollectionUtils.isNotEmpty(hmList)) { if (CollectionUtils.isNotEmpty(hmList)) {
for (HmLinkChatDTO item : hmList) { for (HmLinkChatDTO item : hmList) {
boolean flag = this.memberCondition(enterpriseId, memberId, item , link.getCreatorId() , link.getUpdateTime()); boolean flag = this.memberCondition(enterpriseId, memberId, item, link.getCreatorId(),
link.getUpdateTime());
if (flag) { if (flag) {
log.info("使用特殊群活码={}", item.getChatHmId());
hmId = item.getChatHmId(); hmId = item.getChatHmId();
break; break;
} }
...@@ -210,8 +213,8 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -210,8 +213,8 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
} }
GroupChatHmBO hm = null; GroupChatHmBO hm = null;
if (null == hmId) { if (null == hmId) {
log.info("使用其它群活码"); log.info("群活码不存在");
hmId = link.getOtherChatHmId(); return ServiceResponse.failure("9999", "群活码不存在");
} }
hm = this.groupChatHmService.getById(hmId); hm = this.groupChatHmService.getById(hmId);
if (null == hm) { if (null == hm) {
...@@ -256,7 +259,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -256,7 +259,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
// 如果是社群链接 // 如果是社群链接
if (link.getLinkType() == HmLinkTypeEnum.CHAT_HM_LINK_TYPE.getLinkType()) { if (link.getLinkType() == HmLinkTypeEnum.CHAT_HM_LINK_TYPE.getLinkType()) {
log.info("群链接,linkId={}",link.getLinkId()); log.info("群链接,linkId={}", link.getLinkId());
return this.getLinkChatHmFromWxa(wxEnterpriseId, enterpriseId, mixPhone, unionid, memberId, link, retDTO); return this.getLinkChatHmFromWxa(wxEnterpriseId, enterpriseId, mixPhone, unionid, memberId, link, retDTO);
} }
...@@ -641,7 +644,8 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -641,7 +644,8 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
return memberDataDTO; return memberDataDTO;
} }
private boolean memberCondition(String enterpriseId, String memberId, HmLinkChatDTO dto , String creatorId , Date updateTime) { private boolean memberCondition(String enterpriseId, String memberId, HmLinkChatDTO dto, String creatorId,
Date updateTime) {
boolean flag = true; boolean flag = true;
int memberType = dto.getMemberType(); int memberType = dto.getMemberType();
String limitCondition = dto.getFilterJson(); String limitCondition = dto.getFilterJson();
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
#{id,jdbcType=VARCHAR} #{id,jdbcType=VARCHAR}
</foreach> </foreach>
</if> </if>
<if test="null != searchParams"> <if test="null != searchParams and ''!=searchParams ">
and b.staff_name like '%${searchParams}%' and b.staff_name like '%${searchParams}%'
</if> </if>
<if test="status==1"> <if test="status==1">
......
...@@ -189,6 +189,7 @@ ...@@ -189,6 +189,7 @@
#{id} #{id}
</foreach> </foreach>
</if> </if>
order by create_time desc
</select> </select>
<update id="updateData"> <update id="updateData">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment