From 02756dc1eaa1ec1b732b1e640645aa324cf11234 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 21 Jun 2021 09:02:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=97=A5=E5=BF=97message?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PointRuleServiceImpl.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java index cf139df803..d69d029d18 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java @@ -182,8 +182,11 @@ public class PointRuleServiceImpl extends BaseServiceImpl messages = disposeLog(formDTO, entityDB); - // TODO add + String messages = disposeLog(formDTO, entityDB); + if (StringUtils.isNotBlank(messages)){ + // TODO add + + } } /** @@ -193,33 +196,34 @@ public class PointRuleServiceImpl extends BaseServiceImpl disposeLog(PointRuleFormDTO f,PointRuleEntity e){ - List result = new ArrayList<>(); + private String disposeLog(PointRuleFormDTO f,PointRuleEntity e){ + StringBuffer sb = new StringBuffer(); // 单位积分 if (!e.getPoint().equals(f.getPoint())){ String s = String.format(StrConstant.POINT_CHANGE, e.getRuleName(), e.getPoint(), f.getPoint()); - result.add(s); + sb.append(s).append(","); } // 积分上限 if (!e.getUpLimit().equals(f.getUpLimit())){ String s = String.format(StrConstant.POINT_CHANGE, e.getRuleName(), e.getUpLimit(), f.getUpLimit()); - result.add(s); + sb.append(s).append(","); } // 积分说明 if (!e.getRuleDesc().equals(f.getRuleDesc())){ String s = String.format(StrConstant.POINT_CHANGE, e.getRuleName(), e.getRuleDesc(), f.getRuleDesc()); - result.add(s); + sb.append(s).append(","); } // 规则启用 if(!e.getEnabledFlag().equals(f.getEnabledFlag())){ String s = String.format(StrConstant.POINT_CHANGE, e.getRuleName(), e.getEnabledFlag(), f.getEnabledFlag()); + sb.append(s).append(","); } // 积分事件 if (!e.getRuleName().equals(f.getRuleName())){ String s = String.format(StrConstant.POINT_CHANGE, e.getRuleName(), e.getRuleName(), f.getRuleName()); - result.add(s); + sb.append(s).append(","); } - return result; + return sb.substring(NumConstant.ZERO,sb.length() - NumConstant.ONE); } private void validateEnableFlag(PointRuleFormDTO formDTO) { From 3598a8163689a29c097bb253d9eac76cac1d193b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 21 Jun 2021 10:10:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/MyPointTaskResultDTO.java | 7 +++++ .../epmet/entity/PointRuleDefaultEntity.java | 15 ++++++++++ .../com/epmet/entity/PointRuleEntity.java | 15 ++++++++++ .../impl/UserPointActionLogServiceImpl.java | 4 ++- .../db/migration/V0.0.11__point_rule_sort.sql | 29 +++++++++++++++++++ .../mapper/UserPointActionLogDao.xml | 3 +- 6 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.11__point_rule_sort.sql diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointTaskResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointTaskResultDTO.java index 670faa5580..d096373307 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointTaskResultDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointTaskResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -81,4 +82,10 @@ public class MyPointTaskResultDTO implements Serializable { * 排序 */ private Integer sort; + + /** + * 一次性任务?1:是;0:不是 + */ + @JsonIgnore + private String disposable; } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleDefaultEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleDefaultEntity.java index bbb6055148..9b5cd7f6bc 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleDefaultEntity.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleDefaultEntity.java @@ -94,4 +94,19 @@ public class PointRuleDefaultEntity extends BaseEpmetEntity { * 是否启用 0-否,1-是 */ private String enabledFlag; + + /** + * 规则显示顺序 + */ + private Integer sort; + + /** + * 链接页面 + */ + private String linkPage; + + /** + * 一次性任务?1:是;0:不是 + */ + private String disposable; } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java index 6468d86afb..7191215345 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java @@ -102,6 +102,21 @@ public class PointRuleEntity extends BaseEpmetEntity { */ private String enabledFlag; + /** + * 规则显示顺序 + */ + private Integer sort; + + /** + * 链接页面 + */ + private String linkPage; + + /** + * 一次性任务?1:是;0:不是 + */ + private String disposable; + @Override public boolean equals(Object o) { if (this == o) return true; 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 d8561e797b..740ec82f8f 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 @@ -28,7 +28,6 @@ import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dao.UserPointActionLogDao; import com.epmet.dto.BizPointTotalDetailDTO; @@ -539,6 +538,9 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl