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