Browse Source

@的人回复

dev_shibei_match
yinzuomei 4 years ago
parent
commit
074fdaca21
  1. 17
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventReplyController.java
  2. 10
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventReplyService.java
  3. 43
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventReplyServiceImpl.java

17
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventReplyController.java

@ -93,4 +93,21 @@ public class ResiEventReplyController {
resiEventReplyService.selfReply(formDTO); resiEventReplyService.selfReply(formDTO);
return new Result(); return new Result();
} }
/**
* 艾特的人回复
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/4 15:06
*/
@PostMapping("atReply")
public Result atReply(@LoginUser TokenDto tokenDto,@RequestBody ReplyFormDTO formDTO){
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,ReplyFormDTO.AddUserShowGroup.class,ReplyFormDTO.AddUserInternalGroup.class);
resiEventReplyService.atReply(formDTO);
return new Result();
}
} }

10
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventReplyService.java

@ -60,4 +60,14 @@ public interface ResiEventReplyService extends BaseService<ResiEventReplyEntity>
* @date 2021/8/4 14:39 * @date 2021/8/4 14:39
*/ */
void selfReply(ReplyFormDTO formDTO); void selfReply(ReplyFormDTO formDTO);
/**
* 艾特的人回复
*
* @param formDTO
* @return void
* @author yinzuomei
* @date 2021/8/4 15:06
*/
void atReply(ReplyFormDTO formDTO);
} }

43
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventReplyServiceImpl.java

@ -121,7 +121,6 @@ public class ResiEventReplyServiceImpl extends BaseServiceImpl<ResiEventReplyDao
resiEventReplyEntity.setCreatedTime(new Date()); resiEventReplyEntity.setCreatedTime(new Date());
baseDao.insert(resiEventReplyEntity); baseDao.insert(resiEventReplyEntity);
// 记录操作日志 // 记录操作日志
//2、插入log日志
ResiEventOperationLogEntity reCallLog=new ResiEventOperationLogEntity(); ResiEventOperationLogEntity reCallLog=new ResiEventOperationLogEntity();
reCallLog.setCustomerId(eventEntity.getCustomerId()); reCallLog.setCustomerId(eventEntity.getCustomerId());
reCallLog.setResiEventId(eventEntity.getId()); reCallLog.setResiEventId(eventEntity.getId());
@ -178,11 +177,51 @@ public class ResiEventReplyServiceImpl extends BaseServiceImpl<ResiEventReplyDao
resiEventReplyEntity.setCreatedTime(new Date()); resiEventReplyEntity.setCreatedTime(new Date());
baseDao.insert(resiEventReplyEntity); baseDao.insert(resiEventReplyEntity);
// 记录操作日志 // 记录操作日志
//2、插入log日志
ResiEventOperationLogEntity reCallLog=new ResiEventOperationLogEntity(); ResiEventOperationLogEntity reCallLog=new ResiEventOperationLogEntity();
reCallLog.setCustomerId(eventEntity.getCustomerId()); reCallLog.setCustomerId(eventEntity.getCustomerId());
reCallLog.setResiEventId(eventEntity.getId()); reCallLog.setResiEventId(eventEntity.getId());
reCallLog.setUserId(formDTO.getUserId()); reCallLog.setUserId(formDTO.getUserId());
reCallLog.setUserIdentity(EventConstant.REPORT_USER);
reCallLog.setActionCode(ResiEventAction.REPLY.getCode());
reCallLog.setActionDesc(ResiEventAction.REPLY.getDesc());
reCallLog.setOperateTime(resiEventReplyEntity.getCreatedTime());
resiEventOperationLogDao.insert(reCallLog);
}
/**
* 艾特的人回复
*
* @param replyFormDTO
* @return void
* @author yinzuomei
* @date 2021/8/4 15:06
*/
@Override
public void atReply(ReplyFormDTO replyFormDTO) {
ResiEventEntity eventEntity=queryResiEntity(replyFormDTO.getResiEventId());
// 回复内容走审核
scanReplyContent(replyFormDTO.getContent());
// 查询当前用户的显示昵称
List<String> userIdList =new ArrayList<>();
userIdList.add(replyFormDTO.getUserId());
Result<List<UserBaseInfoResultDTO>> userResult=epmetUserOpenFeignClient.queryUserBaseInfo(userIdList);
if(!userResult.success()|| CollectionUtils.isEmpty(userResult.getData())){
throw new RenException("查询当前用户信息异常");
}
// 插入回复表
ResiEventReplyEntity resiEventReplyEntity=new ResiEventReplyEntity();
resiEventReplyEntity.setCustomerId(eventEntity.getCustomerId());
resiEventReplyEntity.setResiEventId(replyFormDTO.getResiEventId());
resiEventReplyEntity.setFromUserId(replyFormDTO.getUserId());
resiEventReplyEntity.setContent(replyFormDTO.getContent());
resiEventReplyEntity.setUserShowName("人大代表-".concat(userResult.getData().get(0).getRealName()));
resiEventReplyEntity.setCreatedTime(new Date());
baseDao.insert(resiEventReplyEntity);
// 记录操作日志
ResiEventOperationLogEntity reCallLog=new ResiEventOperationLogEntity();
reCallLog.setCustomerId(eventEntity.getCustomerId());
reCallLog.setResiEventId(eventEntity.getId());
reCallLog.setUserId(replyFormDTO.getUserId());
reCallLog.setUserIdentity(EventConstant.RESI_USER); reCallLog.setUserIdentity(EventConstant.RESI_USER);
reCallLog.setActionCode(ResiEventAction.REPLY.getCode()); reCallLog.setActionCode(ResiEventAction.REPLY.getCode());
reCallLog.setActionDesc(ResiEventAction.REPLY.getDesc()); reCallLog.setActionDesc(ResiEventAction.REPLY.getDesc());

Loading…
Cancel
Save