Преглед изворни кода

平台档案和平台属性档案重构,只读redis,结构改一下,属性档案直接变成平台档案的子表,前端少做一点界面

jlutt@163.com пре 2 година
родитељ
комит
360dcaebc2

+ 12 - 0
conf/script/1000/business/BE_DocClearScriptCache.groovy

@@ -3,6 +3,7 @@ import com.dderp.common.api.DocInfoService
 import com.dderp.common.api.SystemService
 import com.dderp.common.api.flycat.ExpressOutService
 import com.dderp.common.api.flycat.OrderSearchService
+import com.dderp.common.api.flycat.OrderService
 import com.dderp.common.datas.ERPModule
 import com.dderp.common.datas.ERPModuleEntity
 import com.dderp.common.entity.base.BusinessOperation
@@ -33,6 +34,9 @@ class BE_DocClearScriptCache implements BusinessExecutor<ProcessEntityItem<ERPMo
     ExpressOutService expressOutService
 
     @Resource
+    OrderService orderService
+
+    @Resource
     OrderSearchService orderSearchService
 
     @Override
@@ -57,6 +61,7 @@ class BE_DocClearScriptCache implements BusinessExecutor<ProcessEntityItem<ERPMo
             systemService.reloadScriptCache(source.inputItem.code, ERPModule.SYSTEM, source.dataSourceId, source.supplierCode)
             docInfoService.reloadScriptCache(source.inputItem.code, ERPModule.SYSTEM, source.dataSourceId, source.supplierCode)
             expressOutService.reloadScriptCache(source.inputItem.code, ERPModule.SYSTEM, source.dataSourceId, source.supplierCode)
+            orderService.reloadScriptCache(source.inputItem.code, ERPModule.SYSTEM, source.dataSourceId, source.supplierCode)
             orderSearchService.reloadScriptCache(source.inputItem.code, ERPModule.SYSTEM, source.dataSourceId, source.supplierCode)
         }
         else {
@@ -91,6 +96,13 @@ class BE_DocClearScriptCache implements BusinessExecutor<ProcessEntityItem<ERPMo
                         expressOutService.reloadScriptCache(source.getInputItem().getCode(), erpModule, source.getDataSourceId(), source.getSupplierCode())
                     }
                     break
+                case ERPModule.ERP_ORDER:
+                    if (source.getOperation() == BusinessOperation.SAVE) {
+                        orderService.invalidateScriptCache(source.getSupplierCode() + "-" + source.getInputItem().getCode())
+                    } else {
+                        orderService.reloadScriptCache(source.getInputItem().getCode(), erpModule, source.getDataSourceId(), source.getSupplierCode())
+                    }
+                    break
                 case ERPModule.ERP_ORDER_SEARCH:
                     if (source.getOperation() == BusinessOperation.SAVE) {
                         orderSearchService.invalidateScriptCache(source.getSupplierCode() + "-" + source.getInputItem().getCode())

+ 21 - 69
conf/script/1000/init/Init_14_Platform.groovy

@@ -1,91 +1,43 @@
 import com.dderp.business.dao.PlatformDao
 import com.dderp.common.api.NoSqlKeysService
-import com.dderp.common.datas.ESKeys
 import com.dderp.common.datas.RedisKeys
 import com.dderp.common.entity.platform.PlatformInfo
 import com.dderp.common.entity.platform.PlatformRequire
-import com.dySweetFishPlugin.elasticsearch.ESClient
+import com.dderp.common.tool.ERPUtils
 import com.dySweetFishPlugin.redis.RedisService
 import com.sweetfish.convert.json.JsonConvert
 import com.sweetfish.source.PageFlipper
-import com.sweetfish.util.Utility
-import org.apache.logging.log4j.Logger
-import org.elasticsearch.action.bulk.BulkRequestBuilder
-import org.elasticsearch.action.bulk.BulkResponse
-import org.elasticsearch.action.index.IndexRequestBuilder
-import org.elasticsearch.common.xcontent.XContentType
 import org.rex.RMap
 
-static def createRunnable(ESClient esClient, RedisService redisService, NoSqlKeysService keysService,
-                          PlatformDao platformDao, Logger logger, JsonConvert jsonConvert, String dataSourceId, long supplierCode) {
+static def createRunnable(RedisService redisService, NoSqlKeysService keysService,
+                          PlatformDao platformDao, JsonConvert jsonConvert, String dataSourceId, long supplierCode) {
     return {
-        esClient.createIndex(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_INFO_INDEX, supplierCode),
-                ESKeys.INDEX_CONFIG,
-                Utility.ofMap(ESKeys.ES_DELIVER_PLATFORM_INFO_TYPE, "platforminfo.json"))
         redisService.del(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_INFO, supplierCode))
 
-        esClient.createIndex(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_INDEX, supplierCode),
-                ESKeys.INDEX_CONFIG,
-                Utility.ofMap(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_TYPE, "platformrequire.json"))
-        redisService.del(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode))
+        RMap platformParams = ERPUtils.ofRMap("voidFlag", -1)
+        Ignore_ExecPageFlipper.execute(500, { PageFlipper p ->
+            List<PlatformInfo> platformInfoList = platformDao.queryPlatformInfoList(platformParams, p, dataSourceId, supplierCode)
+            Map<String, String> platformInfoMap = platformInfoList.collectEntries { [String.valueOf(it.getId()), jsonConvert.convertTo(it)] }
 
-
-        RMap params = new RMap()
-        params.put("voidFlag", -1)
-
-        Ignore_ExecPageFlipper.execute(1000, { PageFlipper p ->
-            List<PlatformInfo> platformInfoList = platformDao.queryPlatformInfoList(params, p, dataSourceId, supplierCode)
-            if (!platformInfoList.isEmpty()) {
-                Map<String, String> redisMap = platformInfoList.collectEntries { [String.valueOf(it.getId()), jsonConvert.convertTo(it)] }
-                if (!redisMap.isEmpty()) {
-                    redisService.hmset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_INFO, supplierCode), redisMap)
-                }
-
-                BulkRequestBuilder bulkRequest = esClient.getClient().prepareBulk()
-                platformInfoList.each { x ->
-                    IndexRequestBuilder indexRequest = esClient.getClient()
-                            .prepareIndex(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_INFO_INDEX, supplierCode), ESKeys.ES_DELIVER_PLATFORM_INFO_TYPE)
-                            .setId(String.valueOf(x.getId()))
-                            .setSource(jsonConvert.convertTo(x), XContentType.JSON)
-                    bulkRequest.add(indexRequest)
-                }
-                BulkResponse bulkResponse = bulkRequest.execute().actionGet()
-
-                if (bulkResponse.hasFailures()) {
-                    logger.error("索引平台档案出错:" + bulkResponse.buildFailureMessage())
-                } else {
-                    logger.info("索引平台档案,共" + platformInfoList.size() + "条记录")
-                }
+            if (!platformInfoMap.isEmpty()) {
+                redisService.hmset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_INFO, supplierCode), platformInfoMap)
             }
-        })
-
-        Ignore_ExecPageFlipper.execute(1000, { PageFlipper p ->
-            List<PlatformRequire> platformRequireList = platformDao.queryPlatformRequireList(params, p, dataSourceId, supplierCode)
-            if (!platformRequireList.isEmpty()) {
-                Map<String, String> redisMap = platformRequireList.collectEntries { [String.valueOf(it.getId()), jsonConvert.convertTo(it)] }
-                if (!redisMap.isEmpty()) {
-                    redisService.hmset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode), redisMap)
-                }
 
-                BulkRequestBuilder bulkRequest = esClient.getClient().prepareBulk()
-                platformRequireList.each { x ->
-                    IndexRequestBuilder indexRequest = esClient.getClient()
-                            .prepareIndex(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_INDEX, supplierCode), ESKeys.ES_DELIVER_PLATFORM_REQUIRE_TYPE)
-                            .setId(String.valueOf(x.getId()))
-                            .setSource(jsonConvert.convertTo(x), XContentType.JSON)
-                    bulkRequest.add(indexRequest)
-                }
-                BulkResponse bulkResponse = bulkRequest.execute().actionGet()
-
-                if (bulkResponse.hasFailures()) {
-                    logger.error("索引平台需求条件档案出错:" + bulkResponse.buildFailureMessage())
-                } else {
-                    logger.info("索引平台需求条件档案,共" + platformRequireList.size() + "条记录")
-                }
+            platformInfoList.each { x ->
+                RMap platformRequireParams = ERPUtils.ofRMap("idPlatform", x.getId(), "voidFlag", -1)
+                redisService.del(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode, true) + x.getId())
+                Ignore_ExecPageFlipper.execute(500, { PageFlipper p1 ->
+                    List<PlatformRequire> platformRequireList = platformDao.queryPlatformRequireList(platformRequireParams, p1, dataSourceId, supplierCode)
+                    Map<String, String> platformRequireMap = platformRequireList.collectEntries { [String.valueOf(it.getId()), jsonConvert.convertTo(it)] }
+                    if (!platformRequireMap.isEmpty()) {
+                        redisService.hmset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode, true) + x.getId(), platformRequireMap)
+                    }
+                })
             }
         })
 
+
     } as Runnable
 }
 
-createRunnable(esClient, redisService, keysService, platformDao, logger, jsonConvert, dataSourceId, supplierCode)
+createRunnable(redisService, keysService, platformDao, jsonConvert, dataSourceId, supplierCode)

+ 1 - 1
conf/script/1000/storeApi/BE_Store_BindStorePlatform_Douyin.groovy

@@ -81,7 +81,7 @@ class BE_Store_BindStorePlatform_Douyin implements BusinessExecutor<ProcessStrin
         ViewStoreInfo viewStoreInfo = storeService.getViewStoreInfo(idStore, supplierCode, false, false, false)
         if (viewStoreInfo == null) return RetResult.<StorePlatform> errorT().retinfo("门店信息不存在")
 
-        PlatformInfo platformInfo = platformService.getPlatformInfoByCode("DYLK", supplierCode)
+        PlatformInfo platformInfo = platformService.getPlatformInfoByCode("DYLK", true, supplierCode)
         if (platformInfo == null) return RetResult.<StorePlatform> errorT().retinfo("系统档案内未找到[抖音来客]平台")
 
         StorePlatform storePlatform = new StorePlatform()

+ 29 - 6
conf/sqlroot/com/dderp/business/dao/PlatformDao.dql

@@ -2,8 +2,18 @@
 select *
 from $table$
 -- trim prefix=WHERE prefixOverrides=AND|OR
-  -- if voidFlag >= 0
-    voidFlag = #{voidFlag}
+  -- isNotEmpty voidFlag
+      -- if voidFlag >= 0
+        voidFlag = #{voidFlag}
+      -- end
+  -- end
+  -- isNotEmpty platformType
+      -- if platformType >= 0
+        and platformType = #{platformType}
+      -- end
+  -- end
+  -- isNotEmpty keyWord
+    and (platformName LIKE #{Like:keyWord})
   -- end
 -- end
 -- isEmpty orderBy
@@ -36,8 +46,18 @@ updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};
 select *
 from $table$
 -- trim prefix=WHERE prefixOverrides=AND|OR
