|
|
@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.toolkit.support.SFunction; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.rocketmq.messages.GroupAchievementMQMsg; |
|
|
|
import com.epmet.commons.tools.constant.*; |
|
|
|
import com.epmet.commons.tools.enums.AchievementTypeEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
@ -40,7 +41,7 @@ import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.utils.ScanContentUtils; |
|
|
|
import com.epmet.constant.ReadFlagConstant; |
|
|
|
import com.epmet.dto.BizPointTotalDetailDTO; |
|
|
|
import com.epmet.constant.UserMessageTypeConstant; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.UserInfoResultDTO; |
|
|
|
import com.epmet.dto.result.UserResiInfoResultDTO; |
|
|
@ -49,7 +50,6 @@ import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
|
import com.epmet.group.constant.GroupConstant; |
|
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
import com.epmet.modules.constant.UserMessageConstant; |
|
|
|
import com.epmet.commons.tools.enums.AchievementTypeEnum; |
|
|
|
import com.epmet.modules.feign.EpmetMessageFeignClient; |
|
|
|
import com.epmet.modules.feign.EpmetUserFeignClient; |
|
|
|
import com.epmet.modules.feign.GovOrgFeignClient; |
|
|
@ -85,9 +85,7 @@ import com.epmet.resi.group.dto.member.result.AchievementResultDTO; |
|
|
|
import com.epmet.resi.group.dto.member.result.GroupAchievementDTO; |
|
|
|
import com.epmet.resi.group.enums.SearchScopeTypeEnum; |
|
|
|
import com.epmet.send.SendMqMsgUtil; |
|
|
|
import com.github.pagehelper.Page; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import kotlin.jvm.internal.Lambda; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
@ -528,7 +526,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
} |
|
|
|
resiGroupStatisticalService.save(resiGroupStatisticalDTO); |
|
|
|
//发送消息:创建小组
|
|
|
|
sendMsgResi2Gov(UserMessageConstant.CREATE_GROUP_APPLYING_MSG_TITLE,msg,applyCreateGroupFormDTO.getGridId(),applyCreateGroupFormDTO.getUserId(),applyCreateGroupFormDTO.getCustomerId()); |
|
|
|
sendMsgResi2Gov(UserMessageConstant.CREATE_GROUP_APPLYING_MSG_TITLE,msg,applyCreateGroupFormDTO.getGridId(),applyCreateGroupFormDTO.getUserId(),applyCreateGroupFormDTO.getCustomerId(), resiGroupEntity.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -722,6 +720,11 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
userMessageFormDTO.setGridId(resiGroupDTO.getGridId()); |
|
|
|
userMessageFormDTO.setCustomerId(resiGroupDTO.getCustomerId()); |
|
|
|
userMessageFormDTO.setMessageContent(String.format(UserMessageConstant.AGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName())); |
|
|
|
|
|
|
|
//21.09.10:记录消息类型和对应的业务id
|
|
|
|
userMessageFormDTO.setMessageType(UserMessageTypeConstant.GROUP_CREATE_GROUP_RES); |
|
|
|
userMessageFormDTO.setTargetId(agreeApplyGroupFormDTO.getGroupId()); |
|
|
|
|
|
|
|
if(!epmetMessageFeignClient.saveUserMessage(userMessageFormDTO).success()){ |
|
|
|
logger.warn(String.format(ModuleConstant.FAILED_SEND_MESSAGE,String.format(UserMessageConstant.AGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName()))); |
|
|
|
} |
|
|
@ -786,6 +789,11 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
userMessageFormDTO.setGridId(resiGroupDTO.getGridId()); |
|
|
|
userMessageFormDTO.setCustomerId(resiGroupDTO.getCustomerId()); |
|
|
|
userMessageFormDTO.setMessageContent(String.format(UserMessageConstant.DISAGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName(),disAgreeApplyGroupFormDTO.getRejectReason())); |
|
|
|
|
|
|
|
//21.09.10:记录消息类型和对应的业务id
|
|
|
|
userMessageFormDTO.setMessageType(UserMessageTypeConstant.GROUP_CREATE_GROUP_RES); |
|
|
|
userMessageFormDTO.setTargetId(disAgreeApplyGroupFormDTO.getGroupId()); |
|
|
|
|
|
|
|
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()))); |
|
|
|
} |
|
|
@ -1158,7 +1166,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
* @author wangc |
|
|
|
* @date 2020.04.29 22:49 |
|
|
|
**/ |
|
|
|
private void sendMsgResi2Gov(String title,String msg,String gridId,String userId,String customerId){ |
|
|
|
private void sendMsgResi2Gov(String title,String msg,String gridId,String userId,String customerId,String groupId){ |
|
|
|
//1.查询加入当前网格下的人员 customer_staff_grid
|
|
|
|
CommonGridIdFormDTO commonGridIdFormDTO = new CommonGridIdFormDTO(); |
|
|
|
commonGridIdFormDTO.setGridId(gridId); |
|
|
@ -1189,6 +1197,11 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
msgObj.setReadFlag(ReadFlagConstant.UN_READ); |
|
|
|
msgObj.setTitle(title); |
|
|
|
msgObj.setUserId(to); |
|
|
|
|
|
|
|
//21.09.10:记录消息类型和对应的业务id
|
|
|
|
msgObj.setMessageType(UserMessageTypeConstant.GROUP_CREATE_GROUP_APPLY); |
|
|
|
msgObj.setTargetId(groupId); |
|
|
|
|
|
|
|
msgList.add(msgObj); |
|
|
|
//微信订阅
|
|
|
|
WxSubscribeMessageFormDTO subscribeDTO = new WxSubscribeMessageFormDTO(); |
|
|
|