采购配置相关

20230922-ljl-fixBug
wangchaoxu 1 year ago
parent f1eae3ddb9
commit 15c72266d8

@ -21,7 +21,6 @@ import com.ms.api.util.PurchaseOrderUtil;
import com.ms.dal.entity.DsAutoPurchaseAgreement; import com.ms.dal.entity.DsAutoPurchaseAgreement;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList; import java.util.ArrayList;
@ -94,10 +93,18 @@ public class SavePurchaseSettingService extends SPIBaseService implements Extens
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("userId", SecurityTool.encodeByAES(String.valueOf(shopId))); params.put("userId", SecurityTool.encodeByAES(String.valueOf(shopId)));
params.put("platform", "ddMicroApp"); params.put("platform", "ddMicroApp");
params.put("isEncryptDsOrder", platformShopSetting.get("isEncryptDsOrder")); if (platformShopSetting.containsKey("isEncryptDsOrder") && platformShopSetting.get("isEncryptDsOrder") != null) {
params.put("encryptDsOrderType", platformShopSetting.get("encryptDsOrderType")); params.put("isEncryptDsOrder", Integer.valueOf(platformShopSetting.get("isEncryptDsOrder").toString()));
params.put("allowDsEncryptOrderSourceSellers", platformShopSetting.get("allowDsEncryptOrderSourceSellers")); }
params.put("isEncryptDsOrderIfSellerSupport", platformShopSetting.get("isEncryptDsOrderIfSellerSupport")); if (platformShopSetting.containsKey("encryptDsOrderType") && platformShopSetting.get("encryptDsOrderType") != null) {
params.put("encryptDsOrderType", platformShopSetting.get("encryptDsOrderType"));
}
if (platformShopSetting.containsKey("allowDsEncryptOrderSourceSellers") && platformShopSetting.get("allowDsEncryptOrderSourceSellers") != null) {
params.put("allowDsEncryptOrderSourceSellers", platformShopSetting.get("allowDsEncryptOrderSourceSellers"));
}
if (platformShopSetting.containsKey("isEncryptDsOrderIfSellerSupport") && platformShopSetting.get("isEncryptDsOrderIfSellerSupport") != null) {
params.put("isEncryptDsOrderIfSellerSupport", Integer.valueOf(platformShopSetting.get("isEncryptDsOrderIfSellerSupport").toString()));
}
Map<String, Object> operateInfo = new HashMap<>(); Map<String, Object> operateInfo = new HashMap<>();
operateInfo.put("userId", SecurityTool.encodeByAES(String.valueOf(shopId))); operateInfo.put("userId", SecurityTool.encodeByAES(String.valueOf(shopId)));
operateInfo.put("ip", ""); // todo: 获取ip operateInfo.put("ip", ""); // todo: 获取ip
@ -126,7 +133,6 @@ public class SavePurchaseSettingService extends SPIBaseService implements Extens
error = true; error = true;
}; };
} }
} catch (Exception e) { } catch (Exception e) {
error = true; error = true;
log.error("1688分销配置保存失败原因" + e.getMessage()); log.error("1688分销配置保存失败原因" + e.getMessage());
@ -140,12 +146,25 @@ public class SavePurchaseSettingService extends SPIBaseService implements Extens
Map<String, Object> dsSettingParams = new HashMap<>(); Map<String, Object> dsSettingParams = new HashMap<>();
dsSettingParams.put("userId", SecurityTool.encodeByAES(String.valueOf(shopId))); dsSettingParams.put("userId", SecurityTool.encodeByAES(String.valueOf(shopId)));
dsSettingParams.put("platform", "ddMicroApp"); dsSettingParams.put("platform", "ddMicroApp");
dsSettingParams.put("isApplyRefundOnPlatformRefundingAndSourceWaitSend", platformShopSetting.get("isApplyRefundOnPlatformRefundingAndSourceWaitSend"));
dsSettingParams.put("isCancelOrderOnPlatformRefundingAndSourceWaitPay", platformShopSetting.get("isCancelOrderOnPlatformRefundingAndSourceWaitPay")); if (platformShopSetting.containsKey("isApplyRefundOnPlatformRefundingAndSourceWaitSend") && platformShopSetting.get("isApplyRefundOnPlatformRefundingAndSourceWaitSend") != null) {
dsSettingParams.put("isApplyRefundOnPlatformRefundEndAndSourceWaitSend", platformShopSetting.get("isApplyRefundOnPlatformRefundEndAndSourceWaitSend")); dsSettingParams.put("isApplyRefundOnPlatformRefundingAndSourceWaitSend", Integer.valueOf(platformShopSetting.get("isApplyRefundOnPlatformRefundingAndSourceWaitSend").toString()));
dsSettingParams.put("isCancelOrderOnPlatformRefundEndAndSourceWaitPay", platformShopSetting.get("isCancelOrderOnPlatformRefundEndAndSourceWaitPay")); }
dsSettingParams.put("refundReason", platformShopSetting.get("refundReason")); if (platformShopSetting.containsKey("isCancelOrderOnPlatformRefundingAndSourceWaitPay") && platformShopSetting.get("isCancelOrderOnPlatformRefundingAndSourceWaitPay") != null) {
dsSettingParams.put("isSaveManualSelectedSku", platformShopSetting.get("isSaveManualSelectedSku")); dsSettingParams.put("isCancelOrderOnPlatformRefundingAndSourceWaitPay", Integer.valueOf(platformShopSetting.get("isCancelOrderOnPlatformRefundingAndSourceWaitPay").toString()));
}
if (platformShopSetting.containsKey("isApplyRefundOnPlatformRefundEndAndSourceWaitSend") && platformShopSetting.get("isApplyRefundOnPlatformRefundEndAndSourceWaitSend") != null) {
dsSettingParams.put("isApplyRefundOnPlatformRefundEndAndSourceWaitSend", Integer.valueOf(platformShopSetting.get("isApplyRefundOnPlatformRefundEndAndSourceWaitSend").toString()));
}
if (platformShopSetting.containsKey("isCancelOrderOnPlatformRefundEndAndSourceWaitPay") && platformShopSetting.get("isCancelOrderOnPlatformRefundEndAndSourceWaitPay") != null) {
dsSettingParams.put("isCancelOrderOnPlatformRefundEndAndSourceWaitPay", Integer.valueOf(platformShopSetting.get("isCancelOrderOnPlatformRefundEndAndSourceWaitPay").toString()));
}
if (platformShopSetting.containsKey("refundReason") && platformShopSetting.get("refundReason") != null) {
dsSettingParams.put("refundReason", platformShopSetting.get("refundReason"));
}
if (platformShopSetting.containsKey("isSaveManualSelectedSku") && platformShopSetting.get("isSaveManualSelectedSku") != null) {
dsSettingParams.put("isSaveManualSelectedSku", Integer.valueOf(platformShopSetting.get("isSaveManualSelectedSku").toString()));
}
dsSettingParams.put("operateSource", platformShopSetting.get("operateSource")); dsSettingParams.put("operateSource", platformShopSetting.get("operateSource"));
Map<String, Object> operateInfo = new HashMap<>(); Map<String, Object> operateInfo = new HashMap<>();
operateInfo.put("userId", shopId); operateInfo.put("userId", shopId);
@ -163,11 +182,10 @@ public class SavePurchaseSettingService extends SPIBaseService implements Extens
log.error("1688分销配置保存失败原因" + e.getMessage()); log.error("1688分销配置保存失败原因" + e.getMessage());
} }
} }
if (error) { if (error) {
return R.ok(Ret.fail("1688分销配置保存失败")); return R.ok(Ret.fail("1688分销配置保存失败"));
} }
return R.ok(Ret.success()); return R.ok(Ret.success());
} }

Loading…
Cancel
Save