-  -- if voidFlag >= 0
-    voidFlag = #{voidFlag}
+  -- isNotEmpty idPlatform
+      -- if idPlatform >= 0
+        idPlatform = #{idPlatform}
+      -- end
+  -- end
+  -- isNotEmpty voidFlag
+      -- if voidFlag >= 0
+        and voidFlag = #{voidFlag}
+      -- end
+  -- end
+  -- isNotEmpty keyWord
+    and (requireName LIKE #{Like:keyWord})
   -- end
 -- end
 -- isEmpty orderBy
@@ -48,10 +68,13 @@ order by #{orderBy}
 ;
 
 -- [addPlatformRequire]
-insert into $table$ (id, requireName, requireCode, valueType,
+insert into $table$
+(id, idPlatform, requireName, requireCode, valueType,
 voidFlag, createBy, createTime,
 createTimeLong, updateBy, updateTime,
-updateTimeLong ) values ( #{id}, #{requirename}, #{requirecode}, #{valuetype},
+updateTimeLong )
+values
+( #{id}, #{idplatform}, #{requirename}, #{requirecode}, #{valuetype},
 #{voidflag}, #{createby}, #{createtime},
 #{createtimelong}, #{updateby}, #{updatetime},
 #{updatetimelong} );

+ 1 - 0
ddBusiness/src/main/java/com/dderp/business/dao/PlatformDao.java

@@ -8,6 +8,7 @@ import org.rex.RMap;
 
 import java.util.List;
 
+@SuppressWarnings("rawtypes")
 public interface PlatformDao extends DaoRepository {
 
     @Sharding(databaseShardingStrategy = SupplierDataBaseShardingStrategy.class, tableShardingStrategy = SupplierTableShardingStrategy.class)

+ 130 - 208
ddBusiness/src/main/java/com/dderp/business/service/PlatformServiceImpl.java

@@ -4,13 +4,12 @@ import com.dderp.business.dao.PlatformDao;
 import com.dderp.common.api.NoSqlKeysService;
 import com.dderp.common.api.PlatformService;
 import com.dderp.common.base.BaseService;
-import com.dderp.common.datas.ESKeys;
+import com.dderp.common.datas.RedisKeys;
 import com.dderp.common.datas.business.PlatformType;
 import com.dderp.common.entity.platform.PlatformInfo;
 import com.dderp.common.entity.platform.PlatformRequire;
 import com.dderp.common.entity.site.ERPTokenUser;
-import com.dderp.common.tool.ERPUtils;
-import com.dySweetFishPlugin.elasticsearch.ESClient;
+import com.dySweetFishPlugin.redis.RedisService;
 import com.dySweetFishPlugin.sql.TableIdService;
 import com.dySweetFishPlugin.sql.dao.TunaService;
 import com.sweetfish.convert.json.JsonConvert;
@@ -21,29 +20,21 @@ import com.sweetfish.util.AnyValue;
 import com.sweetfish.util.AutoLoad;
 import com.sweetfish.util.ResourceType;
 import org.apache.commons.lang3.StringUtils;
-import org.elasticsearch.action.DocWriteResponse;
-import org.elasticsearch.action.index.IndexResponse;
-import org.elasticsearch.action.support.WriteRequest;
-import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.index.query.BoolQueryBuilder;
-import org.elasticsearch.index.query.Operator;
-import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.search.sort.SortBuilders;
-import org.elasticsearch.search.sort.SortOrder;
 import org.rex.RMap;
 
 import javax.annotation.Resource;
-import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.List;
-
-import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
+import java.util.Map;
 
 @AutoLoad(value = false)
 @Local
 @ResourceType(PlatformService.class)
 public class PlatformServiceImpl extends BaseService implements PlatformService {
+
     @Resource
-    private ESClient esClient;
+    private RedisService redisService;
 
     @Resource
     private JsonConvert jsonConvert;
@@ -66,60 +57,59 @@ public class PlatformServiceImpl extends BaseService implements PlatformService
     }
 
     @Override
-    public List<PlatformInfo> queryPlatformList(RMap params, PageFlipper pageFlipper, long supplierCode) {
-        List<PlatformInfo> platformInfoList = searchESList(esClient, jsonConvert,
-                PlatformInfo.class,
-                null,
-                ((sd) -> {
-                    BoolQueryBuilder qb = QueryBuilders.boolQuery();
-                    qb = qb.must(QueryBuilders.typeQuery(ESKeys.ES_DELIVER_PLATFORM_INFO_TYPE));
-
-                    if (ERPUtils.mapContainKey(params, "platformType")) {
-                        qb = qb.must(QueryBuilders.termQuery("platformType", params.getInt("platformType")));
-                    }
-
-                    if (ERPUtils.mapContainKey(params, "platformName")) {
-                        String platformName = params.getString("platformName");
-                        BoolQueryBuilder qbPlatformName = QueryBuilders.boolQuery()
-                                .should(QueryBuilders.matchQuery("platformName", platformName).analyzer("query_ansj").operator(Operator.AND))
-                                .should(QueryBuilders.termQuery("platformName.number", platformName.toLowerCase()))
-                                .should(QueryBuilders.matchQuery("platformName.letter", platformName.toLowerCase()).operator(Operator.AND));
-                        qb = qb.must(qbPlatformName);
-                    }
-
-                    if (ERPUtils.mapContainKey(params, "voidFlag")) {
-                        qb = qb.must(QueryBuilders.termQuery("voidFlag", params.getInt("voidFlag")));
-                    }
-
-                    return qb;
-                }),
-                keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_INFO_INDEX, supplierCode),
-                pageFlipper,
-                (() -> SortBuilders.fieldSort("id").order(SortOrder.DESC)));
-
-        return platformInfoList;
+    @SuppressWarnings({"rawtypes", "unchecked"})
+    public RetResult<List<PlatformInfo>> queryPlatformList(RMap params, PageFlipper pageFlipper, String dataSourceId, long supplierCode) {
+        RMap searchData = new RMap();
+        if (params != null) {
+            searchData.putAll(params);
+        }
+
+        List<PlatformInfo> platformInfoList = platformDao.queryPlatformInfoList(searchData, pageFlipper, dataSourceId, supplierCode);
+        return RetResult.<List<PlatformInfo>>successT().result(platformInfoList).page(pageFlipper);
+
     }
 
     @Override
-    public PlatformInfo getPlatformInfo(long idPlatformInfo, long supplierCode) {
-        return this.getESOneInfo(esClient, jsonConvert,
-                PlatformInfo.class,
-                String.valueOf(idPlatformInfo),
-                keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_INFO_INDEX, supplierCode),
-                ESKeys.ES_DELIVER_PLATFORM_INFO_TYPE,
-                null);
+    public PlatformInfo getPlatformInfo(long idPlatformInfo, boolean withDetail, long supplierCode) {
+        PlatformInfo platformInfo = getRedisDocInfo(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_INFO, supplierCode), String.valueOf(idPlatformInfo), PlatformInfo.class);
+
+        if ((platformInfo != null) && (withDetail)) {
+            String detailKey = keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode, true) + platformInfo.getId();
+            List<PlatformRequire> requireList = getRedisDocInfos(detailKey, PlatformRequire.class);
+            requireList.sort(Comparator.comparingLong(PlatformRequire::getId));
+            platformInfo.setRequireList(requireList);
+        }
+        return platformInfo;
     }
 
-    @Override
-    public PlatformInfo getPlatformInfoByCode(String platformCode, long supplierCode) {
-        return this.getESOneInfo(esClient, jsonConvert,
-                PlatformInfo.class,
-                (a) -> {
-                    return QueryBuilders.boolQuery().must(QueryBuilders.typeQuery(ESKeys.ES_DELIVER_PLATFORM_INFO_TYPE))
-                            .must(QueryBuilders.termQuery("platformCode.raw", platformCode));
-                },
-                keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_INFO_INDEX, supplierCode),
-                null);
+    public PlatformInfo getPlatformInfoByCode(String platformCode, boolean withDetail, long supplierCode) {
+        Map<String, String> platformMap = redisService.hgetAll(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_INFO, supplierCode));
+
+        for (String v : platformMap.values()) {
+            PlatformInfo platformInfo = jsonConvert.convertFrom(PlatformInfo.class, v);
+            if (platformCode.equalsIgnoreCase(platformInfo.getPlatformCode())) {
+                if (withDetail) {
+                    String detailKey = keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode, true) + platformInfo.getId();
+                    List<PlatformRequire> requireList = getRedisDocInfos(detailKey, PlatformRequire.class);
+                    requireList.sort(Comparator.comparingLong(PlatformRequire::getId));
+                    platformInfo.setRequireList(requireList);
+                }
+                return platformInfo;
+            }
+        }
+        return null;
+    }
+
+    private PlatformInfo getPlatformInfoByName(String platformName, long supplierCode) {
+        Map<String, String> platformMap = redisService.hgetAll(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_INFO, supplierCode));
+
+        for (String v : platformMap.values()) {
+            PlatformInfo platformInfo = jsonConvert.convertFrom(PlatformInfo.class, v);
+            if (platformName.equalsIgnoreCase(platformInfo.getPlatformName())) {
+                return platformInfo;
+            }
+        }
+        return null;
     }
 
     @Override
