Browse Source

拦不住了吗

feature/evaluate
yinzuomei 4 years ago
parent
commit
6bee625a4e
  1. 80
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java

80
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java

@ -589,45 +589,47 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
return; return;
} }
list.forEach(grantPoint->{ list.forEach(grantPoint->{
//1.新增用户积分行为记录 if (null != grantPoint.getPoint()) {
UserPointActionLogEntity action = new UserPointActionLogEntity(); //1.新增用户积分行为记录
action.setCustomerId(grantPoint.getCustomerId()); UserPointActionLogEntity action = new UserPointActionLogEntity();
action.setPoint(grantPoint.getPoint()); action.setCustomerId(grantPoint.getCustomerId());
//完成了XXX的需求 action.setPoint(grantPoint.getPoint());
action.setEventStatement(grantPoint.getRemark()); //完成了XXX的需求
//需求分类表中一级分类的名称 action.setEventStatement(grantPoint.getRemark());
action.setEventId(EventEnum.FINISH_USER_DEMAND.getEventTag()); //需求分类表中一级分类的名称
action.setActionFlag(grantPoint.getActionFlag()); action.setEventId(EventEnum.FINISH_USER_DEMAND.getEventTag());
action.setUserId(grantPoint.getUserId()); action.setActionFlag(grantPoint.getActionFlag());
action.setCreatedBy(grantPoint.getOperatorId()); action.setUserId(grantPoint.getUserId());
action.setUpdatedBy(grantPoint.getOperatorId()); action.setCreatedBy(grantPoint.getOperatorId());
action.setSourceType(grantPoint.getSourceType()); action.setUpdatedBy(grantPoint.getOperatorId());
action.setSourceId(grantPoint.getSourceId()); action.setSourceType(grantPoint.getSourceType());
// 需求所属分类编码,对应objectId action.setSourceId(grantPoint.getSourceId());
action.setObjectId(grantPoint.getObjectId()); // 需求所属分类编码,对应objectId
//需求所属分类-一级分类名称 action.setObjectId(grantPoint.getObjectId());
action.setEventName(grantPoint.getEventName()); //需求所属分类-一级分类名称
baseDao.insert(action); action.setEventName(grantPoint.getEventName());
//2.新增/修改用户积分日统计 baseDao.insert(action);
DimIdGenerator.DimIdBean dimVal = DimIdGenerator.getDimIdBean(new Date()); //2.新增/修改用户积分日统计
UserPointStatisticalDailyEntity statistical = ConvertUtils.sourceToTarget(dimVal,UserPointStatisticalDailyEntity.class); DimIdGenerator.DimIdBean dimVal = DimIdGenerator.getDimIdBean(new Date());
statistical.setPointChange(grantPoint.getPoint()); UserPointStatisticalDailyEntity statistical = ConvertUtils.sourceToTarget(dimVal, UserPointStatisticalDailyEntity.class);
statistical.setActionFlag(grantPoint.getActionFlag()); statistical.setPointChange(grantPoint.getPoint());
statistical.setCustomerId(grantPoint.getCustomerId()); statistical.setActionFlag(grantPoint.getActionFlag());
statistical.setUserId(grantPoint.getUserId()); statistical.setCustomerId(grantPoint.getCustomerId());
statistical.setCreatedBy(grantPoint.getOperatorId()); statistical.setUserId(grantPoint.getUserId());
statistical.setUpdatedBy(grantPoint.getOperatorId()); statistical.setCreatedBy(grantPoint.getOperatorId());
userPointStatisticalDailyService.insertOrUpdate(statistical); statistical.setUpdatedBy(grantPoint.getOperatorId());
//3.新增/修改用户积分日统计 userPointStatisticalDailyService.insertOrUpdate(statistical);
UserPointTotalEntity point = new UserPointTotalEntity(); //3.新增/修改用户积分日统计
point.setCustomerId(grantPoint.getCustomerId()); UserPointTotalEntity point = new UserPointTotalEntity();
point.setUserId(grantPoint.getUserId()); point.setCustomerId(grantPoint.getCustomerId());
point.setTotalPoint(grantPoint.getPoint()); point.setUserId(grantPoint.getUserId());
point.setUsablePoint(grantPoint.getPoint()); point.setTotalPoint(grantPoint.getPoint());
point.setUsedPoint(NumConstant.ZERO); point.setUsablePoint(grantPoint.getPoint());
point.setCreatedBy(grantPoint.getOperatorId()); point.setUsedPoint(NumConstant.ZERO);
point.setUpdatedBy(grantPoint.getOperatorId()); point.setCreatedBy(grantPoint.getOperatorId());
userPointTotalService.insertOrUpdate(point); point.setUpdatedBy(grantPoint.getOperatorId());
userPointTotalService.insertOrUpdate(point);
}
}); });
} }
} }
Loading…
Cancel
Save