|
@@ -93,7 +93,9 @@ public class KxsShdScoreServiceImpl extends ServiceImpl<KxsShdScoreMapper, KxsSh
|
|
|
//版本号对比
|
|
//版本号对比
|
|
|
if (kxsShdScore == null || !kxsShdScore.getVersion().equals(integralStatDTO.getVersion())){
|
|
if (kxsShdScore == null || !kxsShdScore.getVersion().equals(integralStatDTO.getVersion())){
|
|
|
//记录不存在则构造数据
|
|
//记录不存在则构造数据
|
|
|
- kxsShdScore = new KxsShdScore();
|
|
|
|
|
|
|
+ if (kxsShdScore == null){
|
|
|
|
|
+ kxsShdScore = new KxsShdScore();
|
|
|
|
|
+ }
|
|
|
kxsShdScore.setCreateTime(now);
|
|
kxsShdScore.setCreateTime(now);
|
|
|
kxsShdScore.setDelFlag("0");
|
|
kxsShdScore.setDelFlag("0");
|
|
|
kxsShdScore.setUserId(Long.valueOf(kxsUser.getId()));
|
|
kxsShdScore.setUserId(Long.valueOf(kxsUser.getId()));
|
|
@@ -102,6 +104,8 @@ public class KxsShdScoreServiceImpl extends ServiceImpl<KxsShdScoreMapper, KxsSh
|
|
|
kxsShdScore.setVersion(integralStatDTO.getVersion());//版本号
|
|
kxsShdScore.setVersion(integralStatDTO.getVersion());//版本号
|
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_FRIST.getTransactions()) >= 0){
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_FRIST.getTransactions()) >= 0){
|
|
|
kxsShdScore.setFirstScore(1);
|
|
kxsShdScore.setFirstScore(1);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ kxsShdScore.setFirstScore(0);
|
|
|
}
|
|
}
|
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_CENTER.getTransactions()) >= 0){
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_CENTER.getTransactions()) >= 0){
|
|
|
kxsShdScore.setCenterScore(1);
|
|
kxsShdScore.setCenterScore(1);
|
|
@@ -117,12 +121,14 @@ public class KxsShdScoreServiceImpl extends ServiceImpl<KxsShdScoreMapper, KxsSh
|
|
|
kxsShdScore.setMonth(month);
|
|
kxsShdScore.setMonth(month);
|
|
|
kxsShdScoreMapper.insert(kxsShdScore);
|
|
kxsShdScoreMapper.insert(kxsShdScore);
|
|
|
}else {
|
|
}else {
|
|
|
|
|
+
|
|
|
//存在数据则根据条件增加
|
|
//存在数据则根据条件增加
|
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_FRIST.getTransactions()) >= 0){
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_FRIST.getTransactions()) >= 0){
|
|
|
kxsShdScore.setFirstScore(kxsShdScore.getFirstScore() + 1);
|
|
kxsShdScore.setFirstScore(kxsShdScore.getFirstScore() + 1);
|
|
|
}
|
|
}
|
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_CENTER.getTransactions()) >= 0){
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_CENTER.getTransactions()) >= 0){
|
|
|
kxsShdScore.setCenterScore(kxsShdScore.getCenterScore() + 1);
|
|
kxsShdScore.setCenterScore(kxsShdScore.getCenterScore() + 1);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_HIGH.getTransactions()) >= 0){
|
|
if (integralStatDTO.getTotalAmount().compareTo(ShdGradingEnum.LEVEL_HIGH.getTransactions()) >= 0){
|
|
|
kxsShdScore.setHighScore(kxsShdScore.getHighScore() + 1);
|
|
kxsShdScore.setHighScore(kxsShdScore.getHighScore() + 1);
|