@@ -130,76 +120,49 @@ public class PlatformServiceImpl extends BaseService implements PlatformService
         if (StringUtils.isBlank(platformInfo.getPlatformCode()))
             return RetResult.<PlatformInfo>errorT().retinfo("平台编号不可为空");
 
+        if (StringUtils.isEmpty(platformInfo.getPlatformCode())) {
+            return RetResult.<PlatformInfo>errorT().retinfo("请选择平台编号");
+        }
+
         if (PlatformType.getName(platformInfo.getPlatformType()) == null)
             return RetResult.<PlatformInfo>errorT().retinfo("平台类型非法");
 
         //先查一下有没有重名的平台信息
-        PlatformInfo esInfo = this.getESOneInfo(esClient, jsonConvert,
-                PlatformInfo.class,
-                (a) -> {
-                    BoolQueryBuilder qb = QueryBuilders.boolQuery().must(QueryBuilders.typeQuery(ESKeys.ES_DELIVER_PLATFORM_INFO_TYPE));
-                    qb.must(QueryBuilders.termQuery("platformName.raw", platformInfo.getPlatformName()));
-                    qb.must(QueryBuilders.termQuery("platformType", platformInfo.getPlatformType()));
-
-                    return qb;
-                },
-                keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_INFO_INDEX, supplierCode),
-                null);
-
+        PlatformInfo esInfo = getPlatformInfoByName(platformInfo.getPlatformName(), supplierCode);
         if (esInfo != null) return RetResult.<PlatformInfo>errorT().retinfo("已存在同名的平台");
 
-        esInfo = this.getPlatformInfoByCode(platformInfo.getPlatformCode(), supplierCode);
+        esInfo = this.getPlatformInfoByCode(platformInfo.getPlatformCode(), false, supplierCode);
         if (esInfo != null) return RetResult.<PlatformInfo>errorT().retinfo("已存在同编号的平台");
 
         platformInfo.setId(tableIdService.getTableIdMulti("tbPlatformInfo.id", 1, dataSourceId, String.valueOf(supplierCode)));
         //前端传进来的是平台需求的list,由于获取平台信息的时候几乎必带需求信息而且一般不会很多,所以不做子表直接序列化进主表
-        platformInfo.setRequireListSerial(jsonConvert.convertTo(platformInfo.getRequireList()));
+        platformInfo.setRequireList(null);
         PlatformInfo.create(platformInfo, currentUser.getId());
 
-        IndexResponse itemResponse = esClient.getClient()
-                .prepareIndex(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_INFO_INDEX, supplierCode), ESKeys.ES_DELIVER_PLATFORM_INFO_TYPE)
-                .setId(String.valueOf(platformInfo.getId()))
-                .setSource(jsonConvert.convertTo(platformInfo), XContentType.JSON)
-                .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
-                .get();
-
-        if (itemResponse.getResult() == DocWriteResponse.Result.CREATED) {
-            platformDao.addPlatformInfo(platformInfo, dataSourceId, supplierCode);
-        } else {
-            return RetResult.<PlatformInfo>errorT().retinfo("创建平台档案失败");
-        }
+        redisService.hset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_INFO, supplierCode), String.valueOf(platformInfo.getId()), jsonConvert.convertTo(platformInfo));
+
+        platformDao.addPlatformInfo(platformInfo, dataSourceId, supplierCode);
+
 
