diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPartIssuesFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPartIssuesFormDTO.java
new file mode 100644
index 0000000000..249e3e62a2
--- /dev/null
+++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPartIssuesFormDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/11/10 10:04 上午
+ */
+@Data
+public class MyPartIssuesFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 265005061427415836L;
+
+ public interface MyPartIssues{}
+
+ /**
+ * 用户ID
+ */
+ @NotBlank(message = "userId不能为空",groups = MyPartIssues.class)
+ private String userId;
+
+}
diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPartIssuesResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPartIssuesResultDTO.java
new file mode 100644
index 0000000000..0f1b6b7d8b
--- /dev/null
+++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPartIssuesResultDTO.java
@@ -0,0 +1,37 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/11/10 9:50 上午
+ */
+@Data
+public class MyPartIssuesResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 2081387920547808112L;
+
+ private String issueId;
+
+ /**
+ * 建议
+ */
+ private String suggestion;
+
+ /**
+ * 议题标题
+ */
+ private String issueTitle;
+
+ /**
+ * 转议题时间
+ */
+ private Long shiftIssueTime;
+
+ /**
+ * 发表网格名称
+ */
+ private String topicReleaseGridName;
+}
diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml
index 5dc7ab7246..e86622bf19 100644
--- a/epmet-module/resi-mine/resi-mine-server/pom.xml
+++ b/epmet-module/resi-mine/resi-mine-server/pom.xml
@@ -96,6 +96,11 @@
2.0.0
compile
+
+ com.epmet
+ gov-issue-client
+ 2.0.0
+
diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/controller/IssueController.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/controller/IssueController.java
new file mode 100644
index 0000000000..5723725dfa
--- /dev/null
+++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/controller/IssueController.java
@@ -0,0 +1,37 @@
+package com.epmet.modules.person.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.dto.result.MyPartIssuesResultDTO;
+import com.epmet.modules.person.service.IssueService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/11/10 9:37 上午
+ */
+@RestController
+@RequestMapping("issue")
+public class IssueController {
+
+ @Autowired
+ private IssueService issueService;
+
+ /**
+ * @Description 个人中心-我参与的议题列表
+ * @Param tokenDto
+ * @author zxc
+ * @date 2020/11/10 10:01 上午
+ */
+ @PostMapping("my-part-issues")
+ public Result> myPartIssues(@LoginUser TokenDto tokenDto){
+ return new Result>().ok(issueService.myPartIssues(tokenDto));
+ }
+
+}
diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/IssueService.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/IssueService.java
new file mode 100644
index 0000000000..4d2758c707
--- /dev/null
+++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/IssueService.java
@@ -0,0 +1,22 @@
+package com.epmet.modules.person.service;
+
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.dto.result.MyPartIssuesResultDTO;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/11/10 9:59 上午
+ */
+public interface IssueService {
+
+ /**
+ * @Description 个人中心-我参与的议题列表
+ * @Param tokenDto
+ * @author zxc
+ * @date 2020/11/10 10:01 上午
+ */
+ List myPartIssues(TokenDto tokenDto);
+
+}
diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java
new file mode 100644
index 0000000000..386556e96e
--- /dev/null
+++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java
@@ -0,0 +1,32 @@
+package com.epmet.modules.person.service.impl;
+
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.dto.form.MyPartIssuesFormDTO;
+import com.epmet.dto.result.MyPartIssuesResultDTO;
+import com.epmet.modules.person.service.IssueService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/11/10 10:00 上午
+ */
+@Service
+@Slf4j
+public class IssueServiceImpl implements IssueService {
+
+ /**
+ * @Description 个人中心-我参与的议题列表
+ * @Param tokenDto
+ * @author zxc
+ * @date 2020/11/10 10:01 上午
+ */
+ @Override
+ public List myPartIssues(TokenDto tokenDto) {
+ MyPartIssuesFormDTO form = new MyPartIssuesFormDTO();
+ form.setUserId(tokenDto.getUserId());
+ return null;
+ }
+}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeAuditFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeAuditFormDTO.java
index f7d3deac7d..c3748fe49f 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeAuditFormDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeAuditFormDTO.java
@@ -3,6 +3,7 @@ package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
+import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@@ -14,7 +15,9 @@ import java.io.Serializable;
@Data
public class BadgeAuditFormDTO implements Serializable {
private static final long serialVersionUID = 2209535364555130964L;
+ @NotBlank(message = "申请记录Id不能为空")
private String recordId;
+ @NotBlank(message = "审核结果不能为空")
private String auditStatus;
private String auditRemark;
}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeFormDTO.java
index 5a40b86f0f..66384607cf 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeFormDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeFormDTO.java
@@ -2,6 +2,7 @@ package com.epmet.dto.form;
import lombok.Data;
+import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@@ -12,6 +13,9 @@ import java.io.Serializable;
@Data
public class BadgeFormDTO implements Serializable {
private static final long serialVersionUID = 9156247659994638103L;
+ public interface ManageGroup {}
+ public interface AuditGroup {}
+ @NotBlank(message = "徽章id不能为空", groups = {ManageGroup.class})
private String badgeId;
/**
* 页码
@@ -24,5 +28,6 @@ public class BadgeFormDTO implements Serializable {
/**
* 网格Id
*/
+ @NotBlank(message = "网格id不能为空", groups = {AuditGroup.class})
private String gridId;
}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditBadgeFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditBadgeFormDTO.java
index e11d2e107c..7b8cc1fb4a 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditBadgeFormDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditBadgeFormDTO.java
@@ -16,6 +16,7 @@ import java.util.List;
@Data
public class EditBadgeFormDTO implements Serializable {
private static final long serialVersionUID = 1578890423002035200L;
+ @NotBlank(message = "徽章ID不能为空")
private String badgeId;
/**
* 徽章名称
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditRecordResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditRecordResultDTO.java
index 363441ad46..c37b11dcd0 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditRecordResultDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditRecordResultDTO.java
@@ -40,4 +40,9 @@ public class BadgeAuditRecordResultDTO implements Serializable {
* 用户名
*/
private String auditStatus;
+
+ /**
+ * 用户头像
+ */
+ private String userAvatar;
}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditingResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditingResultDTO.java
index bbf6381d82..8d57267eac 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditingResultDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditingResultDTO.java
@@ -40,4 +40,9 @@ public class BadgeAuditingResultDTO implements Serializable {
*/
private Long createTime;
+ /**
+ * 用户头像
+ */
+ private String userAvatar;
+
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java
index c284939571..faaf9c3d04 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java
@@ -68,6 +68,7 @@ public class BadgeController {
*/
@PostMapping("detail")
public Result detail(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, BadgeFormDTO.ManageGroup.class);
BadgeDetailResultDTO result = badgeService.detail(tokenDto, formDTO);
return new Result().ok(result);
}
@@ -97,6 +98,7 @@ public class BadgeController {
*/
@PostMapping("delete")
public Result delete(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, BadgeFormDTO.ManageGroup.class);
badgeService.deleteBadge(tokenDto, formDTO);
return new Result();
}
@@ -116,6 +118,7 @@ public class BadgeController {
*/
@PostMapping("auditinglist")
public Result> auditingList(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, BadgeFormDTO.AuditGroup.class);
List result = badgeService.auditingList(tokenDto, formDTO);
return new Result>().ok(result);
}
@@ -130,6 +133,7 @@ public class BadgeController {
*/
@PostMapping("auditrecord")
public Result> auditRecord(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, BadgeFormDTO.AuditGroup.class);
List result = badgeService.auditRecord(tokenDto, formDTO);
return new Result>().ok(result);
}
@@ -144,21 +148,8 @@ public class BadgeController {
*/
@PostMapping("audit")
public Result audit(@LoginUser TokenDto tokenDto, @RequestBody BadgeAuditFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO);
badgeService.audit(tokenDto, formDTO);
return new Result();
}
-
- @Autowired
- private UserBadgeRedis redis;
- @PostMapping("compensation-mechanism")
- public Result compensationMechanism(@RequestParam("userId")String userId,@RequestParam("customerId")String customerId,@RequestParam("b1")String b1,
- @RequestParam("b2")String b2){
- redis.pushOrRemoveUserBadge4List(userId,b1,customerId);
- redis.pushOrRemoveUserBadge4List(userId,b1,customerId);
- redis.pushOrRemoveUserBadge4List(userId,b1,customerId);
- redis.pushOrRemoveUserBadge4List(userId,b2,customerId);
- redis.batchClearUserBadgeCache(customerId);
- redis.obtainUserBadge2List(userId,customerId);
- return new Result();
- }
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBadgeRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBadgeRedis.java
index 759ae00192..72a912f393 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBadgeRedis.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBadgeRedis.java
@@ -18,12 +18,11 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.connection.RedisConnection;
-import org.springframework.data.redis.connection.StringRedisConnection;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.lang.Nullable;
import org.springframework.stereotype.Component;
-import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.Set;
@@ -189,5 +188,19 @@ public class UserBadgeRedis {
}
+ public List pipelinedReturnKeys(String customerId){
+ List list = redisTemplate.executePipelined(new RedisCallback>() {
+ @Nullable
+ @Override
+ public List doInRedis(RedisConnection connection) throws DataAccessException {
+ connection.openPipeline();
+ Set keys = connection.keys(redisTemplate.getKeySerializer().serialize(UserRedisKeys.getResiUserBadgeKey(customerId, null)));
+ return null;
+ }
+ },redisTemplate.getKeySerializer());
+
+ return list;
+ }
+
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java
index b66faf5095..b7f21c0845 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java
@@ -17,6 +17,7 @@
package com.epmet.service.impl;
+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;
@@ -25,9 +26,11 @@ import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
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.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.BadgeConstant;
import com.epmet.constant.BadgeMessageConstant;
import com.epmet.constant.UserConstant;
@@ -42,9 +45,11 @@ import com.epmet.dto.result.BadgeDetailResultDTO;
import com.epmet.dto.result.BadgeListResultDTO;
import com.epmet.entity.BadgeCertificationConfigEntity;
import com.epmet.entity.BadgeEntity;
+import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.MessageFeignClient;
import com.epmet.redis.UserBadgeRedis;
import com.epmet.service.*;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -60,6 +65,7 @@ import java.util.*;
* @since v1.0.0 2020-11-03
*/
@Service
+@Slf4j
public class BadgeServiceImpl extends BaseServiceImpl implements BadgeService {
@Autowired
@@ -74,6 +80,9 @@ public class BadgeServiceImpl extends BaseServiceImpl imp
private ResiUserBadgeService resiUserBadgeService;
@Autowired
private MessageFeignClient messageFeignClient;
+ @Autowired
+ private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
+
@Override
@@ -322,6 +331,11 @@ public class BadgeServiceImpl extends BaseServiceImpl imp
*/
@Override
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());
BadgeDetailResultDTO detail = baseDao.selectDetail(dto.getCustomerId(), dto.getBadgeId());
dto.setAuditStatus(formDTO.getAuditStatus());
@@ -329,48 +343,71 @@ public class BadgeServiceImpl extends BaseServiceImpl imp
dto.setStaffId(tokenDto.getUserId());
dto.setIsLast(BadgeConstant.YES);
dto.setAuditTime(new Date());
-
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 msgList = new ArrayList<>();
+ List wxmpMsgList = new ArrayList<>();
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
- OpenedOrClosedFormDTO openedOrClosedFormDTO = new OpenedOrClosedFormDTO();
- openedOrClosedFormDTO.setCustomerId(dto.getCustomerId());
- openedOrClosedFormDTO.setUserId(dto.getUserId());
- openedOrClosedFormDTO.setBadgeId(dto.getBadgeId());
- userBadgeService.openedOrClosed(openedOrClosedFormDTO);
+ badgeRedis.pushOrRemoveUserBadge4List(dto.getUserId(),dto.getBadgeId(),dto.getCustomerId());
//通知
+ String msg = String.format(BadgeMessageConstant.APPROVED_MSG, detail.getBadgeName());
UserMessageFormDTO messageFormDTO = new UserMessageFormDTO();
messageFormDTO.setCustomerId(dto.getCustomerId());
messageFormDTO.setApp(UserConstant.APP_RESI);
messageFormDTO.setGridId(dto.getGridId());
messageFormDTO.setUserId(dto.getUserId());
messageFormDTO.setTitle(BadgeMessageConstant.TITLE);
- messageFormDTO.setMessageContent(String.format(BadgeMessageConstant.APPROVED_MSG, detail.getBadgeName()));
+ messageFormDTO.setMessageContent(msg);
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 {
//通知
+ String msg = String.format(BadgeMessageConstant.REJECTED_MSG, detail.getBadgeName(), formDTO.getAuditRemark());
UserMessageFormDTO messageFormDTO = new UserMessageFormDTO();
messageFormDTO.setCustomerId(dto.getCustomerId());
messageFormDTO.setApp(UserConstant.APP_RESI);
messageFormDTO.setGridId(dto.getGridId());
messageFormDTO.setUserId(dto.getUserId());
messageFormDTO.setTitle(BadgeMessageConstant.TITLE);
- messageFormDTO.setMessageContent(String.format(BadgeMessageConstant.REJECTED_MSG, detail.getBadgeName(), formDTO.getAuditRemark()));
+ messageFormDTO.setMessageContent(msg);
messageFormDTO.setReadFlag(Constant.UNREAD);
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);
+ log.info("徽章消息,开始推送微信订阅消息");
+ Result result = epmetMessageOpenFeignClient.sendWxSubscribeMessage(wxmpMsgList);
+ if (!result.success()) {
+ log.error("徽章消息,发送微信订阅消息失败" + JSON.toJSONString(result));
+ }
}
@Override
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
index 74a1ddaddd..531b6fea47 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
@@ -268,6 +268,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
if (CollectionUtils.isEmpty(userBadgeListResultDTOS)){
throw new RenException("客户徽章缓存初始化未查到数据");
}
+ userBadgeRedis.batchClearUserBadgeCache(customerId);
userBadgeRedis.setCustomerBadge(userBadgeListResultDTOS, customerId);
}
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml
index e482f95095..4c9240dc29 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml
@@ -147,6 +147,7 @@
badge.BADGE_ICON,
ubcr.USER_ID,
ubi.REAL_NAME AS "userName",
+ ubi.HEAD_IMG_URL AS userAvatar,
unix_timestamp(ubcr.CREATED_TIME) AS "createTime"
FROM
user_badge_certificate_record ubcr
@@ -181,6 +182,7 @@
ubcr.USER_ID,
ubcr.AUDIT_STATUS,
ubi.REAL_NAME AS "userName",
+ ubi.HEAD_IMG_URL AS userAvatar,
unix_timestamp(ubcr.CREATED_TIME) AS "createTime"
FROM
user_badge_certificate_record ubcr