Browse Source

Merge remote-tracking branch 'origin/dev_point_task' into develop

# Conflicts:
#	epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.11__point_rule_sort.sql
dev_shibei_match
yinzuomei 4 years ago
parent
commit
eb7fe1c5fc
  1. 7
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointTaskResultDTO.java
  2. 15
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleDefaultEntity.java
  3. 15
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java
  4. 22
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java
  5. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java
  6. 3
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml

7
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;
}

15
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;
}

15
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;

22
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<PointRuleDao, PointRul
baseDao.updateByCustomerId(entityNew);
insertOperateRecord(tokenDTO, entityNew, entityDB, CommonOperateTypeEnum.EDIT.getCode());
// 系统日志记录
List<String> 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<PointRuleDao, PointRul
* @author zxc
* @date 2021/6/18 3:14 下午
*/
private List<String> disposeLog(PointRuleFormDTO f,PointRuleEntity e){
List<String> 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) {

4
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<UserPointActi
dto.setFinishFlag("未完成");
}
}
if("1".equals(dto.getDisposable())&&dto.getFinishedCount().equals(NumConstant.ONE)){
dto.setFinishFlag("已完成");
}
});
return list;
}

3
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml

@ -113,7 +113,8 @@
else CEIL(pr.UP_LIMIT/pr.point)
end
)as upLimitCount,
pr.sort
pr.sort,
pr.DISPOSABLE as disposable
FROM
point_rule pr
WHERE

Loading…
Cancel
Save