-        return RetResult.<PlatformInfo>successT().result(platformInfo);
+        return RetResult.successT();
 
     }
 
     @Override
     public RetResult<PlatformInfo> updatePlatformInfo(PlatformInfo platformInfo, ERPTokenUser currentUser, String dataSourceId, long supplierCode) {
-        PlatformInfo esInfo = this.getPlatformInfo(platformInfo.getId(), supplierCode);
+        PlatformInfo esInfo = this.getPlatformInfo(platformInfo.getId(), false, supplierCode);
         if (esInfo == null)
             return RetResult.<PlatformInfo>errorT().retinfo("平台信息不存在");
 
+        esInfo.setPlatformCode(platformInfo.getPlatformCode());
         esInfo.setPlatformName(platformInfo.getPlatformName());
         esInfo.setPlatformType(platformInfo.getPlatformType());
-        esInfo.setRequireListSerial(jsonConvert.convertTo(platformInfo.getRequireList()));
+        esInfo.setRequireList(null);
+
 
         PlatformInfo.update(esInfo, currentUser.getId());
-        try {
-            esClient.getClient().prepareUpdate(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_INFO_INDEX, supplierCode),
-                            ESKeys.ES_DELIVER_PLATFORM_INFO_TYPE, String.valueOf(esInfo.getId()))
-                    .setDoc(jsonBuilder()
-                            .startObject()
-                            .field("platformName", esInfo.getPlatformName())
-                            .field("platformType", esInfo.getPlatformType())
-                            .field("requireListSerial", esInfo.getRequireListSerial())
-                            .field("updateBy", esInfo.getUpdateBy())
-                            .field("updateTimeLong", esInfo.getUpdateTimeLong())
-                            .endObject())
-                    .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
-                    .get();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
+
+        redisService.hset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_INFO, supplierCode), String.valueOf(esInfo.getId()), jsonConvert.convertTo(esInfo));
 
         platformDao.updatePlatformInfo(esInfo, dataSourceId, supplierCode);
 
@@ -208,27 +171,14 @@ public class PlatformServiceImpl extends BaseService implements PlatformService
 
     @Override
     public RetResult<PlatformInfo> voidPlatformInfo(PlatformInfo platformInfo, ERPTokenUser currentUser, String dataSourceId, long supplierCode) {
-        PlatformInfo esInfo = this.getPlatformInfo(platformInfo.getId(), supplierCode);
+        PlatformInfo esInfo = this.getPlatformInfo(platformInfo.getId(), false, supplierCode);
         if (esInfo == null)
             return RetResult.<PlatformInfo>errorT().retinfo("平台信息不存在");
 
         esInfo.setVoidFlag(platformInfo.getVoidFlag());
-
         PlatformInfo.update(esInfo, currentUser.getId());
-        try {
-            esClient.getClient().prepareUpdate(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_INFO_INDEX, supplierCode),
-                            ESKeys.ES_DELIVER_PLATFORM_INFO_TYPE, String.valueOf(esInfo.getId()))
-                    .setDoc(jsonBuilder()
-                            .startObject()
-                            .field("voidFlag", esInfo.getVoidFlag())
-                            .field("updateBy", esInfo.getUpdateBy())
-                            .field("updateTimeLong", esInfo.getUpdateTimeLong())
-                            .endObject())
-                    .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
-                    .get();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
+
+        redisService.hset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_INFO, supplierCode), String.valueOf(esInfo.getId()), jsonConvert.convertTo(esInfo));
 
         platformDao.voidPlatformInfo(esInfo, dataSourceId, supplierCode);
 
@@ -236,71 +186,66 @@ public class PlatformServiceImpl extends BaseService implements PlatformService
     }
 
     @Override
-    public List<PlatformRequire> queryPlatformRequireList(RMap params, PageFlipper pageFlipper, long supplierCode) {
-        return this.searchESList(esClient, jsonConvert, PlatformRequire.class,
-                params,
-                (a) -> {
-                    BoolQueryBuilder qb = QueryBuilders.boolQuery().must(QueryBuilders.typeQuery(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_TYPE));
-
-                    if (ERPUtils.mapContainKey(params, "requireName")) {
-                        String requireName = params.getString("requireName");
-                        BoolQueryBuilder qbRequireName = QueryBuilders.boolQuery()
-                                .should(QueryBuilders.matchQuery("requireName", requireName).analyzer("query_ansj").operator(Operator.AND))
-                                .should(QueryBuilders.termQuery("requireName.number", requireName.toLowerCase()))
-                                .should(QueryBuilders.matchQuery("requireName.letter", requireName.toLowerCase()).operator(Operator.AND));
-                        qb = qb.must(qbRequireName);
-                    }
-
-                    return qb;
-                },
-                keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_INDEX, supplierCode),
-                (() -> SortBuilders.fieldSort("id").order(SortOrder.DESC)));
+    @SuppressWarnings({"rawtypes", "unchecked"})
+    public RetResult<List<PlatformRequire>> queryPlatformRequireList(RMap params, PageFlipper pageFlipper, String dataSourceId, long supplierCode) {
+        RMap searchData = new RMap();
+        if (params != null) {
+            searchData.putAll(params);
+        }
+
+        List<PlatformRequire> requireList = platformDao.queryPlatformRequireList(searchData, pageFlipper, dataSourceId, supplierCode);
+        return RetResult.<List<PlatformRequire>>successT().result(requireList).page(pageFlipper);
+    }
+
+    public RetResult<List<PlatformRequire>> selectPlatformRequireList(long idPlatform, long supplierCode) {
+
+        Map<String, String> platformRequireMap = redisService.hgetAll(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode, true) + idPlatform);
+        List<PlatformRequire> dataList = new ArrayList<>();
+        platformRequireMap.forEach((k, v) -> {
+            PlatformRequire data = jsonConvert.convertFrom(PlatformRequire.class, v);
+
+            if (data.getVoidFlag() == 0) {
+                dataList.add(data);
+            }
+        });
+
+        //排序
+        dataList.sort(Comparator.comparingLong(PlatformRequire::getId));
+
+        return RetResult.<List<PlatformRequire>>successT().result(dataList);
+
     }
 
     @Override
-    public PlatformRequire getPlatformRequire(long id, long supplierCode) {
-        return this.getESOneInfo(esClient, jsonConvert, PlatformRequire.class, String.valueOf(id),
-                keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_INDEX, supplierCode),
-                ESKeys.ES_DELIVER_PLATFORM_REQUIRE_TYPE, null);
+    public PlatformRequire getPlatformRequire(long idPlatform, long id, long supplierCode) {
+        String key = keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode, true) + idPlatform;
+        return getRedisDocInfo(key, String.valueOf(id), PlatformRequire.class);
     }
 
     @Override
     public RetResult<PlatformRequire> addPlatformRequire(PlatformRequire platformRequire, ERPTokenUser currentUser, String dataSourceId, long supplierCode) {
-        PlatformRequire esInfo = this.getESOneInfo(esClient, jsonConvert,
-                PlatformRequire.class,
-                (a) -> {
-                    BoolQueryBuilder qb = QueryBuilders.boolQuery().must(QueryBuilders.typeQuery(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_TYPE));
-                    qb.must(QueryBuilders.termQuery("requireCode.raw", platformRequire.getRequireCode()));
-
-                    return qb;
-                },
-                keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_INDEX, supplierCode),
-                null);
-
-        if (esInfo != null) return RetResult.<PlatformRequire>errorT().retinfo("已存在相同CODE的平台接入需求档案");
+        if (platformRequire.getIdPlatform() <= 0L) {
+            return RetResult.<PlatformRequire>errorT().retinfo("请设置需求属性的平台id");
+        }
 
         platformRequire.setId(tableIdService.getTableIdMulti("tbPlatformRequire.id", 1, dataSourceId, String.valueOf(supplierCode)));
+        platformRequire.setVoidFlag(0);
         PlatformRequire.create(platformRequire, currentUser.getId());
 
-        IndexResponse itemResponse = esClient.getClient()
-                .prepareIndex(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_INDEX, supplierCode), ESKeys.ES_DELIVER_PLATFORM_REQUIRE_TYPE)
-                .setId(String.valueOf(platformRequire.getId()))
-                .setSource(jsonConvert.convertTo(platformRequire), XContentType.JSON)
-                .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
-                .get();
-
-        if (itemResponse.getResult() == DocWriteResponse.Result.CREATED) {
-            platformDao.addPlatformRequire(platformRequire, dataSourceId, supplierCode);
-        } else {
-            return RetResult.<PlatformRequire>errorT().retinfo("创建平台接入需求档案失败");
-        }
+        redisService.hset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode, true) + platformRequire.getIdPlatform(), String.valueOf(platformRequire.getId()), jsonConvert.convertTo(platformRequire));
+
+        platformDao.addPlatformRequire(platformRequire, dataSourceId, supplierCode);
 
-        return RetResult.<PlatformRequire>successT().result(platformRequire);
+        return RetResult.successT();
     }
 
     @Override
     public RetResult<PlatformRequire> updatePlatformRequire(PlatformRequire platformRequire, ERPTokenUser currentUser, String dataSourceId, long supplierCode) {
-        PlatformRequire esInfo = this.getPlatformRequire(platformRequire.getId(), supplierCode);
+        if (platformRequire.getIdPlatform() <= 0L) {
+            return RetResult.<PlatformRequire>errorT().retinfo("请设置需求属性的平台id");
+        }
+
+        PlatformRequire esInfo = this.getPlatformRequire(platformRequire.getIdPlatform(), platformRequire.getId(), supplierCode);
         if (esInfo == null)
             return RetResult.<PlatformRequire>errorT().retinfo("平台接入需求档案不存在");
 
@@ -308,52 +253,29 @@ public class PlatformServiceImpl extends BaseService implements PlatformService
         esInfo.setValueType(platformRequire.getValueType());
 
         PlatformRequire.update(esInfo, currentUser.getId());
-        try {
-            esClient.getClient().prepareUpdate(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_INDEX, supplierCode),
-                            ESKeys.ES_DELIVER_PLATFORM_REQUIRE_TYPE, String.valueOf(esInfo.getId()))
-                    .setDoc(jsonBuilder()
-                            .startObject()
-                            .field("requireName", esInfo.getRequireName())
-                            .field("valueType", esInfo.getValueType())
-                            .field("updateBy", esInfo.getUpdateBy())
-                            .field("updateTimeLong", esInfo.getUpdateTimeLong())
-                            .endObject())
-                    .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
-                    .get();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
 
+        redisService.hset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode, true) + esInfo.getIdPlatform(), String.valueOf(esInfo.getId()), jsonConvert.convertTo(esInfo));
         platformDao.updatePlatformRequire(esInfo, dataSourceId, supplierCode);
 
