From d8689abdb2378bdd1c97317ca881173eca26283c Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 14 一月 2026 17:13:52 +0800
Subject: [PATCH] 经销商管理

---
 server/dmmall_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java |   79 +++++++++++++++++++++------------------
 1 files changed, 42 insertions(+), 37 deletions(-)

diff --git a/server/dmmall_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java b/server/dmmall_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
index 2d919f1..4bb1bfc 100644
--- a/server/dmmall_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
+++ b/server/dmmall_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
@@ -20,6 +20,7 @@
 import com.doumee.service.system.SystemDictDataService;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -142,30 +143,24 @@
         platformConfigDTO.setReturnMemberIntegralStatus(0);
         platformConfigDTO.setReturnShopIntegralStatus(0);
 
+        platformConfigDTO.setMinIntegralPriceLimit(new BigDecimal(0));
+        platformConfigDTO.setDeductIntegralLimit(0);
+        platformConfigDTO.setIntegralRuleInfo("");
+        platformConfigDTO.setIntegralInvalidType(0);
+        platformConfigDTO.setIntegralInvalidCircle(0);
+
         platformConfigDTO.setTotalRate(new BigDecimal(0));
 
-        SystemDict  dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda()
+ /*       SystemDict  dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda()
                 .eq(SystemDict::getCode,Constants.ORDER_SET).last("limit 1"));
         if(dict == null){
             throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏁版嵁瀛楀吀閰嶇疆鏁版嵁鏈夎锛岃鑱旂郴绯荤粺绠$悊鍛樺鐞嗭紒");
         }
-
-        List<SystemDictData> systemDictDataList = systemDictDataMapper.selectList(new QueryWrapper<SystemDictData>()
-                .lambda().eq(SystemDictData::getDictId,dict.getId())
-                .in(SystemDictData::getLabel
-                        , Constants.ORDERSET_REG_INTEGRAL_REWARD_STATUS
-                        , Constants.ORDERSET_SHARE_INTEGRAL_REWARD_STATUS
-                        , Constants.ORDERSET_REG_COUPON_REWARD_STATUS
-                        , Constants.ORDERSET_SHARE_COUPON_REWARD_STATUS
-                        , Constants.ORDERSET_REG_INTEGRAL_REWARD
-                        , Constants.ORDERSET_SHARE_INTEGRAL_REWARD
-                        , Constants.ORDERSET_REG_COUPON_REWARD_LIST
-                        , Constants.ORDERSET_SHARE_COUPON_REWARD_LIST
-                        , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS
-                        , Constants.ORDERSET_RETURN_SHOP_INTEGRAL_STATUS
-                        , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL
-                        , Constants.ORDERSET_RETURN_SHOP_INTEGRAL
-                        ,Constants.ORDERSET_TOTAL_RATE )
+*/
+        List<SystemDictData> systemDictDataList = systemDictDataMapper.selectJoinList(SystemDictData.class,new MPJLambdaWrapper<SystemDictData>()
+                .selectAll(SystemDictData.class)
+                .leftJoin(SystemDict.class,SystemDict::getId,SystemDictData::getDictId)
+                .in(SystemDict::getCode,Constants.ORDER_SET,Constants.INTEGRAL_SET)
         );
         if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictDataList)){
             for (SystemDictData systemDictData:systemDictDataList) {
@@ -195,6 +190,17 @@
                     platformConfigDTO.setReturnShopIntegralStatus(getIntegerValByStr(systemDictData.getCode()));
                 }else if(systemDictData.getLabel().equals(Constants.ORDERSET_TOTAL_RATE)) {
                     platformConfigDTO.setTotalRate(getDecimalValByStr(systemDictData.getCode()));
+                }
+                else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALINVALIDTYPE)) {
+                    platformConfigDTO.setIntegralInvalidType(getIntegerValByStr(systemDictData.getCode()));
+                }else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALINVALIDCIRCLE)) {
+                    platformConfigDTO.setIntegralInvalidCircle(getIntegerValByStr(systemDictData.getCode()));
+                }else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALRULEINFO)) {
+                    platformConfigDTO.setIntegralRuleInfo(systemDictData.getCode());
+                }else if(systemDictData.getLabel().equals(Constants.INTERALSET_DEDUCTINTEGRALLIMIT)) {
+                    platformConfigDTO.setDeductIntegralLimit(getIntegerValByStr(systemDictData.getCode()));
+                }else if(systemDictData.getLabel().equals(Constants.INTERALSET_MININTEGRALPRICELIMIT)) {
+                    platformConfigDTO.setMinIntegralPriceLimit(getDecimalValByStr(systemDictData.getCode()));
                 }
             }
         }
