|
|
@ -236,7 +236,8 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public PointVerificationResultDTO verifyPoint(PointVerificationFormDTO verificationParam) { |
|
|
|
Date currentTime = new Date(); |
|
|
|
|
|
|
|
DimIdGenerator.DimIdBean dim = DimIdGenerator.getDimIdBean(new Date()); |
|
|
|
PointVerificationResultDTO result = new PointVerificationResultDTO(); |
|
|
|
ResiCommonUserIdFormDTO userId = new ResiCommonUserIdFormDTO(); |
|
|
|
userId.setUserId(verificationParam.getUserId()); |
|
|
@ -260,7 +261,7 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi |
|
|
|
|
|
|
|
String agencyId = ModuleConstant.EMPTY_STR; |
|
|
|
String operatorName = ModuleConstant.EMPTY_STR; |
|
|
|
PointVerificationStatisticalDailyEntity statistical = new PointVerificationStatisticalDailyEntity(); |
|
|
|
PointVerificationStatisticalDailyEntity statistical = new PointVerificationStatisticalDailyEntity(); |
|
|
|
if(staffResult.success() && null != staffResult.getData()){ |
|
|
|
statistical = ConvertUtils.sourceToTarget(staffResult.getData(),PointVerificationStatisticalDailyEntity.class); |
|
|
|
customerId = staffResult.getData().getCustomerId(); |
|
|
@ -270,6 +271,7 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi |
|
|
|
|
|
|
|
//1.记录积分行为日志 - 居民端
|
|
|
|
UserPointActionLogEntity action = new UserPointActionLogEntity(); |
|
|
|
action.setCustomerId(customerId); |
|
|
|
action.setCreatedBy(verificationParam.getOperatorId()); |
|
|
|
action.setUserId(verificationParam.getUserId()); |
|
|
|
action.setActionFlag(ModuleConstant.OPERATION_TYPE_MINUS); |
|
|
@ -291,7 +293,7 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi |
|
|
|
verificationLog.setAddress(verificationParam.getAddress()); |
|
|
|
pointVerificationLogDao.insert(verificationLog); |
|
|
|
//3.记录积分日统计表
|
|
|
|
DimIdGenerator.DimIdBean dim = DimIdGenerator.getDimIdBean(currentTime); |
|
|
|
|
|
|
|
UserPointStatisticalDailyEntity userStatistical = ConvertUtils.sourceToTarget(dim,UserPointStatisticalDailyEntity.class); |
|
|
|
userStatistical.setUserId(verificationParam.getUserId()); |
|
|
|
userStatistical.setActionFlag(ModuleConstant.OPERATION_TYPE_EXCHANGE); |
|
|
@ -300,6 +302,11 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi |
|
|
|
userPointStatisticalDailyService.insertOrUpdate(userStatistical); |
|
|
|
//4.记录积分核销日统计 - 政府端
|
|
|
|
statistical.setVerificatedPoint(point * NumConstant.ONE_NEG); |
|
|
|
statistical.setDateId(dim.getDateId()); |
|
|
|
statistical.setWeekId(dim.getWeekId()); |
|
|
|
statistical.setMonthId(dim.getMonthId()); |
|
|
|
statistical.setQuarterId(dim.getQuarterId()); |
|
|
|
statistical.setYearId(dim.getYearId()); |
|
|
|
pointVerificationStatisticalDailyService.insertOrUpdate(statistical); |
|
|
|
//5.更新用户总积分表
|
|
|
|
UserPointTotalEntity userPoint = new UserPointTotalEntity(); |
|
|
|