|
|
|
@ -1,18 +1,55 @@
|
|
|
|
|
package com.ms.api.service.impl;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.*;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.AfterSaleDetailData;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.AfterSaleInfo;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.AfterSaleShopRemarksItem;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.ArbitrateInfo;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.Exchange;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.LogisticsInfo;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.OrderInfo;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.PriceProtectionDetail;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.Resend;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.Return;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.SkuOrderInfosItem;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.data.ValueAddedServicesItem;
|
|
|
|
|
import com.doudian.open.api.afterSale_Detail.param.AfterSaleDetailParam;
|
|
|
|
|
import com.ms.api.common.ApiResult;
|
|
|
|
|
import com.ms.api.consts.*;
|
|
|
|
|
import com.ms.api.consts.AfterSaleConst;
|
|
|
|
|
import com.ms.api.consts.LogisticsConst;
|
|
|
|
|
import com.ms.api.consts.RedisKeyConst;
|
|
|
|
|
import com.ms.api.consts.StatusConst;
|
|
|
|
|
import com.ms.api.consts.TblConst;
|
|
|
|
|
import com.ms.api.service.AfterSaleService;
|
|
|
|
|
import com.ms.api.tool.CommonTool;
|
|
|
|
|
import com.ms.api.util.DdRequestUtil;
|
|
|
|
|
import com.ms.dal.entity.*;
|
|
|
|
|
import com.ms.dal.mapper.*;
|
|
|
|
|
import com.ms.dal.entity.AfterSale;
|
|
|
|
|
import com.ms.dal.entity.AfterSaleExchangeSkuInfo;
|
|
|
|
|
import com.ms.dal.entity.AfterSalePriceProtectionDetail;
|
|
|
|
|
import com.ms.dal.entity.AfterSaleRsyncQueue;
|
|
|
|
|
import com.ms.dal.entity.AftersaleArbitrate;
|
|
|
|
|
import com.ms.dal.entity.DdAftersaleMsg;
|
|
|
|
|
import com.ms.dal.entity.Shop;
|
|
|
|
|
import com.ms.dal.mapper.AfterSaleExchangeSkuInfoMapper;
|
|
|
|
|
import com.ms.dal.mapper.AfterSaleMapper;
|
|
|
|
|
import com.ms.dal.mapper.AfterSalePriceProtectionDetailMapper;
|
|
|
|
|
import com.ms.dal.mapper.AfterSaleRsyncQueueMapper;
|
|
|
|
|
import com.ms.dal.mapper.AftersaleArbitrateMapper;
|
|
|
|
|
import com.ms.dal.mapper.DdAftersaleMsgMapper;
|
|
|
|
|
import com.ms.dal.mapper.ShopMapper;
|
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
@ -21,10 +58,6 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
@ -215,6 +248,22 @@ public class AfterSaleServiceImpl implements AfterSaleService {
|
|
|
|
|
}
|
|
|
|
|
if (ObjectUtil.isNotNull(aftersaleUpdateData)) {
|
|
|
|
|
aftersaleUpdateData.setGmtCreate(new Date());
|
|
|
|
|
aftersaleUpdateData.setApplyRemark(StrUtil.isNotBlank(aftersaleUpdateData.getApplyRemark()) ? aftersaleUpdateData.getRejectRemark() : "");
|
|
|
|
|
aftersaleUpdateData.setReason(StrUtil.isNotBlank(aftersaleUpdateData.getReason()) ? aftersaleUpdateData.getReason() : "");
|
|
|
|
|
aftersaleUpdateData.setSellerOrderRemark(StrUtil.isNotBlank(aftersaleUpdateData.getSellerOrderRemark()) ? aftersaleUpdateData.getSellerOrderRemark() : "");
|
|
|
|
|
aftersaleUpdateData.setTypeDesc(StrUtil.isNotBlank(aftersaleUpdateData.getTypeDesc()) ? aftersaleUpdateData.getTypeDesc() : "");
|
|
|
|
|
aftersaleUpdateData.setLogisticsCode(StrUtil.isNotBlank(aftersaleUpdateData.getLogisticsCode()) ? aftersaleUpdateData.getLogisticsCode() : "");
|
|
|
|
|
aftersaleUpdateData.setLogisticsName(StrUtil.isNotBlank(aftersaleUpdateData.getLogisticsName()) ? aftersaleUpdateData.getLogisticsName() : "");
|
|
|
|
|
aftersaleUpdateData.setDeadlineType(ObjectUtil.isNotNull(aftersaleUpdateData.getDeadlineType()) ? aftersaleUpdateData.getDeadlineType() : 0);
|
|
|
|
|
aftersaleUpdateData.setExchangeLogisticsCode(StrUtil.isNotBlank(aftersaleUpdateData.getExchangeLogisticsCode()) ? aftersaleUpdateData.getExchangeLogisticsCode() : "");
|
|
|
|
|
aftersaleUpdateData.setExchangeLogisticsName(StrUtil.isNotBlank(aftersaleUpdateData.getExchangeLogisticsName()) ? aftersaleUpdateData.getExchangeLogisticsName() : "");
|
|
|
|
|
|
|
|
|
|
aftersaleUpdateData.setEvidenceOssPath(StrUtil.isNotBlank(aftersaleUpdateData.getEvidenceOssPath()) ? aftersaleUpdateData.getEvidenceOssPath() : "");
|
|
|
|
|
aftersaleUpdateData.setRejectReason(StrUtil.isNotBlank(aftersaleUpdateData.getRejectReason()) ? aftersaleUpdateData.getRejectReason() : "");
|
|
|
|
|
aftersaleUpdateData.setRejectRemark(StrUtil.isNotBlank(aftersaleUpdateData.getRejectRemark()) ? aftersaleUpdateData.getRejectRemark() : "");
|
|
|
|
|
aftersaleUpdateData.setResendLogisticsCode(StrUtil.isNotBlank(aftersaleUpdateData.getResendLogisticsCode()) ? aftersaleUpdateData.getResendLogisticsCode() : "");
|
|
|
|
|
aftersaleUpdateData.setResendLogisticsName(StrUtil.isNotBlank(aftersaleUpdateData.getResendLogisticsName()) ? aftersaleUpdateData.getResendLogisticsName() : "");
|
|
|
|
|
|
|
|
|
|
afterSaleMapper.insert(aftersaleUpdateData);
|
|
|
|
|
}
|
|
|
|
|
return ApiResult.ok();
|
|
|
|
|