Browse Source

手动调整积分-通知内容修改

feature/syp_points
songyunpeng 6 years ago
parent
commit
03c9e7d3b0
  1. 9
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java

9
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java

@ -196,29 +196,30 @@ public class PointsLogsServiceImpl extends BaseServiceImpl<PointsLogsDao, Points
pointsLogsEntity.setBehaviorCode(formDto.getBehaviorCode());
this.insert(pointsLogsEntity);
//给用户发送消息通知
this.issueSmsNotification(pointsLogsEntity);
this.issueSmsNotification(pointsLogsEntity,formDto);
return new Result();
}
/**
* @param pointsLogsEntity
* @param formDto
* @return void
* @Author yinzuomei
* @Description 调整积分完成后-给用户发送消息通知
* @Date 2020/2/7 22:12
**/
private void issueSmsNotification(PointsLogsEntity pointsLogsEntity) {
private void issueSmsNotification(PointsLogsEntity pointsLogsEntity, EpdcAdjustVolunteerPointsDTO formDto) {
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO();
informationFormDTO.setUserId(pointsLogsEntity.getUserId());
String content = "";
//积分操作类型(0-减积分,1-加积分)
if (PointsOperationEnum.OPERATION_TYPE_ADD.getOperationType().equals(pointsLogsEntity.getOperationType())) {
informationFormDTO.setTitle(PointsNoticeConstant.ADD_POINTS_NOTICE);
content = PointsNoticeConstant.ADD_POINTS + pointsLogsEntity.getPoints() + PointsNoticeConstant.REASON + pointsLogsEntity.getOperationDesc();
content = PointsNoticeConstant.ADD_POINTS + pointsLogsEntity.getPoints() + PointsNoticeConstant.REASON + formDto.getAdjustReason();
} else if (PointsOperationEnum.OPERATION_TYPE_SUBSTRACT.getOperationType().equals(pointsLogsEntity.getOperationType())) {
informationFormDTO.setTitle(PointsNoticeConstant.SUBTRACT_POINTS_NOTICE);
content = PointsNoticeConstant.SUBTRACT_POINTS + pointsLogsEntity.getPoints() + PointsNoticeConstant.REASON + pointsLogsEntity.getOperationDesc();
content = PointsNoticeConstant.SUBTRACT_POINTS + pointsLogsEntity.getPoints() + PointsNoticeConstant.REASON + formDto.getAdjustReason();
}
informationFormDTO.setContent(content);
informationFormDTO.setType(PointsNoticeConstant.NOTICE_TYPE_INTERACTIVE_NOTICE);

Loading…
Cancel
Save