| 
						
						
							
								
							
						
						
					 | 
					@ -17,6 +17,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					package com.epmet.service.impl; | 
					 | 
					 | 
					package com.epmet.service.impl; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.alibaba.fastjson.JSON; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
					 | 
					 | 
					import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.baomidou.mybatisplus.core.metadata.IPage; | 
					 | 
					 | 
					import com.baomidou.mybatisplus.core.metadata.IPage; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
					 | 
					 | 
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -25,9 +26,11 @@ import com.epmet.commons.tools.constant.FieldConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.ValidateException; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.page.PageData; | 
					 | 
					 | 
					import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.TokenDto; | 
					 | 
					 | 
					import com.epmet.commons.tools.security.dto.TokenDto; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.constant.BadgeConstant; | 
					 | 
					 | 
					import com.epmet.constant.BadgeConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.constant.BadgeMessageConstant; | 
					 | 
					 | 
					import com.epmet.constant.BadgeMessageConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.constant.UserConstant; | 
					 | 
					 | 
					import com.epmet.constant.UserConstant; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -42,9 +45,11 @@ import com.epmet.dto.result.BadgeDetailResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.result.BadgeListResultDTO; | 
					 | 
					 | 
					import com.epmet.dto.result.BadgeListResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.BadgeCertificationConfigEntity; | 
					 | 
					 | 
					import com.epmet.entity.BadgeCertificationConfigEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.BadgeEntity; | 
					 | 
					 | 
					import com.epmet.entity.BadgeEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.feign.EpmetMessageOpenFeignClient; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.feign.MessageFeignClient; | 
					 | 
					 | 
					import com.epmet.feign.MessageFeignClient; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.redis.UserBadgeRedis; | 
					 | 
					 | 
					import com.epmet.redis.UserBadgeRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.*; | 
					 | 
					 | 
					import com.epmet.service.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import lombok.extern.slf4j.Slf4j; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.collections4.CollectionUtils; | 
					 | 
					 | 
					import org.apache.commons.collections4.CollectionUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -60,6 +65,7 @@ import java.util.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 * @since v1.0.0 2020-11-03 | 
					 | 
					 | 
					 * @since v1.0.0 2020-11-03 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 */ | 
					 | 
					 | 
					 */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					@Service | 
					 | 
					 | 
					@Service | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					@Slf4j | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					public class BadgeServiceImpl extends BaseServiceImpl<BadgeDao, BadgeEntity> implements BadgeService { | 
					 | 
					 | 
					public class BadgeServiceImpl extends BaseServiceImpl<BadgeDao, BadgeEntity> implements BadgeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -74,6 +80,9 @@ public class BadgeServiceImpl extends BaseServiceImpl<BadgeDao, BadgeEntity> imp | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private ResiUserBadgeService resiUserBadgeService; | 
					 | 
					 | 
					    private ResiUserBadgeService resiUserBadgeService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private MessageFeignClient messageFeignClient; | 
					 | 
					 | 
					    private MessageFeignClient messageFeignClient; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -322,6 +331,11 @@ public class BadgeServiceImpl extends BaseServiceImpl<BadgeDao, BadgeEntity> imp | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void audit(TokenDto tokenDto, BadgeAuditFormDTO formDTO) { | 
					 | 
					 | 
					    public void audit(TokenDto tokenDto, BadgeAuditFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(BadgeConstant.REJECTED.equals(formDTO.getAuditStatus())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (StringUtils.isEmpty(formDTO.getAuditRemark())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                throw new ValidateException(EpmetErrorCode.CUSTOMER_VALIDATE_ERROR.getCode(), "驳回理由不能为空"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        UserBadgeCertificateRecordDTO dto  = userBadgeCertificateRecordService.get(formDTO.getRecordId()); | 
					 | 
					 | 
					        UserBadgeCertificateRecordDTO dto  = userBadgeCertificateRecordService.get(formDTO.getRecordId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        BadgeDetailResultDTO detail = baseDao.selectDetail(dto.getCustomerId(), dto.getBadgeId()); | 
					 | 
					 | 
					        BadgeDetailResultDTO detail = baseDao.selectDetail(dto.getCustomerId(), dto.getBadgeId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        dto.setAuditStatus(formDTO.getAuditStatus()); | 
					 | 
					 | 
					        dto.setAuditStatus(formDTO.getAuditStatus()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -329,48 +343,71 @@ public class BadgeServiceImpl extends BaseServiceImpl<BadgeDao, BadgeEntity> imp | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        dto.setStaffId(tokenDto.getUserId()); | 
					 | 
					 | 
					        dto.setStaffId(tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        dto.setIsLast(BadgeConstant.YES); | 
					 | 
					 | 
					        dto.setIsLast(BadgeConstant.YES); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        dto.setAuditTime(new Date()); | 
					 | 
					 | 
					        dto.setAuditTime(new Date()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        userBadgeCertificateRecordService.update(dto); | 
					 | 
					 | 
					        userBadgeCertificateRecordService.update(dto); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ResiUserBadgeDTO resiUserBadgeDTO = new ResiUserBadgeDTO(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resiUserBadgeDTO.setCustomerId(dto.getCustomerId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resiUserBadgeDTO.setBadgeId(dto.getBadgeId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resiUserBadgeDTO.setGridId(dto.getGridId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resiUserBadgeDTO.setUserId(dto.getUserId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resiUserBadgeDTO.setIsOpened(NumConstant.ZERO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resiUserBadgeDTO.setCertificationAutidStatus(dto.getAuditStatus()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resiUserBadgeService.save(resiUserBadgeDTO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<UserMessageFormDTO> msgList = new ArrayList<>(); | 
					 | 
					 | 
					        List<UserMessageFormDTO> msgList = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							List<WxSubscribeMessageFormDTO> wxmpMsgList = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(BadgeConstant.APPROVED.equals(formDTO.getAuditStatus())) { | 
					 | 
					 | 
					        if(BadgeConstant.APPROVED.equals(formDTO.getAuditStatus())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ResiUserBadgeDTO resiUserBadgeDTO = new ResiUserBadgeDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resiUserBadgeDTO.setCustomerId(dto.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resiUserBadgeDTO.setBadgeId(dto.getBadgeId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resiUserBadgeDTO.setGridId(dto.getGridId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resiUserBadgeDTO.setUserId(dto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resiUserBadgeDTO.setIsOpened(NumConstant.ONE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resiUserBadgeDTO.setCertificationAutidStatus(dto.getAuditStatus()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resiUserBadgeService.save(resiUserBadgeDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //更新Redis
 | 
					 | 
					 | 
					            //更新Redis
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            OpenedOrClosedFormDTO openedOrClosedFormDTO = new OpenedOrClosedFormDTO(); | 
					 | 
					 | 
					            badgeRedis.pushOrRemoveUserBadge4List(dto.getUserId(),dto.getBadgeId(),dto.getCustomerId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					            openedOrClosedFormDTO.setCustomerId(dto.getCustomerId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            openedOrClosedFormDTO.setUserId(dto.getUserId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            openedOrClosedFormDTO.setBadgeId(dto.getBadgeId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            userBadgeService.openedOrClosed(openedOrClosedFormDTO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            //通知
 | 
					 | 
					 | 
					            //通知
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								String msg = String.format(BadgeMessageConstant.APPROVED_MSG, detail.getBadgeName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); | 
					 | 
					 | 
					            UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setCustomerId(dto.getCustomerId()); | 
					 | 
					 | 
					            messageFormDTO.setCustomerId(dto.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setApp(UserConstant.APP_RESI); | 
					 | 
					 | 
					            messageFormDTO.setApp(UserConstant.APP_RESI); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setGridId(dto.getGridId()); | 
					 | 
					 | 
					            messageFormDTO.setGridId(dto.getGridId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setUserId(dto.getUserId()); | 
					 | 
					 | 
					            messageFormDTO.setUserId(dto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setTitle(BadgeMessageConstant.TITLE); | 
					 | 
					 | 
					            messageFormDTO.setTitle(BadgeMessageConstant.TITLE); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            messageFormDTO.setMessageContent(String.format(BadgeMessageConstant.APPROVED_MSG, detail.getBadgeName())); | 
					 | 
					 | 
					            messageFormDTO.setMessageContent(msg); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setReadFlag(Constant.UNREAD); | 
					 | 
					 | 
					            messageFormDTO.setReadFlag(Constant.UNREAD); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            //微信消息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								WxSubscribeMessageFormDTO wxmp = new WxSubscribeMessageFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setCustomerId(dto.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setClientType(UserConstant.APP_RESI); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setUserId(dto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setBehaviorType("徽章消息"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setMessageContent(msg); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setMessageTime(new Date()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setGridId(dto.getGridId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmpMsgList.add(wxmp); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } else { | 
					 | 
					 | 
					        } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //通知
 | 
					 | 
					 | 
					            //通知
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								String msg = String.format(BadgeMessageConstant.REJECTED_MSG, detail.getBadgeName(), formDTO.getAuditRemark()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); | 
					 | 
					 | 
					            UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setCustomerId(dto.getCustomerId()); | 
					 | 
					 | 
					            messageFormDTO.setCustomerId(dto.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setApp(UserConstant.APP_RESI); | 
					 | 
					 | 
					            messageFormDTO.setApp(UserConstant.APP_RESI); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setGridId(dto.getGridId()); | 
					 | 
					 | 
					            messageFormDTO.setGridId(dto.getGridId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setUserId(dto.getUserId()); | 
					 | 
					 | 
					            messageFormDTO.setUserId(dto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setTitle(BadgeMessageConstant.TITLE); | 
					 | 
					 | 
					            messageFormDTO.setTitle(BadgeMessageConstant.TITLE); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            messageFormDTO.setMessageContent(String.format(BadgeMessageConstant.REJECTED_MSG, detail.getBadgeName(), formDTO.getAuditRemark())); | 
					 | 
					 | 
					            messageFormDTO.setMessageContent(msg); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            messageFormDTO.setReadFlag(Constant.UNREAD); | 
					 | 
					 | 
					            messageFormDTO.setReadFlag(Constant.UNREAD); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            msgList.add(messageFormDTO); | 
					 | 
					 | 
					            msgList.add(messageFormDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								//微信消息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								WxSubscribeMessageFormDTO wxmp = new WxSubscribeMessageFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setCustomerId(dto.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setClientType(UserConstant.APP_RESI); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setUserId(dto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setBehaviorType("徽章消息"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setMessageContent(msg); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setMessageTime(new Date()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmp.setGridId(dto.getGridId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								wxmpMsgList.add(wxmp); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        messageFeignClient.saveUserMessageList(msgList); | 
					 | 
					 | 
					        messageFeignClient.saveUserMessageList(msgList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							log.info("徽章消息,开始推送微信订阅消息"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							Result result = epmetMessageOpenFeignClient.sendWxSubscribeMessage(wxmpMsgList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							if (!result.success()) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								log.error("徽章消息,发送微信订阅消息失败" + JSON.toJSONString(result)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |