Browse Source

志愿者确认积分代码回滚

feature/screenDataPush
songyunpeng 4 years ago
parent
commit
332e5dab5d
  1. 13
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java
  2. 18
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java
  3. 2
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml

13
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java

@ -46,8 +46,8 @@ import com.elink.esua.epdc.dto.PointsLogsDTO;
import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerPointsFormDTO;
import com.elink.esua.epdc.dto.result.BehaviorResultDto;
import com.elink.esua.epdc.modules.activity.dao.ActUserClockLogDao;
import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity;
@ -278,7 +278,7 @@ public class ActUserClockLogServiceImpl extends BaseServiceImpl<ActUserClockLogD
}
}
pointsFeignClient.addPointsLog(pointsLogsDTO);
//直接调用fegin,返回剩余积分值
/* //直接调用fegin,返回剩余积分值
EpdcVolunteerPointsFormDTO volunteerPointsFormDTO = new EpdcVolunteerPointsFormDTO();
volunteerPointsFormDTO.setVolunteerId(volunteerInfoDTOResult.getData().getId());
volunteerPointsFormDTO.setPoints(actInfoDTO.getReward());
@ -287,6 +287,15 @@ public class ActUserClockLogServiceImpl extends BaseServiceImpl<ActUserClockLogD
Result result = userInfoFeignClient.handleVolunteerPoints(volunteerPointsFormDTO);
if (!result.success()) {
throw new RenException("更新志愿者公益积分异常");
}*/
//直接调用fegin,返回剩余积分值
EpdcUserPointsFormDTO userPointsFormDTO = new EpdcUserPointsFormDTO();
userPointsFormDTO.setUserId(actUserRelationDTO.getUserId());
userPointsFormDTO.setPoints(actInfoDTO.getReward());
userPointsFormDTO.setOperationType(PointsOperationEnum.OPERATION_TYPE_ADD.getOperationType());
Result<UserDTO> result = userInfoFeignClient.handleUserPoints(userPointsFormDTO);
if (!result.success()) {
throw new RenException("更新用户积分异常");
}
return new Result();
}

18
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java

@ -44,7 +44,7 @@ import com.elink.esua.epdc.dto.PointsLogsDTO;
import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerPointsFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
import com.elink.esua.epdc.dto.result.BehaviorResultDto;
import com.elink.esua.epdc.modules.activity.dao.ActInfoDao;
@ -332,8 +332,6 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
if (!volunteerInfoDTOResult.success()) {
throw new RenException("查询志愿者信息异常");
}
//4、更新epdc_user表积分
//5、插入epdc_act_user_points_log记录
ActUserPointsLogDTO actUserPointsLogDTO = new ActUserPointsLogDTO();
actUserPointsLogDTO.setActUserId(actUserRelationDTO.getId());
@ -382,7 +380,17 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
}
}
pointsFeignClient.addPointsLog(pointsLogsDTO);
EpdcVolunteerPointsFormDTO volunteerPointsFormDTO = new EpdcVolunteerPointsFormDTO();
//4、更新epdc_user表积分
//直接调用fegin,返回剩余积分值
EpdcUserPointsFormDTO userPointsFormDTO = new EpdcUserPointsFormDTO();
userPointsFormDTO.setUserId(actUserRelationDTO.getUserId());
userPointsFormDTO.setPoints(actInfoDTO.getPunishmentPoints());
userPointsFormDTO.setOperationType(PointsOperationEnum.OPERATION_TYPE_SUBSTRACT.getOperationType());
Result<UserDTO> result = userInfoFeignClient.handleUserPoints(userPointsFormDTO);
if (!result.success()) {
throw new RenException("更新用户积分异常");
}
/*EpdcVolunteerPointsFormDTO volunteerPointsFormDTO = new EpdcVolunteerPointsFormDTO();
volunteerPointsFormDTO.setVolunteerId(volunteerInfoDTOResult.getData().getId());
volunteerPointsFormDTO.setPoints(actInfoDTO.getReward());
volunteerPointsFormDTO.setOperationType(PointsOperationEnum.OPERATION_TYPE_ADD.getOperationType());
@ -390,7 +398,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
Result result = userInfoFeignClient.handleVolunteerPoints(volunteerPointsFormDTO);
if (!result.success()) {
throw new RenException("更新志愿者公益积分异常");
}
}*/
//发送消息通知
this.sendUserInformation(actUserRelationDTO, actInfoDTO, HeartNoticeConstant.NOTICE__BUSINESS_TYPE_POINTS_SIGN_OUT);
}

2
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml

@ -33,7 +33,7 @@
FROM
epdc_points_logs l
WHERE l.DEL_FLAG = 0
AND l.USER_ID = #{userId} and BEHAVIOR_CODE != 'join_act'
AND l.USER_ID = #{userId}
ORDER BY
l.OPERATION_TIME DESC
LIMIT #{pageIndex}, #{pageSize}

Loading…
Cancel
Save