浏览代码

add:旺店通erp

ct 2 周之前
父节点
当前提交
bafef3afda

+ 0 - 239
fs-common/src/main/java/com/fs/common/config/FSSysConfig.java

@@ -1,239 +0,0 @@
-package com.fs.common.config;
-
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-/**
- * 读取项目相关配置
- *
-
- */
-@Component
-@ConfigurationProperties(prefix = "fs-config")
-public class FSSysConfig
-{
-    //快递鸟
-    String kdnId;
-    String kdnKeyId;
-    String kdnUrl;
-    String kdnSubscribeUrl;
-    String kdnAddressUrl;
-    //腾讯云IM
-    Long sdkAppId;
-    String sdkAppKey;
-    //处方接口
-    String prescribeUrl;
-    String actId;
-    String appId;
-    String manuId;
-    String callbackUrl;
-    //erp接口
-    Integer erpOpen;//是否开启ERP
-    String erpAppKey;
-    String erpSessionKey;
-    String erpSecret;
-    String erpUrl;
-    String erpShopCode;//店铺CODE
-    //支付接口
-    Integer payOpen;//是否开启
-    String payPartnerId;
-    String payKey;
-    String payGateWayUrl;
-    String payNotifyUrl;
-    String refundNotifyUrl;
-
-
-    public String getKdnId() {
-        return kdnId;
-    }
-
-    public void setKdnId(String kdnId) {
-        this.kdnId = kdnId;
-    }
-
-    public String getKdnKeyId() {
-        return kdnKeyId;
-    }
-
-    public void setKdnKeyId(String kdnKeyId) {
-        this.kdnKeyId = kdnKeyId;
-    }
-
-    public String getKdnUrl() {
-        return kdnUrl;
-    }
-
-    public void setKdnUrl(String kdnUrl) {
-        this.kdnUrl = kdnUrl;
-    }
-
-    public String getKdnSubscribeUrl() {
-        return kdnSubscribeUrl;
-    }
-
-    public void setKdnSubscribeUrl(String kdnSubscribeUrl) {
-        this.kdnSubscribeUrl = kdnSubscribeUrl;
-    }
-
-    public String getKdnAddressUrl() {
-        return kdnAddressUrl;
-    }
-
-    public void setKdnAddressUrl(String kdnAddressUrl) {
-        this.kdnAddressUrl = kdnAddressUrl;
-    }
-
-    public Long getSdkAppId() {
-        return sdkAppId;
-    }
-
-    public void setSdkAppId(Long sdkAppId) {
-        this.sdkAppId = sdkAppId;
-    }
-
-    public String getSdkAppKey() {
-        return sdkAppKey;
-    }
-
-    public void setSdkAppKey(String sdkAppKey) {
-        this.sdkAppKey = sdkAppKey;
-    }
-
-    public String getPrescribeUrl() {
-        return prescribeUrl;
-    }
-
-    public void setPrescribeUrl(String prescribeUrl) {
-        this.prescribeUrl = prescribeUrl;
-    }
-
-    public String getActId() {
-        return actId;
-    }
-
-    public void setActId(String actId) {
-        this.actId = actId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-
-    public void setAppId(String appId) {
-        this.appId = appId;
-    }
-
-    public String getManuId() {
-        return manuId;
-    }
-
-    public void setManuId(String manuId) {
-        this.manuId = manuId;
-    }
-
-    public String getCallbackUrl() {
-        return callbackUrl;
-    }
-
-    public void setCallbackUrl(String callbackUrl) {
-        this.callbackUrl = callbackUrl;
-    }
-
-    public Integer getErpOpen() {
-        return erpOpen;
-    }
-
-    public void setErpOpen(Integer erpOpen) {
-        this.erpOpen = erpOpen;
-    }
-
-    public String getErpAppKey() {
-        return erpAppKey;
-    }
-
-    public void setErpAppKey(String erpAppKey) {
-        this.erpAppKey = erpAppKey;
-    }
-
-    public String getErpSessionKey() {
-        return erpSessionKey;
-    }
-
-    public void setErpSessionKey(String erpSessionKey) {
-        this.erpSessionKey = erpSessionKey;
-    }
-
-    public String getErpSecret() {
-        return erpSecret;
-    }
-
-    public void setErpSecret(String erpSecret) {
-        this.erpSecret = erpSecret;
-    }
-
-    public String getErpUrl() {
-        return erpUrl;
-    }
-
-    public void setErpUrl(String erpUrl) {
-        this.erpUrl = erpUrl;
-    }
-
-    public String getErpShopCode() {
-        return erpShopCode;
-    }
-
-    public void setErpShopCode(String erpShopCode) {
-        this.erpShopCode = erpShopCode;
-    }
-
-    public Integer getPayOpen() {
-        return payOpen;
-    }
-
-    public void setPayOpen(Integer payOpen) {
-        this.payOpen = payOpen;
-    }
-
-    public String getPayPartnerId() {
-        return payPartnerId;
-    }
-
-    public void setPayPartnerId(String payPartnerId) {
-        this.payPartnerId = payPartnerId;
-    }
-
-    public String getPayKey() {
-        return payKey;
-    }
-
-    public void setPayKey(String payKey) {
-        this.payKey = payKey;
-    }
-
-    public String getPayGateWayUrl() {
-        return payGateWayUrl;
-    }
-
-    public void setPayGateWayUrl(String payGateWayUrl) {
-        this.payGateWayUrl = payGateWayUrl;
-    }
-
-    public String getPayNotifyUrl() {
-        return payNotifyUrl;
-    }
-
-    public void setPayNotifyUrl(String payNotifyUrl) {
-        this.payNotifyUrl = payNotifyUrl;
-    }
-
-    public String getRefundNotifyUrl() {
-        return refundNotifyUrl;
-    }
-
-    public void setRefundNotifyUrl(String refundNotifyUrl) {
-        this.refundNotifyUrl = refundNotifyUrl;
-    }
-}

+ 17 - 4
fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderServiceImpl.java

@@ -6,7 +6,6 @@ import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONArray;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSON;
-import com.fs.common.config.FSSysConfig;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.exception.CustomException;
@@ -238,8 +237,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
     @Autowired
     private QwUserServiceImpl qwUserServiceImpl;
     @Autowired
-    private FSSysConfig sysConfig;
-    @Autowired
     private IFsStoreProductGroupService storeProductGroupService;
 
     /**
@@ -2893,7 +2890,23 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
 //            erpOrder.setShop_code("RunDayWuHan");
 //        }
 //        else{
-        erpOrder.setShop_code(sysConfig.getErpShopCode());
+        //判断是否开启erp
+        FsSysConfig sysConfig = configUtil.getSysConfig();
+        Integer erpOpen = sysConfig.getErpOpen();
+        if (erpOpen != null && erpOpen == 1){
+            //判断erp类型
+            Integer erpType = sysConfig.getErpType();
+            if (erpType != null){
+                if (erpType == 1){
+                    //管易
+                } else if (erpType == 2){
+                    //旺店通
+                    erpOrder.setShop_code(sysConfig.getErpShopCode());
+                }
+
+            }
+        }
+
 //        }
 //      erpOrder.setPost_fee(order.getTotalPostage().doubleValue());
         erpOrder.setSeller_memo(order.getRemark());