From ac3b50d029f93f9f023f937f701ef4b1860edc44 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 27 Dec 2021 17:03:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8D=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/constant/UserDemandConstant.java | 2 +- .../com/epmet/service/impl/IcUserDemandRecServiceImpl.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java index 4a78599455..beb25ce050 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java @@ -77,5 +77,5 @@ public interface UserDemandConstant { String DEMAND_PUBLISHER="publisher"; String DEMAND_SERVER="server"; - String GRANT_POINT_REMARK="完成了%s的需求"; + String GRANT_POINT_REMARK="完成了%s的需求:%s"; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 7d6071fdab..f8a40d37c9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -453,7 +453,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl 100 ? entity.getContent().substring(0, 99) : entity.getContent(); + finishResultDTO.setRemark(String.format(UserDemandConstant.GRANT_POINT_REMARK,entity.getDemandUserName(),content)); } //4、修改主表状态为已完成 @@ -1089,7 +1090,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl 100 ? entity.getContent().substring(0, 99) : entity.getContent(); + finishResultDTO.setRemark(String.format(UserDemandConstant.GRANT_POINT_REMARK,entity.getDemandUserName(),content)); //5、我的需求-评价:如果服务方是志愿者,通知它: 您收到来自XXX(需求人姓名)的评价,请查看。 sendVolunnterEvaluated(entity); return finishResultDTO; From 6bee625a4e2e5b98739185568a732c343626829d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 27 Dec 2021 17:08:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8B=A6=E4=B8=8D=E4=BD=8F=E4=BA=86?= =?UTF-8?q?=E5=90=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/UserPointActionLogServiceImpl.java | 80 ++++++++++--------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java index 3c1b72151a..583a0c0e61 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java +++ b/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{ - //1.新增用户积分行为记录 - UserPointActionLogEntity action = new UserPointActionLogEntity(); - action.setCustomerId(grantPoint.getCustomerId()); - action.setPoint(grantPoint.getPoint()); - //完成了XXX的需求 - action.setEventStatement(grantPoint.getRemark()); - //需求分类表中一级分类的名称 - action.setEventId(EventEnum.FINISH_USER_DEMAND.getEventTag()); - action.setActionFlag(grantPoint.getActionFlag()); - action.setUserId(grantPoint.getUserId()); - action.setCreatedBy(grantPoint.getOperatorId()); - action.setUpdatedBy(grantPoint.getOperatorId()); - action.setSourceType(grantPoint.getSourceType()); - action.setSourceId(grantPoint.getSourceId()); - // 需求所属分类编码,对应objectId - action.setObjectId(grantPoint.getObjectId()); - //需求所属分类-一级分类名称 - action.setEventName(grantPoint.getEventName()); - baseDao.insert(action); - //2.新增/修改用户积分日统计 - DimIdGenerator.DimIdBean dimVal = DimIdGenerator.getDimIdBean(new Date()); - UserPointStatisticalDailyEntity statistical = ConvertUtils.sourceToTarget(dimVal,UserPointStatisticalDailyEntity.class); - statistical.setPointChange(grantPoint.getPoint()); - statistical.setActionFlag(grantPoint.getActionFlag()); - statistical.setCustomerId(grantPoint.getCustomerId()); - statistical.setUserId(grantPoint.getUserId()); - statistical.setCreatedBy(grantPoint.getOperatorId()); - statistical.setUpdatedBy(grantPoint.getOperatorId()); - userPointStatisticalDailyService.insertOrUpdate(statistical); - //3.新增/修改用户积分日统计 - UserPointTotalEntity point = new UserPointTotalEntity(); - point.setCustomerId(grantPoint.getCustomerId()); - point.setUserId(grantPoint.getUserId()); - point.setTotalPoint(grantPoint.getPoint()); - point.setUsablePoint(grantPoint.getPoint()); - point.setUsedPoint(NumConstant.ZERO); - point.setCreatedBy(grantPoint.getOperatorId()); - point.setUpdatedBy(grantPoint.getOperatorId()); - userPointTotalService.insertOrUpdate(point); + if (null != grantPoint.getPoint()) { + //1.新增用户积分行为记录 + UserPointActionLogEntity action = new UserPointActionLogEntity(); + action.setCustomerId(grantPoint.getCustomerId()); + action.setPoint(grantPoint.getPoint()); + //完成了XXX的需求 + action.setEventStatement(grantPoint.getRemark()); + //需求分类表中一级分类的名称 + action.setEventId(EventEnum.FINISH_USER_DEMAND.getEventTag()); + action.setActionFlag(grantPoint.getActionFlag()); + action.setUserId(grantPoint.getUserId()); + action.setCreatedBy(grantPoint.getOperatorId()); + action.setUpdatedBy(grantPoint.getOperatorId()); + action.setSourceType(grantPoint.getSourceType()); + action.setSourceId(grantPoint.getSourceId()); + // 需求所属分类编码,对应objectId + action.setObjectId(grantPoint.getObjectId()); + //需求所属分类-一级分类名称 + action.setEventName(grantPoint.getEventName()); + baseDao.insert(action); + //2.新增/修改用户积分日统计 + DimIdGenerator.DimIdBean dimVal = DimIdGenerator.getDimIdBean(new Date()); + UserPointStatisticalDailyEntity statistical = ConvertUtils.sourceToTarget(dimVal, UserPointStatisticalDailyEntity.class); + statistical.setPointChange(grantPoint.getPoint()); + statistical.setActionFlag(grantPoint.getActionFlag()); + statistical.setCustomerId(grantPoint.getCustomerId()); + statistical.setUserId(grantPoint.getUserId()); + statistical.setCreatedBy(grantPoint.getOperatorId()); + statistical.setUpdatedBy(grantPoint.getOperatorId()); + userPointStatisticalDailyService.insertOrUpdate(statistical); + //3.新增/修改用户积分日统计 + UserPointTotalEntity point = new UserPointTotalEntity(); + point.setCustomerId(grantPoint.getCustomerId()); + point.setUserId(grantPoint.getUserId()); + point.setTotalPoint(grantPoint.getPoint()); + point.setUsablePoint(grantPoint.getPoint()); + point.setUsedPoint(NumConstant.ZERO); + point.setCreatedBy(grantPoint.getOperatorId()); + point.setUpdatedBy(grantPoint.getOperatorId()); + userPointTotalService.insertOrUpdate(point); + } }); } } \ No newline at end of file