-        return RetResult.<PlatformRequire>successT().result(esInfo);
+        return RetResult.successT();
     }
 
     @Override
     public RetResult<PlatformRequire> voidPlatformRequire(PlatformRequire platformRequire, ERPTokenUser currentUser, String dataSourceId, long supplierCode) {
-        PlatformRequire esInfo = this.getPlatformRequire(platformRequire.getId(), supplierCode);
+        if (platformRequire.getIdPlatform() <= 0L) {
+            return RetResult.<PlatformRequire>errorT().retinfo("请设置需求属性的平台id");
+        }
+
+        PlatformRequire esInfo = this.getPlatformRequire(platformRequire.getIdPlatform(), platformRequire.getId(), supplierCode);
         if (esInfo == null)
             return RetResult.<PlatformRequire>errorT().retinfo("平台接入需求档案不存在");
 
         esInfo.setVoidFlag(platformRequire.getVoidFlag());
-
         PlatformInfo.update(esInfo, currentUser.getId());
-        try {
-            esClient.getClient().prepareUpdate(keysService.getESKey(ESKeys.ES_DELIVER_PLATFORM_REQUIRE_INDEX, supplierCode),
-                            ESKeys.ES_DELIVER_PLATFORM_REQUIRE_TYPE, String.valueOf(esInfo.getId()))
-                    .setDoc(jsonBuilder()
-                            .startObject()
-                            .field("voidFlag", esInfo.getVoidFlag())
-                            .field("updateBy", esInfo.getUpdateBy())
-                            .field("updateTimeLong", esInfo.getUpdateTimeLong())
-                            .endObject())
-                    .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
-                    .get();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
+
+        redisService.hset(keysService.getRedisKey(RedisKeys.KEY_DELIVER_PLATFORM_REQUIRE, supplierCode, true) + esInfo.getIdPlatform(), String.valueOf(esInfo.getId()), jsonConvert.convertTo(esInfo));
 
         platformDao.voidPlatformRequire(esInfo, dataSourceId, supplierCode);
-        return RetResult.<PlatformRequire>successT().result(esInfo);
+        return RetResult.successT();
     }
 }

+ 10 - 5
ddCommon/src/main/java/com/dderp/common/api/PlatformService.java

