Bladeren bron

新增一些注释

sptkw 2 jaren geleden
bovenliggende
commit
61ce913997

+ 18 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsService.java

@@ -165,6 +165,7 @@ public class KwpSettlementLogisticsService {
 
 
     /**
     /**
      * 对查询结果进行处理,转换 status 等状态值为对应中文描述
      * 对查询结果进行处理,转换 status 等状态值为对应中文描述
+     *
      * @author Aick Spt
      * @author Aick Spt
      * @date 2023-08-03 10:44
      * @date 2023-08-03 10:44
      */
      */
@@ -177,6 +178,7 @@ public class KwpSettlementLogisticsService {
 
 
     /**
     /**
      * 根据条件获取列表头部汇总数据
      * 根据条件获取列表头部汇总数据
+     *
      * @author Aick Spt
      * @author Aick Spt
      * @date 2023-08-03 10:44
      * @date 2023-08-03 10:44
      */
      */
@@ -221,6 +223,12 @@ public class KwpSettlementLogisticsService {
         return tableTops;
         return tableTops;
     }
     }
 
 
+    /**
+     * 运费-物流订单详情
+     *
+     * @author Aick Spt
+     * @date 2023-08-07 10:14
+     */
     private SettlementLogisticsDto detail(Long id, Integer unitType) {
     private SettlementLogisticsDto detail(Long id, Integer unitType) {
         SettlementLogisticsDto settlementLogisticsDto = settlementLogisticsMapper.detail(id, unitType);
         SettlementLogisticsDto settlementLogisticsDto = settlementLogisticsMapper.detail(id, unitType);
         if (settlementLogisticsDto == null) {
         if (settlementLogisticsDto == null) {
@@ -230,6 +238,12 @@ public class KwpSettlementLogisticsService {
         return settlementLogisticsDto;
         return settlementLogisticsDto;
     }
     }
 
 
+    /**
+     * 增加 创建、更新人名称及字段
+     *
+     * @author Aick Spt
+     * @date 2023-08-07 10:14
+     */
     private void setDetailDesc(SettlementLogisticsDto settlementLogisticsDto) {
     private void setDetailDesc(SettlementLogisticsDto settlementLogisticsDto) {
         settlementLogisticsDto.setStatusText(SettlementEnum.getStatusDesc(settlementLogisticsDto.getStatus()));
         settlementLogisticsDto.setStatusText(SettlementEnum.getStatusDesc(settlementLogisticsDto.getStatus()));
         if (settlementLogisticsDto.getLedgerSettlePrice() != null) {
         if (settlementLogisticsDto.getLedgerSettlePrice() != null) {
@@ -249,18 +263,22 @@ public class KwpSettlementLogisticsService {
         Long updateBy = settlementLogisticsDto.getUpdateBy();
         Long updateBy = settlementLogisticsDto.getUpdateBy();
         UserCacheResDto userCacheResDto = map.get(createBy);
         UserCacheResDto userCacheResDto = map.get(createBy);
         if (Objects.isNull(userCacheResDto)) {
         if (Objects.isNull(userCacheResDto)) {
+            //通过缓存拿对应数据
             userCacheResDto = remoteSystemService.queryUserCacheById(createBy);
             userCacheResDto = remoteSystemService.queryUserCacheById(createBy);
             map.put(createBy, userCacheResDto);
             map.put(createBy, userCacheResDto);
         }
         }
         if (Objects.nonNull(userCacheResDto)) {
         if (Objects.nonNull(userCacheResDto)) {
+            //写入对应数据
             settlementLogisticsDto.setCreateByText(userCacheResDto.getName());
             settlementLogisticsDto.setCreateByText(userCacheResDto.getName());
         }
         }
         userCacheResDto = map.get(updateBy);
         userCacheResDto = map.get(updateBy);
         if (Objects.isNull(userCacheResDto)) {
         if (Objects.isNull(userCacheResDto)) {
+            //通过缓存拿对应数据
             userCacheResDto = remoteSystemService.queryUserCacheById(updateBy);
             userCacheResDto = remoteSystemService.queryUserCacheById(updateBy);
             map.put(updateBy, userCacheResDto);
             map.put(updateBy, userCacheResDto);
         }
         }
         if (Objects.nonNull(userCacheResDto)) {
         if (Objects.nonNull(userCacheResDto)) {
+            //写入对应数据
             settlementLogisticsDto.setUpdateByText(userCacheResDto.getName());
             settlementLogisticsDto.setUpdateByText(userCacheResDto.getName());
         }
         }
     }
     }

+ 2 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementOfflineService.java

@@ -72,13 +72,13 @@ public class KwpSettlementOfflineService {
      */
      */
     public PageRes<SettlementOfflineVo> pageListLogisticsCollection(SettlementOfflineReq settlementOfflineReq) {
     public PageRes<SettlementOfflineVo> pageListLogisticsCollection(SettlementOfflineReq settlementOfflineReq) {
         PageHelper.startPage(settlementOfflineReq.getPage(), settlementOfflineReq.getPageSize());
         PageHelper.startPage(settlementOfflineReq.getPage(), settlementOfflineReq.getPageSize());
-
+        //查询对应数据
         List<SettlementOfflineDto> settlementOfflineLogisticsList = settlementOfflineMapper.pageListLogisticsCollection(settlementOfflineReq);
         List<SettlementOfflineDto> settlementOfflineLogisticsList = settlementOfflineMapper.pageListLogisticsCollection(settlementOfflineReq);
 
 
         if (CollectionUtils.isEmpty(settlementOfflineLogisticsList)) {
         if (CollectionUtils.isEmpty(settlementOfflineLogisticsList)) {
             return new PageRes<>(new PageInfo<>());
             return new PageRes<>(new PageInfo<>());
         }
         }
-
+        //增加对应创建人和更新人名称
         for (SettlementOfflineDto entity : settlementOfflineLogisticsList) {
         for (SettlementOfflineDto entity : settlementOfflineLogisticsList) {
             entity.setCreateByText("创建人名称");
             entity.setCreateByText("创建人名称");
             entity.setUpdateByText("更新人名称");
             entity.setUpdateByText("更新人名称");

+ 2 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementWalletService.java

@@ -88,7 +88,7 @@ public class KwpSettlementWalletService {
         if (CollectionUtils.isEmpty(settlementWalletLogisticsList)) {
         if (CollectionUtils.isEmpty(settlementWalletLogisticsList)) {
             return new PageRes<>();
             return new PageRes<>();
         }
         }
-
+        //增加对应创建人和更新人名称
         for (SettlementWalletDto entity : settlementWalletLogisticsList) {
         for (SettlementWalletDto entity : settlementWalletLogisticsList) {
             entity.setCreateByText("创建人名称");
             entity.setCreateByText("创建人名称");
             entity.setUpdateByText("更新人名称");
             entity.setUpdateByText("更新人名称");
@@ -374,6 +374,7 @@ public class KwpSettlementWalletService {
         if (CollectionUtils.isEmpty(settlementWalletDto)) {
         if (CollectionUtils.isEmpty(settlementWalletDto)) {
             return new PageRes<>();
             return new PageRes<>();
         }
         }
+        //增加对应创建人和更新人名称
         Map<Long, UserCacheResDto> map = new HashMap<>();
         Map<Long, UserCacheResDto> map = new HashMap<>();
         PageInfo<SettlementWalletDto> pageInfo = new PageInfo<>(settlementWalletDto);
         PageInfo<SettlementWalletDto> pageInfo = new PageInfo<>(settlementWalletDto);
         //指定返回值
         //指定返回值

+ 12 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/utils/CommonValidator.java

@@ -1,9 +1,19 @@
 package com.sckw.payment.utils;
 package com.sckw.payment.utils;
 
 
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.exception.BusinessException;
+import com.sckw.payment.model.constant.SettlementEnum;
+import com.sckw.payment.model.dto.SettlementLogisticsDto;
+import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.apache.poi.ss.formula.functions.T;
 
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
 import java.util.regex.Pattern;
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
 import java.util.regex.Matcher;
 
 
@@ -15,6 +25,8 @@ public class CommonValidator {
 
 
     // 时间格式的正则表达式
     // 时间格式的正则表达式
     private static final String TIME_PATTERN = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}";
     private static final String TIME_PATTERN = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}";
+    @DubboReference(version = "2.0.0", group = "design", check = false)
+    private RemoteSystemService remoteSystemService;
 
 
     /**
     /**
      * 判断时间段的开始时间和结束时间是否同时存在或同时不存在,且格式为 yyyy-MM-dd HH:mm:ss
      * 判断时间段的开始时间和结束时间是否同时存在或同时不存在,且格式为 yyyy-MM-dd HH:mm:ss