|
|
@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
|
import com.epmet.commons.tools.constant.EpmetRoleKeyConstant; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
@ -34,6 +35,7 @@ import com.epmet.constant.ReadFlagConstant; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.UserResiInfoResultDTO; |
|
|
|
import com.epmet.dto.result.UserRoleResultDTO; |
|
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
|
import com.epmet.modules.constant.UserMessageConstant; |
|
|
|
import com.epmet.modules.feign.EpmetMessageFeignClient; |
|
|
|
import com.epmet.modules.feign.EpmetUserFeignClient; |
|
|
@ -122,6 +124,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
@Autowired |
|
|
|
private EpmetMessageFeignClient epmetMessageFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<ResiGroupDTO> page(Map<String, Object> params) { |
|
|
|
IPage<ResiGroupEntity> page = baseDao.selectPage( |
|
|
@ -569,6 +574,17 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
if(!epmetMessageFeignClient.saveUserMessage(userMessageFormDTO).success()){ |
|
|
|
logger.warn(String.format(ModuleConstant.FAILED_SEND_MESSAGE,String.format(UserMessageConstant.AGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName()))); |
|
|
|
} |
|
|
|
//发送微信订阅消息
|
|
|
|
WxSubscribeMessageFormDTO wxSubscribeMessageFormDTO = new WxSubscribeMessageFormDTO(); |
|
|
|
wxSubscribeMessageFormDTO.setCustomerId(resiGroupDTO.getCustomerId()); |
|
|
|
wxSubscribeMessageFormDTO.setUserId(resiGroupDTO.getCreatedBy()); |
|
|
|
wxSubscribeMessageFormDTO.setClientType(AppClientConstant.APP_RESI); |
|
|
|
wxSubscribeMessageFormDTO.setBehaviorType(UserMessageConstant.WX_APPLY_CREATE_GROUP_BEHAVIOR); |
|
|
|
wxSubscribeMessageFormDTO.setMessageContent(String.format(UserMessageConstant.AGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName())); |
|
|
|
wxSubscribeMessageFormDTO.setMessageTime(new Date()); |
|
|
|
List<WxSubscribeMessageFormDTO> msgList = new ArrayList<>(); |
|
|
|
msgList.add(wxSubscribeMessageFormDTO); |
|
|
|
epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList); |
|
|
|
//更新政府端:工作-基层治理-党员认证reddot
|
|
|
|
resiGroupRedis.subtractWorkGrassrootsPartyAuthRedDotValue(resiGroupDTO.getGridId()); |
|
|
|
return new Result(); |
|
|
@ -615,6 +631,19 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
if(!epmetMessageFeignClient.saveUserMessage(userMessageFormDTO).success()){ |
|
|
|
logger.warn(String.format(ModuleConstant.FAILED_SEND_MESSAGE,String.format(UserMessageConstant.DISAGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName(),disAgreeApplyGroupFormDTO.getRejectReason()))); |
|
|
|
} |
|
|
|
|
|
|
|
//发送微信订阅消息
|
|
|
|
WxSubscribeMessageFormDTO wxSubscribeMessageFormDTO = new WxSubscribeMessageFormDTO(); |
|
|
|
wxSubscribeMessageFormDTO.setCustomerId(resiGroupDTO.getCustomerId()); |
|
|
|
wxSubscribeMessageFormDTO.setUserId(resiGroupDTO.getCreatedBy()); |
|
|
|
wxSubscribeMessageFormDTO.setClientType(AppClientConstant.APP_RESI); |
|
|
|
wxSubscribeMessageFormDTO.setBehaviorType(UserMessageConstant.WX_APPLY_CREATE_GROUP_BEHAVIOR); |
|
|
|
wxSubscribeMessageFormDTO.setMessageContent(String.format(UserMessageConstant.AGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName())); |
|
|
|
wxSubscribeMessageFormDTO.setMessageTime(new Date()); |
|
|
|
List<WxSubscribeMessageFormDTO> msgList = new ArrayList<>(); |
|
|
|
msgList.add(wxSubscribeMessageFormDTO); |
|
|
|
epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList); |
|
|
|
|
|
|
|
//更新政府端:工作-基层治理-党员认证reddot
|
|
|
|
resiGroupRedis.subtractWorkGrassrootsPartyAuthRedDotValue(resiGroupDTO.getGridId()); |
|
|
|
return new Result(); |
|
|
|