@@ -13,11 +13,13 @@ import java.util.List;
 @AutoLoad(value = false)
 public interface PlatformService extends ScriptService {
     //region 平台档案
-    List<PlatformInfo> queryPlatformList(RMap params, PageFlipper pageFlipper, long supplierCode);
 
-    PlatformInfo getPlatformInfo(long idPlatformInfo, long supplierCode);
+    @SuppressWarnings("rawtypes")
+    RetResult<List<PlatformInfo>> queryPlatformList(RMap params, PageFlipper pageFlipper, String dataSourceId, long supplierCode);
 
-    PlatformInfo getPlatformInfoByCode(String platformCode, long supplierCode);
+    PlatformInfo getPlatformInfo(long idPlatformInfo, boolean withDetail, long supplierCode);
+
+    PlatformInfo getPlatformInfoByCode(String platformCode, boolean withDetail, long supplierCode);
 
     RetResult<PlatformInfo> addPlatformInfo(PlatformInfo platformInfo, ERPTokenUser currentUser, String dataSourceId, long supplierCode);
 
@@ -25,9 +27,12 @@ public interface PlatformService extends ScriptService {
 
     RetResult<PlatformInfo> voidPlatformInfo(PlatformInfo platformInfo, ERPTokenUser currentUser, String dataSourceId, long supplierCode);
 
-    List<PlatformRequire> queryPlatformRequireList(RMap params, PageFlipper pageFlipper, long supplierCode);
+    @SuppressWarnings("rawtypes")
+    RetResult<List<PlatformRequire>> queryPlatformRequireList(RMap params, PageFlipper pageFlipper, String dataSourceId, long supplierCode);
+
+    RetResult<List<PlatformRequire>> selectPlatformRequireList(long idPlatform, long supplierCode);
 
-    PlatformRequire getPlatformRequire(long id, long supplierCode);
+    PlatformRequire getPlatformRequire(long idPlatform, long id, long supplierCode);
 
     RetResult<PlatformRequire> addPlatformRequire(PlatformRequire platformRequire, ERPTokenUser currentUser, String dataSourceId, long supplierCode);
 

+ 15 - 0
ddCommon/src/main/java/com/dderp/common/entity/platform/PlatformRequire.java

@@ -14,6 +14,13 @@ public class PlatformRequire extends BaseEntity {
     @ApiPlace("/platform/voidPlatformRequire")
     private long id;
 
+    @RColumn("idplatform")
+    @ApiPlace("/platform/getPlatformRequire")
+    @ApiPlace("/platform/addPlatformRequire")
+    @ApiPlace("/platform/updatePlatformRequire")
+    @ApiPlace("/platform/voidPlatformRequire")
+    private long idPlatform;
+
     @RColumn("requirename")
     @Comment("接入需求的显示名称")
     @ApiPlace("/platform/addPlatformRequire")
@@ -44,6 +51,14 @@ public class PlatformRequire extends BaseEntity {
         this.id = id;
     }
 
+    public long getIdPlatform() {
+        return idPlatform;
+    }
+
+    public void setIdPlatform(long idPlatform) {
+        this.idPlatform = idPlatform;
+    }
+
     public String getRequireName() {
         return requireName;
     }

+ 5 - 0
ddWebCore/src/main/java/com/dderp/webcore/rest/AdminRest.java

@@ -4,6 +4,7 @@ import com.dderp.common.api.DocInfoService;
 import com.dderp.common.api.SystemService;
 import com.dderp.common.api.flycat.ExpressOutService;
 import com.dderp.common.api.flycat.OrderSearchService;
+import com.dderp.common.api.flycat.OrderService;
 import com.dderp.common.base.BaseService;
 import com.dderp.common.datas.ERPHeader;
 import com.dderp.common.datas.ERPModule;
@@ -54,6 +55,9 @@ public class AdminRest extends BaseService {
     ExpressOutService expressOutService;
 
     @Resource
+    OrderService orderService;
+
+    @Resource
     OrderSearchService orderSearchService;
 
     @Resource
@@ -176,6 +180,7 @@ public class AdminRest extends BaseService {
                             systemService.getLoadedScriptCache(dataSourceId, Long.parseLong(supplierCode)),
                             docInfoService.getLoadedScriptCache(dataSourceId, Long.parseLong(supplierCode)),
                             expressOutService.getLoadedScriptCache(dataSourceId, Long.parseLong(supplierCode)),
+                            orderService.getLoadedScriptCache(dataSourceId, Long.parseLong(supplierCode)),
                             orderSearchService.getLoadedScriptCache(dataSourceId, Long.parseLong(supplierCode))
                     ).forEach(scriptList::addAll);
 

+ 17 - 9
ddWebCore/src/main/java/com/dderp/webcore/rest/PlatformRest.java

@@ -22,7 +22,8 @@ import java.util.concurrent.CompletableFuture;
 
 @AutoLoad(false)
 @Local
-@RestService(name = "platform", moduleid = 0, comment = "平台档案模块")
+@RestService(name = "platform", comment = "平台档案模块")
+@SuppressWarnings({"rawtypes", "unused"})
 public class PlatformRest extends BaseService {
     @Resource
     private PlatformService platformService;
@@ -37,8 +38,11 @@ public class PlatformRest extends BaseService {
             @RestHeader(name = ERPHeader.HTTPHEADER_SUPPLIER) String supplierCode) {
         return CompletableFuture.supplyAsync(
                 () -> {
-                    List<PlatformInfo> platformInfoList = platformService.queryPlatformList(searchData, pageFlipper, Long.parseLong(supplierCode));
-                    return RMapUtils.successV2(platformInfoList, null, pageFlipper);
+                    RetResult<List<PlatformInfo>> result = platformService.queryPlatformList(searchData, pageFlipper, dataSourceId, Long.parseLong(supplierCode));
+                    if (result.isSuccess()) {
+                        return RMapUtils.successV2(result.getResult(), null, result.getPageFlipper());
+                    }
+                    return RMapUtils.error(HttpCode.BAD_REQUEST.value(), result.getRetinfo());
                 }, getExecutor()
         );
     }
@@ -51,7 +55,7 @@ public class PlatformRest extends BaseService {
             @RestHeader(name = ERPHeader.HTTPHEADER_SUPPLIER) String supplierCode) {
         return CompletableFuture.supplyAsync(
                 () -> {
-                    PlatformInfo platformInfo = platformService.getPlatformInfo(idPlatform, Long.parseLong(supplierCode));
+                    PlatformInfo platformInfo = platformService.getPlatformInfo(idPlatform, false, Long.parseLong(supplierCode));
                     if (platformInfo == null) return RMapUtils.error(HttpCode.BAD_REQUEST.value(), "平台档案不存在");
                     return RMapUtils.successV2(platformInfo, null, null);
                 }, getExecutor()
@@ -69,7 +73,7 @@ public class PlatformRest extends BaseService {
                 () -> {
                     RetResult<PlatformInfo> result = platformService.addPlatformInfo(platformInfo, currentUser, dataSourceId, Long.parseLong(supplierCode));
                     if (!result.isSuccess()) return RMapUtils.error(HttpCode.BAD_REQUEST.value(), result.getRetinfo());
-                    return RMapUtils.successV2(result.getResult(), null, null);
+                    return RMapUtils.success();
                 }, getExecutor()
         );
     }
@@ -119,8 +123,11 @@ public class PlatformRest extends BaseService {
             @RestHeader(name = ERPHeader.HTTPHEADER_SUPPLIER) String supplierCode) {
         return CompletableFuture.supplyAsync(
                 () -> {
-                    List<PlatformRequire> platformRequireList = platformService.queryPlatformRequireList(searchData, pageFlipper, Long.parseLong(supplierCode));
-                    return RMapUtils.successV2(platformRequireList, null, pageFlipper);
+                    RetResult<List<PlatformRequire>> result = platformService.queryPlatformRequireList(searchData, pageFlipper, dataSourceId, Long.parseLong(supplierCode));
+                    if (result.isSuccess()) {
+                        return RMapUtils.successV2(result.getResult(), null, result.getPageFlipper());
+                    }
+                    return RMapUtils.error(HttpCode.BAD_REQUEST.value(), result.getRetinfo());
                 }, getExecutor()
         );
     }
@@ -128,12 +135,13 @@ public class PlatformRest extends BaseService {
     @RestMapping(name = "getPlatformRequire", auth = true, sort = 11, comment = "获取平台需求条件档案", methods = {"GET", "POST"})
     @WebApiBean(result = true, type = PlatformRequire.class)
     public CompletableFuture<RMap> getPlatformRequire(
-            @RestParam(name = "idRequire", comment = "平台档案id") long idRequire,
+            @RestParam(name = "idPlatform", comment = "平台档案id") long idPlatform,
+            @RestParam(name = "idRequire", comment = "平台需求档案id") long idRequire,
             @RestHeader(name = ERPHeader.HTTPHEADER_DATASOURCE) String dataSourceId,
             @RestHeader(name = ERPHeader.HTTPHEADER_SUPPLIER) String supplierCode) {
         return CompletableFuture.supplyAsync(
                 () -> {
-                    PlatformRequire platformRequire = platformService.getPlatformRequire(idRequire, Long.parseLong(supplierCode));
+                    PlatformRequire platformRequire = platformService.getPlatformRequire(idPlatform, idRequire, Long.parseLong(supplierCode));
                     if (platformRequire == null)
                         return RMapUtils.error(HttpCode.BAD_REQUEST.value(), "平台需求条件档案不存在");
                     return RMapUtils.successV2(platformRequire, null, null);

+ 1 - 1
ddWebCore/src/main/java/com/dderp/webcore/rest/flycat/ExpressOutRest.java

@@ -40,7 +40,7 @@ public class ExpressOutRest extends BaseService {
         );
     }
 
-    @RestMapping(name = "callExpress", auth = false, sort = 1, logging = 4, comment = "配送快递接口", methods = {"POST"})
+    @RestMapping(name = "callExpress", auth = true, sort = 1, logging = 4, comment = "配送快递接口", methods = {"POST"})
     public CompletableFuture<InvokeCallResult> callExpress(
             @RestBody(comment = "提交数据") InvokeCallParams callParams,
             @RestParam(name = "&", comment = "登录用户,无需传入") ERPTokenUser currentUser,