@@ -227,28 +233,15 @@
     @Override
     @Transactional(rollbackFor = {Exception.class, BusinessException.class})
     public void updPlatformConfig(PlatformConfigDTO platformConfigDTO) {
-        SystemDict dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda()
+ /*       SystemDict dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda()
                 .eq(SystemDict::getCode, Constants.ORDER_SET).last("limit 1"));
         if (dict == null) {
             throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "鏁版嵁瀛楀吀閰嶇疆鏁版嵁鏈夎锛岃鑱旂郴绯荤粺绠$悊鍛樺鐞嗭紒");
-        }
-        List<SystemDictData> systemDictDataList = systemDictDataMapper.selectList(new QueryWrapper<SystemDictData>()
-                .lambda()
-                .eq(SystemDictData::getDictId, dict.getId())
-                .in(SystemDictData::getLabel
-                        , Constants.ORDERSET_REG_INTEGRAL_REWARD_STATUS
-                        , Constants.ORDERSET_SHARE_INTEGRAL_REWARD_STATUS
-                        , Constants.ORDERSET_REG_COUPON_REWARD_STATUS
-                        , Constants.ORDERSET_SHARE_COUPON_REWARD_STATUS
-                        , Constants.ORDERSET_REG_INTEGRAL_REWARD
-                        , Constants.ORDERSET_SHARE_INTEGRAL_REWARD
-                        , Constants.ORDERSET_REG_COUPON_REWARD_LIST
-                        , Constants.ORDERSET_SHARE_COUPON_REWARD_LIST
-                        , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS
-                        , Constants.ORDERSET_RETURN_SHOP_INTEGRAL_STATUS
-                        , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL
-                        , Constants.ORDERSET_RETURN_SHOP_INTEGRAL
-                        , Constants.ORDERSET_TOTAL_RATE)
+        }*/
+        List<SystemDictData> systemDictDataList = systemDictDataMapper.selectJoinList(SystemDictData.class,new MPJLambdaWrapper<SystemDictData>()
+                .selectAll(SystemDictData.class)
+                .leftJoin(SystemDict.class,SystemDict::getId,SystemDictData::getDictId)
+                .in(SystemDict::getCode,Constants.ORDER_SET,Constants.INTEGRAL_SET)
         );
         if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictDataList)) {
             for (SystemDictData systemDictData : systemDictDataList) {
@@ -279,6 +272,18 @@
                 } else if (systemDictData.getLabel().equals(Constants.ORDERSET_TOTAL_RATE)) {
                     systemDictData.setCode(Constants.formatBigdecimal(platformConfigDTO.getTotalRate()).doubleValue() + "");
                 }
+
+                else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALINVALIDTYPE)) {
+                    systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getIntegralInvalidType()) + "");
+                }else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALINVALIDCIRCLE)) {
+                    systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getIntegralInvalidCircle()) + "");
+                }else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALRULEINFO)) {
+                    systemDictData.setCode(platformConfigDTO.getIntegralRuleInfo());
+                }else if(systemDictData.getLabel().equals(Constants.INTERALSET_DEDUCTINTEGRALLIMIT)) {
+                    systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getDeductIntegralLimit()) + "");
+                }else if(systemDictData.getLabel().equals(Constants.INTERALSET_MININTEGRALPRICELIMIT)) {
+                    systemDictData.setCode(Constants.formatBigdecimal(platformConfigDTO.getReturnShopIntegral()).doubleValue() + "");
+                }
                 systemDictDataMapper.update(new UpdateWrapper<SystemDictData>().lambda()
                         .set(SystemDictData::getCode, systemDictData.getCode())
                         .eq(SystemDictData::getId, systemDictData.getId()));

--
Gitblit v1.9.3