From a08bb658305dd6f09b7ae54dfc9a6a8b73d1880b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Thu, 26 Sep 2024 11:09:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/common/core/domain/entity/SmUser.java | 2 +- .../system/service/impl/SysConfigServiceImpl.java | 13 ------------- .../ss/bonus/service/impl/BonusServiceImpl.java | 9 +++++++++ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/entity/SmUser.java b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/entity/SmUser.java index a10429e8..48190074 100644 --- a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/entity/SmUser.java +++ b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/entity/SmUser.java @@ -211,5 +211,5 @@ public class SmUser extends BaseEntity @Excel(name = "到账延迟时间", readConverterExp = "小=时") @ApiModelProperty("到账延迟时间") - private Long arrivalDelay; + private Integer arrivalDelay; } diff --git a/smart-switch-ruoyi/smart-switch-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java b/smart-switch-ruoyi/smart-switch-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java index 03b62ede..e7462bf4 100644 --- a/smart-switch-ruoyi/smart-switch-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java +++ b/smart-switch-ruoyi/smart-switch-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java @@ -291,19 +291,6 @@ public class SysConfigServiceImpl implements ISysConfigService return result == null ? 0 : result; } - @Override - public int getInt(ConfigKey key) { - String s = this.selectConfigByKey(key.getKey()); - if (StringUtils.isBlank(s)) { - return 0; - } - try { - return Integer.parseInt(s); - } catch (Exception e) { - return 0; - } - } - /** * 设置cache key * diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusServiceImpl.java index af2f4369..94d4f282 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusServiceImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusServiceImpl.java @@ -25,6 +25,7 @@ import com.ruoyi.ss.recordBalance.domain.enums.RecordBalanceBstType; import com.ruoyi.ss.store.service.StoreService; import com.ruoyi.ss.user.domain.SmUserVo; import com.ruoyi.ss.user.service.ISmUserService; +import com.ruoyi.ss.user.service.UserAssembler; import com.ruoyi.system.domain.enums.config.ConfigKey; import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.system.service.ISysDeptService; @@ -64,6 +65,9 @@ public class BonusServiceImpl implements BonusService @Autowired private ISysConfigService sysConfigService; + @Autowired + private UserAssembler userAssembler; + /** * 查询分成明细 * @@ -197,6 +201,9 @@ public class BonusServiceImpl implements BonusService .map(BonusVO::getArrivalId) .collect(Collectors.toList()) ); + // TODO 拼接用户实际到账延迟 + + // 获取全局配置,默认延迟到账时间 int defaultDelay = sysConfigService.getInt(ConfigKey.ARRIVAL_DELAY); @@ -213,6 +220,8 @@ public class BonusServiceImpl implements BonusService // TODO 预计分成时间 if (BonusArrivalType.userList().contains(bonus.getArrivalType())) { SmUserVo user = userList.stream().filter(item -> item.getUserId().equals(bonus.getArrivalId())).findFirst().orElse(null); + + this.getArrivalDelay(user); // bonus.setPrePayTime(); } else { bonus.setPrePayTime(now);