This commit is contained in:
Richie 2024-03-10 20:05:38 +08:00
parent f25c466272
commit 13072f069d
18 changed files with 3075 additions and 993 deletions

View File

@ -7,6 +7,15 @@ public class ShopApiParams {
private String apiRequestUrl; private String apiRequestUrl;
private String tokenRequestUrl; private String tokenRequestUrl;
private String serverUrl; private String serverUrl;
private String sellerId;
public String getSellerId() {
return sellerId;
}
public void setSellerId(String sellerId) {
this.sellerId = sellerId;
}
public String getServerUrl() { public String getServerUrl() {
return serverUrl; return serverUrl;

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,9 @@ package com.qihang.jd.controller;
import com.jd.open.api.sdk.DefaultJdClient; import com.jd.open.api.sdk.DefaultJdClient;
import com.jd.open.api.sdk.JdClient; import com.jd.open.api.sdk.JdClient;
import com.jd.open.api.sdk.request.refundapply.PopAfsRefundapplyQuerylistRequest; import com.jd.open.api.sdk.request.refundapply.PopAfsRefundapplyQuerylistRequest;
import com.jd.open.api.sdk.request.shangjiashouhou.AscQueryListRequest;
import com.jd.open.api.sdk.response.refundapply.PopAfsRefundapplyQuerylistResponse; import com.jd.open.api.sdk.response.refundapply.PopAfsRefundapplyQuerylistResponse;
import com.jd.open.api.sdk.response.shangjiashouhou.AscQueryListResponse;
import com.qihang.common.common.ApiResult; import com.qihang.common.common.ApiResult;
import com.qihang.common.common.ResultVoEnum; import com.qihang.common.common.ResultVoEnum;
import com.qihang.common.enums.EnumShopType; import com.qihang.common.enums.EnumShopType;
@ -11,11 +13,15 @@ import com.qihang.common.enums.HttpStatus;
import com.qihang.common.mq.MqMessage; import com.qihang.common.mq.MqMessage;
import com.qihang.common.mq.MqType; import com.qihang.common.mq.MqType;
import com.qihang.common.mq.MqUtils; import com.qihang.common.mq.MqUtils;
import com.qihang.jd.domain.JdOrderAfter;
import com.qihang.jd.domain.JdRefund; import com.qihang.jd.domain.JdRefund;
import com.qihang.jd.domain.SysShopPullLasttime;
import com.qihang.jd.domain.SysShopPullLogs; import com.qihang.jd.domain.SysShopPullLogs;
import com.qihang.jd.openApi.ApiCommon; import com.qihang.jd.openApi.ApiCommon;
import com.qihang.jd.openApi.PullRequest; import com.qihang.jd.openApi.PullRequest;
import com.qihang.jd.service.JdOrderAfterService;
import com.qihang.jd.service.JdRefundService; import com.qihang.jd.service.JdRefundService;
import com.qihang.jd.service.SysShopPullLasttimeService;
import com.qihang.jd.service.SysShopPullLogsService; import com.qihang.jd.service.SysShopPullLogsService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -24,6 +30,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date; import java.util.Date;
@RequestMapping("/refund") @RequestMapping("/refund")
@ -34,9 +43,11 @@ public class RefundApiController {
private final SysShopPullLogsService pullLogsService; private final SysShopPullLogsService pullLogsService;
private final JdRefundService refundService; private final JdRefundService refundService;
private final MqUtils mqUtils; private final MqUtils mqUtils;
private final SysShopPullLasttimeService pullLasttimeService;
private final JdOrderAfterService afterService;
@RequestMapping(value = "/pull_list", method = RequestMethod.POST) @RequestMapping(value = "/pull_refund_list", method = RequestMethod.POST)
public Object pullList(@RequestBody PullRequest params) throws Exception { public Object pullRefundList(@RequestBody PullRequest params) throws Exception {
if (params.getShopId() == null || params.getShopId() <= 0) { if (params.getShopId() == null || params.getShopId() <= 0) {
return ApiResult.build(HttpStatus.PARAMS_ERROR, "参数错误没有店铺Id"); return ApiResult.build(HttpStatus.PARAMS_ERROR, "参数错误没有店铺Id");
} }
@ -72,10 +83,10 @@ public class RefundApiController {
if (result.getCode() == ResultVoEnum.DataExist.getIndex()) { if (result.getCode() == ResultVoEnum.DataExist.getIndex()) {
//已经存在 //已经存在
hasExist++; hasExist++;
mqUtils.sendApiMessage(MqMessage.build(EnumShopType.JD, MqType.REFUND_MESSAGE,item.getId())); // mqUtils.sendApiMessage(MqMessage.build(EnumShopType.JD, MqType.REFUND_MESSAGE,item.getId()));
} else if (result.getCode() == ResultVoEnum.SUCCESS.getIndex()) { } else if (result.getCode() == ResultVoEnum.SUCCESS.getIndex()) {
insertSuccess++; insertSuccess++;
mqUtils.sendApiMessage(MqMessage.build(EnumShopType.JD,MqType.REFUND_MESSAGE,item.getId())); // mqUtils.sendApiMessage(MqMessage.build(EnumShopType.JD,MqType.REFUND_MESSAGE,item.getId()));
} else { } else {
totalError++; totalError++;
} }
@ -93,4 +104,122 @@ public class RefundApiController {
pullLogsService.save(logs); pullLogsService.save(logs);
return response2; return response2;
} }
/**
* 拉取售后数据
* @param params
* @return
* @throws Exception
*/
@RequestMapping(value = "/pull_list", method = RequestMethod.POST)
public Object pullList(@RequestBody PullRequest params) throws Exception {
if (params.getShopId() == null || params.getShopId() <= 0) {
return ApiResult.build(HttpStatus.PARAMS_ERROR, "参数错误没有店铺Id");
}
Date currDateTime = new Date();
long beginTime = System.currentTimeMillis();
var checkResult = apiCommon.checkBefore(params.getShopId());
if (checkResult.getCode() != HttpStatus.SUCCESS) {
return ApiResult.build(checkResult.getCode(), checkResult.getMsg(), checkResult.getData());
}
String accessToken = checkResult.getData().getAccessToken();
String serverUrl = checkResult.getData().getServerUrl();
String appKey = checkResult.getData().getAppKey();
String appSecret = checkResult.getData().getAppSecret();
String sellerId = checkResult.getData().getSellerId();
// 获取最后更新时间
LocalDateTime startTime = null;
LocalDateTime endTime = null;
SysShopPullLasttime lasttime = pullLasttimeService.getLasttimeByShop(params.getShopId(), "REFUND");
if(lasttime == null){
endTime = LocalDateTime.now();
startTime = endTime.minusDays(1);
}else{
startTime = lasttime.getLasttime().minusHours(1);//取上次结束一个小时前
endTime = startTime.plusDays(1);//取24小时
if(endTime.isAfter(LocalDateTime.now())){
endTime = LocalDateTime.now();
}
}
String startTimeStr = startTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
String endTimeStr = endTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
JdClient client = new DefaultJdClient(serverUrl, accessToken, appKey, appSecret);
// https://open.jd.com/home/home/#/doc/api?apiCateId=241&apiId=2136&apiName=jingdong.asc.query.list
AscQueryListRequest request=new AscQueryListRequest();
request.setBuId(sellerId);
request.setOperatePin("testPin");
request.setOperateNick("testPin");
// request.setServiceId(123456);
// request.setOrderId(123456);
request.setApplyTimeBegin( Date.from(startTime.atZone( ZoneId.systemDefault()).toInstant()));
request.setApplyTimeEnd(Date.from(endTime.atZone( ZoneId.systemDefault()).toInstant()));
// request.setFinishTimeBegin(Date.from(startTime.atZone( ZoneId.systemDefault()).toInstant()));
// request.setFinishTimeEnd(Date.from(endTime.atZone( ZoneId.systemDefault()).toInstant()));
// request.setVerificationCode("abcd");
// request.setExpressCode("JDVA1234");
// request.setOrderType(0);
// request.setProcessResult(40);
// request.setCustomerPin("testPin");
// request.setCustomerName("testPin");
// request.setCustomerTel("123456");
// request.setApproveTimeBegin(Date.from(startTime.atZone( ZoneId.systemDefault()).toInstant()));
// request.setApproveTimeEnd(Date.from(endTime.atZone( ZoneId.systemDefault()).toInstant()));
request.setPageNumber(1);
request.setPageSize(100);
// request.setExtJsonStr("a");
AscQueryListResponse response=client.execute(request);
int insertSuccess = 0;
int totalError = 0;
int hasExist = 0;
if(response!=null && response.getPageResult()!=null){
if(response.getPageResult().getData()!=null){
for (var item : response.getPageResult().getData()){
JdOrderAfter after = new JdOrderAfter();
BeanUtils.copyProperties(item,after);
after.setShopId(params.getShopId());
var result = afterService.saveAfter(params.getShopId(), after);
if (result.getCode() == ResultVoEnum.DataExist.getIndex()) {
//已经存在
hasExist++;
mqUtils.sendApiMessage(MqMessage.build(EnumShopType.JD, MqType.REFUND_MESSAGE,item.getApplyId().toString()));
} else if (result.getCode() == ResultVoEnum.SUCCESS.getIndex()) {
insertSuccess++;
mqUtils.sendApiMessage(MqMessage.build(EnumShopType.JD,MqType.REFUND_MESSAGE,item.getApplyId().toString()));
} else {
totalError++;
}
}
}
}
if(lasttime == null){
// 新增
SysShopPullLasttime insertLasttime = new SysShopPullLasttime();
insertLasttime.setShopId(params.getShopId());
insertLasttime.setCreateTime(new Date());
insertLasttime.setLasttime(endTime);
insertLasttime.setPullType("REFUND");
pullLasttimeService.save(insertLasttime);
}else {
// 修改
SysShopPullLasttime updateLasttime = new SysShopPullLasttime();
updateLasttime.setId(lasttime.getId());
updateLasttime.setUpdateTime(new Date());
updateLasttime.setLasttime(endTime);
pullLasttimeService.updateById(updateLasttime);
}
SysShopPullLogs logs = new SysShopPullLogs();
logs.setShopId(params.getShopId());
logs.setPullType("REFUND");
logs.setPullWay("主动拉取");
logs.setPullParams("{ApplyTimeBegin:"+startTimeStr+",ApplyTimeEnd:"+endTimeStr+",PageIndex:1,PageSize:100}");
logs.setPullResult("{total:"+insertSuccess+",hasExist:"+hasExist+",totalError:"+totalError+"}");
logs.setPullTime(currDateTime);
logs.setDuration(System.currentTimeMillis() - beginTime);
pullLogsService.save(logs);
// mqUtils.sendApiMessage(MqMessage.build(EnumShopType.JD, MqType.REFUND_MESSAGE,item.getId()));
return response;
}
} }

View File

@ -0,0 +1,881 @@
package com.qihang.jd.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 京东售后
* @TableName jd_order_after
*/
public class JdOrderAfter implements Serializable {
/**
*
*/
private Long id;
/**
* 店铺id
*/
private Integer shopId;
/**
* 申请单号
*/
private Long applyId;
/**
* 服务单号
*/
private Long serviceId;
/**
* 申请时间
*/
private Date applyTime;
/**
* 客户期望(10-退货 20-换货 30-维修 40-大家电安装 50-大家电移机 60-大家电增值服务 70-上门维修 90-优鲜赔 80-补发商品 100-试用收回 11-仅退款)
*/
private Integer customerExpect;
/**
* 客户期望名称
*/
private String customerExpectName;
/**
* 服务单状态10000-待审核领取 10001-待审核 10002-待客户反馈 10004-审核关闭 10005-待收货 10006-待处理领取 10007-待处理 10009-待用户确认 10010-完成 10011-取消 10012-客户已反馈 10013-待审核和待客户反馈 10041-提交退款申请 1100-待下发维修中心接单 12000-上门维修中 14000-上门检测中 13000-商家催收待处理 13000-未收货待收款 13000-已收货待收款
*/
private Integer serviceStatus;
/**
* 服务单状态名称
*/
private String serviceStatusName;
/**
* 客户账号
*/
private String customerPin;
/**
* 客户姓名
*/
private String customerName;
/**
* 用户电话
*/
private String customerTel;
/**
* 取件地址
*/
private String pickwareAddress;
/**
* 取件方式(4-上门取件 5-上门换新取件 7-客户送货 8-大家电上门取件 9-大家电换新取件 40-客户发货 70-送货至门店 71-快递至门店 72-门店上门取件 80-京东快运上门取件 85-德邦取件)
*/
private Integer pickwareType;
/**
* 订单号
*/
private Long orderId;
/**
* 订单类型(0-一般订单 2-拍卖订单 11-售后调货 15-返修发货 16-直接赔偿 21-POPFBP 22-POPSOP 23-POPLBP 24-POPLBV 25-POPSOPL 18-厂商直送 19-客服补件 42-通用合约 61-EPT订单 69-京东服务产品订单 19-客服补件 75-LOC订单 77-LSP订单 42-虚拟订单 88-总代订单 96-sop虚拟订单 100-提货卡订单 33-电子礼品卡 49-礼品卡 108-京东维修服务产品订单 131-X无人超市订单 142-企业店铺IBS订单 151-品牌门店线下订单 112-自营采购以销定结 159-领货码订单 89-移动仓库订单 170-实体领货码订单 140-商家采购订单 193-scf订单 54-线下礼品卡订单 202-月卡订单 4-虚拟商品)
*/
private Integer orderType;
/**
* 订单类型名称
*/
private String orderTypeName;
/**
* 实付金额
*/
private BigDecimal actualPayPrice;
/**
* 商品编号
*/
private Long skuId;
/**
* 售后商品类型(10-申请主商品 20-申请的赠品 30-附件 40-发票 50-发票复印件 60-出检报告 70-包装 80-防损吊牌 90-贺卡 100-礼品购包装 110-loc订单验证码 120-服务产品标识)
*/
private Integer wareType;
/**
* 商品类型名称
*/
private String wareTypeName;
/**
* 商品名称
*/
private String wareName;
/**
* 商品类型(1-单品 2-赠品套装中的主商品 3-赠品套装中的赠品 4-套装中的单品 5-套装中的赠品 6-加价购赠品 7-延保通 8-延保通赠品)
*/
private Integer skuType;
/**
* skuType对应名称
*/
private String skuTypeName;
/**
* 审核人账号
*/
private String approvePin;
/**
* 审核人姓名
*/
private String approveName;
/**
* 审核时间
*/
private Date approveTime;
/**
* 审核结果(11-直赔积分 12-直赔余额 13-直赔优惠卷 14-直赔京豆 21-直赔商品 22-上门换新 31-自营取件 32-客户送货 33-客户发货 34-闪电退款 35-虚拟退款 36-上门检测 37-客户送货至门店 38-保外维修 39-快递至门店 40-门店上门取件 80-大家电检测 81-大家电安装 82-大家电移机 83-大家电维修 84-大家电其它 85-闪电催收 86-上门维修 87-补发商品 91-退款不退货 92-预授权冻结 93-ACS换新 95-(超级体验店)门店换新 96-(超级体验店)主站换新 97-厂商维修-寄修 98-厂商维修-上门维修 99-厂商维修-送修 101-厂商大家电检测鉴定 102-厂商大家电安装 103-厂商大家电移机拆机 104-厂商大家电维修(上门维修) 105-厂商大家电拆机鉴定 106-换货 100-客户退货至团长 107-3c上门维修 108-增值服务 109-退货(筋斗云使用) 110-直赔(筋斗云使用) 111-上门检测取件)
*/
private Integer approveResult;
/**
* 审核结果名称
*/
private String approveResultName;
/**
* 处理人账号
*/
private String processPin;
/**
* 处理人姓名
*/
private String processName;
/**
* 处理时间
*/
private Date processTime;
/**
* 处理结果(0-初始化 1-安装完成 2-维修完成 3-检测完成 4-拆机完成 5-咨询解释 6-取消 70-原返 80-换货 100-赔付)
*/
private Integer processResult;
/**
* 处理结果名称
*/
private String processResultName;
/**
* 平台来源
*/
private Integer platformSrc;
/**
* 平台来源名称
*/
private String platformSrcName;
/**
* 服务单售后数量
*/
private Integer serviceCount;
/**
* 用户电话
*/
private String desenCustomerTel;
private static final long serialVersionUID = 1L;
/**
*
*/
public Long getId() {
return id;
}
/**
*
*/
public void setId(Long id) {
this.id = id;
}
/**
* 店铺id
*/
public Integer getShopId() {
return shopId;
}
/**
* 店铺id
*/
public void setShopId(Integer shopId) {
this.shopId = shopId;
}
/**
* 申请单号
*/
public Long getApplyId() {
return applyId;
}
/**
* 申请单号
*/
public void setApplyId(Long applyId) {
this.applyId = applyId;
}
/**
* 服务单号
*/
public Long getServiceId() {
return serviceId;
}
/**
* 服务单号
*/
public void setServiceId(Long serviceId) {
this.serviceId = serviceId;
}
/**
* 申请时间
*/
public Date getApplyTime() {
return applyTime;
}
/**
* 申请时间
*/
public void setApplyTime(Date applyTime) {
this.applyTime = applyTime;
}
/**
* 客户期望(10-退货 20-换货 30-维修 40-大家电安装 50-大家电移机 60-大家电增值服务 70-上门维修 90-优鲜赔 80-补发商品 100-试用收回 11-仅退款)
*/
public Integer getCustomerExpect() {
return customerExpect;
}
/**
* 客户期望(10-退货 20-换货 30-维修 40-大家电安装 50-大家电移机 60-大家电增值服务 70-上门维修 90-优鲜赔 80-补发商品 100-试用收回 11-仅退款)
*/
public void setCustomerExpect(Integer customerExpect) {
this.customerExpect = customerExpect;
}
/**
* 客户期望名称
*/
public String getCustomerExpectName() {
return customerExpectName;
}
/**
* 客户期望名称
*/
public void setCustomerExpectName(String customerExpectName) {
this.customerExpectName = customerExpectName;
}
/**
* 服务单状态10000-待审核领取 10001-待审核 10002-待客户反馈 10004-审核关闭 10005-待收货 10006-待处理领取 10007-待处理 10009-待用户确认 10010-完成 10011-取消 10012-客户已反馈 10013-待审核和待客户反馈 10041-提交退款申请 1100-待下发维修中心接单 12000-上门维修中 14000-上门检测中 13000-商家催收待处理 13000-未收货待收款 13000-已收货待收款
*/
public Integer getServiceStatus() {
return serviceStatus;
}
/**
* 服务单状态10000-待审核领取 10001-待审核 10002-待客户反馈 10004-审核关闭 10005-待收货 10006-待处理领取 10007-待处理 10009-待用户确认 10010-完成 10011-取消 10012-客户已反馈 10013-待审核和待客户反馈 10041-提交退款申请 1100-待下发维修中心接单 12000-上门维修中 14000-上门检测中 13000-商家催收待处理 13000-未收货待收款 13000-已收货待收款
*/
public void setServiceStatus(Integer serviceStatus) {
this.serviceStatus = serviceStatus;
}
/**
* 服务单状态名称
*/
public String getServiceStatusName() {
return serviceStatusName;
}
/**
* 服务单状态名称
*/
public void setServiceStatusName(String serviceStatusName) {
this.serviceStatusName = serviceStatusName;
}
/**
* 客户账号
*/
public String getCustomerPin() {
return customerPin;
}
/**
* 客户账号
*/
public void setCustomerPin(String customerPin) {
this.customerPin = customerPin;
}
/**
* 客户姓名
*/
public String getCustomerName() {
return customerName;
}
/**
* 客户姓名
*/
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
/**
* 用户电话
*/
public String getCustomerTel() {
return customerTel;
}
/**
* 用户电话
*/
public void setCustomerTel(String customerTel) {
this.customerTel = customerTel;
}
/**
* 取件地址
*/
public String getPickwareAddress() {
return pickwareAddress;
}
/**
* 取件地址
*/
public void setPickwareAddress(String pickwareAddress) {
this.pickwareAddress = pickwareAddress;
}
/**
* 取件方式(4-上门取件 5-上门换新取件 7-客户送货 8-大家电上门取件 9-大家电换新取件 40-客户发货 70-送货至门店 71-快递至门店 72-门店上门取件 80-京东快运上门取件 85-德邦取件)
*/
public Integer getPickwareType() {
return pickwareType;
}
/**
* 取件方式(4-上门取件 5-上门换新取件 7-客户送货 8-大家电上门取件 9-大家电换新取件 40-客户发货 70-送货至门店 71-快递至门店 72-门店上门取件 80-京东快运上门取件 85-德邦取件)
*/
public void setPickwareType(Integer pickwareType) {
this.pickwareType = pickwareType;
}
/**
* 订单号
*/
public Long getOrderId() {
return orderId;
}
/**
* 订单号
*/
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
/**
* 订单类型(0-一般订单 2-拍卖订单 11-售后调货 15-返修发货 16-直接赔偿 21-POPFBP 22-POPSOP 23-POPLBP 24-POPLBV 25-POPSOPL 18-厂商直送 19-客服补件 42-通用合约 61-EPT订单 69-京东服务产品订单 19-客服补件 75-LOC订单 77-LSP订单 42-虚拟订单 88-总代订单 96-sop虚拟订单 100-提货卡订单 33-电子礼品卡 49-礼品卡 108-京东维修服务产品订单 131-X无人超市订单 142-企业店铺IBS订单 151-品牌门店线下订单 112-自营采购以销定结 159-领货码订单 89-移动仓库订单 170-实体领货码订单 140-商家采购订单 193-scf订单 54-线下礼品卡订单 202-月卡订单 4-虚拟商品)
*/
public Integer getOrderType() {
return orderType;
}
/**
* 订单类型(0-一般订单 2-拍卖订单 11-售后调货 15-返修发货 16-直接赔偿 21-POPFBP 22-POPSOP 23-POPLBP 24-POPLBV 25-POPSOPL 18-厂商直送 19-客服补件 42-通用合约 61-EPT订单 69-京东服务产品订单 19-客服补件 75-LOC订单 77-LSP订单 42-虚拟订单 88-总代订单 96-sop虚拟订单 100-提货卡订单 33-电子礼品卡 49-礼品卡 108-京东维修服务产品订单 131-X无人超市订单 142-企业店铺IBS订单 151-品牌门店线下订单 112-自营采购以销定结 159-领货码订单 89-移动仓库订单 170-实体领货码订单 140-商家采购订单 193-scf订单 54-线下礼品卡订单 202-月卡订单 4-虚拟商品)
*/
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
/**
* 订单类型名称
*/
public String getOrderTypeName() {
return orderTypeName;
}
/**
* 订单类型名称
*/
public void setOrderTypeName(String orderTypeName) {
this.orderTypeName = orderTypeName;
}
/**
* 实付金额
*/
public BigDecimal getActualPayPrice() {
return actualPayPrice;
}
/**
* 实付金额
*/
public void setActualPayPrice(BigDecimal actualPayPrice) {
this.actualPayPrice = actualPayPrice;
}
/**
* 商品编号
*/
public Long getSkuId() {
return skuId;
}
/**
* 商品编号
*/
public void setSkuId(Long skuId) {
this.skuId = skuId;
}
/**
* 售后商品类型(10-申请主商品 20-申请的赠品 30-附件 40-发票 50-发票复印件 60-出检报告 70-包装 80-防损吊牌 90-贺卡 100-礼品购包装 110-loc订单验证码 120-服务产品标识)
*/
public Integer getWareType() {
return wareType;
}
/**
* 售后商品类型(10-申请主商品 20-申请的赠品 30-附件 40-发票 50-发票复印件 60-出检报告 70-包装 80-防损吊牌 90-贺卡 100-礼品购包装 110-loc订单验证码 120-服务产品标识)
*/
public void setWareType(Integer wareType) {
this.wareType = wareType;
}
/**
* 商品类型名称
*/
public String getWareTypeName() {
return wareTypeName;
}
/**
* 商品类型名称
*/
public void setWareTypeName(String wareTypeName) {
this.wareTypeName = wareTypeName;
}
/**
* 商品名称
*/
public String getWareName() {
return wareName;
}
/**
* 商品名称
*/
public void setWareName(String wareName) {
this.wareName = wareName;
}
/**
* 商品类型(1-单品 2-赠品套装中的主商品 3-赠品套装中的赠品 4-套装中的单品 5-套装中的赠品 6-加价购赠品 7-延保通 8-延保通赠品)
*/
public Integer getSkuType() {
return skuType;
}
/**
* 商品类型(1-单品 2-赠品套装中的主商品 3-赠品套装中的赠品 4-套装中的单品 5-套装中的赠品 6-加价购赠品 7-延保通 8-延保通赠品)
*/
public void setSkuType(Integer skuType) {
this.skuType = skuType;
}
/**
* skuType对应名称
*/
public String getSkuTypeName() {
return skuTypeName;
}
/**
* skuType对应名称
*/
public void setSkuTypeName(String skuTypeName) {
this.skuTypeName = skuTypeName;
}
/**
* 审核人账号
*/
public String getApprovePin() {
return approvePin;
}
/**
* 审核人账号
*/
public void setApprovePin(String approvePin) {
this.approvePin = approvePin;
}
/**
* 审核人姓名
*/
public String getApproveName() {
return approveName;
}
/**
* 审核人姓名
*/
public void setApproveName(String approveName) {
this.approveName = approveName;
}
/**
* 审核时间
*/
public Date getApproveTime() {
return approveTime;
}
/**
* 审核时间
*/
public void setApproveTime(Date approveTime) {
this.approveTime = approveTime;
}
/**
* 审核结果(11-直赔积分 12-直赔余额 13-直赔优惠卷 14-直赔京豆 21-直赔商品 22-上门换新 31-自营取件 32-客户送货 33-客户发货 34-闪电退款 35-虚拟退款 36-上门检测 37-客户送货至门店 38-保外维修 39-快递至门店 40-门店上门取件 80-大家电检测 81-大家电安装 82-大家电移机 83-大家电维修 84-大家电其它 85-闪电催收 86-上门维修 87-补发商品 91-退款不退货 92-预授权冻结 93-ACS换新 95-(超级体验店)门店换新 96-(超级体验店)主站换新 97-厂商维修-寄修 98-厂商维修-上门维修 99-厂商维修-送修 101-厂商大家电检测鉴定 102-厂商大家电安装 103-厂商大家电移机拆机 104-厂商大家电维修(上门维修) 105-厂商大家电拆机鉴定 106-换货 100-客户退货至团长 107-3c上门维修 108-增值服务 109-退货(筋斗云使用) 110-直赔(筋斗云使用) 111-上门检测取件)
*/
public Integer getApproveResult() {
return approveResult;
}
/**
* 审核结果(11-直赔积分 12-直赔余额 13-直赔优惠卷 14-直赔京豆 21-直赔商品 22-上门换新 31-自营取件 32-客户送货 33-客户发货 34-闪电退款 35-虚拟退款 36-上门检测 37-客户送货至门店 38-保外维修 39-快递至门店 40-门店上门取件 80-大家电检测 81-大家电安装 82-大家电移机 83-大家电维修 84-大家电其它 85-闪电催收 86-上门维修 87-补发商品 91-退款不退货 92-预授权冻结 93-ACS换新 95-(超级体验店)门店换新 96-(超级体验店)主站换新 97-厂商维修-寄修 98-厂商维修-上门维修 99-厂商维修-送修 101-厂商大家电检测鉴定 102-厂商大家电安装 103-厂商大家电移机拆机 104-厂商大家电维修(上门维修) 105-厂商大家电拆机鉴定 106-换货 100-客户退货至团长 107-3c上门维修 108-增值服务 109-退货(筋斗云使用) 110-直赔(筋斗云使用) 111-上门检测取件)
*/
public void setApproveResult(Integer approveResult) {
this.approveResult = approveResult;
}
/**
* 审核结果名称
*/
public String getApproveResultName() {
return approveResultName;
}
/**
* 审核结果名称
*/
public void setApproveResultName(String approveResultName) {
this.approveResultName = approveResultName;
}
/**
* 处理人账号
*/
public String getProcessPin() {
return processPin;
}
/**
* 处理人账号
*/
public void setProcessPin(String processPin) {
this.processPin = processPin;
}
/**
* 处理人姓名
*/
public String getProcessName() {
return processName;
}
/**
* 处理人姓名
*/
public void setProcessName(String processName) {
this.processName = processName;
}
/**
* 处理时间
*/
public Date getProcessTime() {
return processTime;
}
/**
* 处理时间
*/
public void setProcessTime(Date processTime) {
this.processTime = processTime;
}
/**
* 处理结果(0-初始化 1-安装完成 2-维修完成 3-检测完成 4-拆机完成 5-咨询解释 6-取消 70-原返 80-换货 100-赔付)
*/
public Integer getProcessResult() {
return processResult;
}
/**
* 处理结果(0-初始化 1-安装完成 2-维修完成 3-检测完成 4-拆机完成 5-咨询解释 6-取消 70-原返 80-换货 100-赔付)
*/
public void setProcessResult(Integer processResult) {
this.processResult = processResult;
}
/**
* 处理结果名称
*/
public String getProcessResultName() {
return processResultName;
}
/**
* 处理结果名称
*/
public void setProcessResultName(String processResultName) {
this.processResultName = processResultName;
}
/**
* 平台来源
*/
public Integer getPlatformSrc() {
return platformSrc;
}
/**
* 平台来源
*/
public void setPlatformSrc(Integer platformSrc) {
this.platformSrc = platformSrc;
}
/**
* 平台来源名称
*/
public String getPlatformSrcName() {
return platformSrcName;
}
/**
* 平台来源名称
*/
public void setPlatformSrcName(String platformSrcName) {
this.platformSrcName = platformSrcName;
}
/**
* 服务单售后数量
*/
public Integer getServiceCount() {
return serviceCount;
}
/**
* 服务单售后数量
*/
public void setServiceCount(Integer serviceCount) {
this.serviceCount = serviceCount;
}
/**
* 用户电话
*/
public String getDesenCustomerTel() {
return desenCustomerTel;
}
/**
* 用户电话
*/
public void setDesenCustomerTel(String desenCustomerTel) {
this.desenCustomerTel = desenCustomerTel;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
JdOrderAfter other = (JdOrderAfter) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
&& (this.getApplyId() == null ? other.getApplyId() == null : this.getApplyId().equals(other.getApplyId()))
&& (this.getServiceId() == null ? other.getServiceId() == null : this.getServiceId().equals(other.getServiceId()))
&& (this.getApplyTime() == null ? other.getApplyTime() == null : this.getApplyTime().equals(other.getApplyTime()))
&& (this.getCustomerExpect() == null ? other.getCustomerExpect() == null : this.getCustomerExpect().equals(other.getCustomerExpect()))
&& (this.getCustomerExpectName() == null ? other.getCustomerExpectName() == null : this.getCustomerExpectName().equals(other.getCustomerExpectName()))
&& (this.getServiceStatus() == null ? other.getServiceStatus() == null : this.getServiceStatus().equals(other.getServiceStatus()))
&& (this.getServiceStatusName() == null ? other.getServiceStatusName() == null : this.getServiceStatusName().equals(other.getServiceStatusName()))
&& (this.getCustomerPin() == null ? other.getCustomerPin() == null : this.getCustomerPin().equals(other.getCustomerPin()))
&& (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()))
&& (this.getCustomerTel() == null ? other.getCustomerTel() == null : this.getCustomerTel().equals(other.getCustomerTel()))
&& (this.getPickwareAddress() == null ? other.getPickwareAddress() == null : this.getPickwareAddress().equals(other.getPickwareAddress()))
&& (this.getPickwareType() == null ? other.getPickwareType() == null : this.getPickwareType().equals(other.getPickwareType()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
&& (this.getOrderTypeName() == null ? other.getOrderTypeName() == null : this.getOrderTypeName().equals(other.getOrderTypeName()))
&& (this.getActualPayPrice() == null ? other.getActualPayPrice() == null : this.getActualPayPrice().equals(other.getActualPayPrice()))
&& (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId()))
&& (this.getWareType() == null ? other.getWareType() == null : this.getWareType().equals(other.getWareType()))
&& (this.getWareTypeName() == null ? other.getWareTypeName() == null : this.getWareTypeName().equals(other.getWareTypeName()))
&& (this.getWareName() == null ? other.getWareName() == null : this.getWareName().equals(other.getWareName()))
&& (this.getSkuType() == null ? other.getSkuType() == null : this.getSkuType().equals(other.getSkuType()))
&& (this.getSkuTypeName() == null ? other.getSkuTypeName() == null : this.getSkuTypeName().equals(other.getSkuTypeName()))
&& (this.getApprovePin() == null ? other.getApprovePin() == null : this.getApprovePin().equals(other.getApprovePin()))
&& (this.getApproveName() == null ? other.getApproveName() == null : this.getApproveName().equals(other.getApproveName()))
&& (this.getApproveTime() == null ? other.getApproveTime() == null : this.getApproveTime().equals(other.getApproveTime()))
&& (this.getApproveResult() == null ? other.getApproveResult() == null : this.getApproveResult().equals(other.getApproveResult()))
&& (this.getApproveResultName() == null ? other.getApproveResultName() == null : this.getApproveResultName().equals(other.getApproveResultName()))
&& (this.getProcessPin() == null ? other.getProcessPin() == null : this.getProcessPin().equals(other.getProcessPin()))
&& (this.getProcessName() == null ? other.getProcessName() == null : this.getProcessName().equals(other.getProcessName()))
&& (this.getProcessTime() == null ? other.getProcessTime() == null : this.getProcessTime().equals(other.getProcessTime()))
&& (this.getProcessResult() == null ? other.getProcessResult() == null : this.getProcessResult().equals(other.getProcessResult()))
&& (this.getProcessResultName() == null ? other.getProcessResultName() == null : this.getProcessResultName().equals(other.getProcessResultName()))
&& (this.getPlatformSrc() == null ? other.getPlatformSrc() == null : this.getPlatformSrc().equals(other.getPlatformSrc()))
&& (this.getPlatformSrcName() == null ? other.getPlatformSrcName() == null : this.getPlatformSrcName().equals(other.getPlatformSrcName()))
&& (this.getServiceCount() == null ? other.getServiceCount() == null : this.getServiceCount().equals(other.getServiceCount()))
&& (this.getDesenCustomerTel() == null ? other.getDesenCustomerTel() == null : this.getDesenCustomerTel().equals(other.getDesenCustomerTel()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
result = prime * result + ((getApplyId() == null) ? 0 : getApplyId().hashCode());
result = prime * result + ((getServiceId() == null) ? 0 : getServiceId().hashCode());
result = prime * result + ((getApplyTime() == null) ? 0 : getApplyTime().hashCode());
result = prime * result + ((getCustomerExpect() == null) ? 0 : getCustomerExpect().hashCode());
result = prime * result + ((getCustomerExpectName() == null) ? 0 : getCustomerExpectName().hashCode());
result = prime * result + ((getServiceStatus() == null) ? 0 : getServiceStatus().hashCode());
result = prime * result + ((getServiceStatusName() == null) ? 0 : getServiceStatusName().hashCode());
result = prime * result + ((getCustomerPin() == null) ? 0 : getCustomerPin().hashCode());
result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
result = prime * result + ((getCustomerTel() == null) ? 0 : getCustomerTel().hashCode());
result = prime * result + ((getPickwareAddress() == null) ? 0 : getPickwareAddress().hashCode());
result = prime * result + ((getPickwareType() == null) ? 0 : getPickwareType().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
result = prime * result + ((getOrderTypeName() == null) ? 0 : getOrderTypeName().hashCode());
result = prime * result + ((getActualPayPrice() == null) ? 0 : getActualPayPrice().hashCode());
result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode());
result = prime * result + ((getWareType() == null) ? 0 : getWareType().hashCode());
result = prime * result + ((getWareTypeName() == null) ? 0 : getWareTypeName().hashCode());
result = prime * result + ((getWareName() == null) ? 0 : getWareName().hashCode());
result = prime * result + ((getSkuType() == null) ? 0 : getSkuType().hashCode());
result = prime * result + ((getSkuTypeName() == null) ? 0 : getSkuTypeName().hashCode());
result = prime * result + ((getApprovePin() == null) ? 0 : getApprovePin().hashCode());
result = prime * result + ((getApproveName() == null) ? 0 : getApproveName().hashCode());
result = prime * result + ((getApproveTime() == null) ? 0 : getApproveTime().hashCode());
result = prime * result + ((getApproveResult() == null) ? 0 : getApproveResult().hashCode());
result = prime * result + ((getApproveResultName() == null) ? 0 : getApproveResultName().hashCode());
result = prime * result + ((getProcessPin() == null) ? 0 : getProcessPin().hashCode());
result = prime * result + ((getProcessName() == null) ? 0 : getProcessName().hashCode());
result = prime * result + ((getProcessTime() == null) ? 0 : getProcessTime().hashCode());
result = prime * result + ((getProcessResult() == null) ? 0 : getProcessResult().hashCode());
result = prime * result + ((getProcessResultName() == null) ? 0 : getProcessResultName().hashCode());
result = prime * result + ((getPlatformSrc() == null) ? 0 : getPlatformSrc().hashCode());
result = prime * result + ((getPlatformSrcName() == null) ? 0 : getPlatformSrcName().hashCode());
result = prime * result + ((getServiceCount() == null) ? 0 : getServiceCount().hashCode());
result = prime * result + ((getDesenCustomerTel() == null) ? 0 : getDesenCustomerTel().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", shopId=").append(shopId);
sb.append(", applyId=").append(applyId);
sb.append(", serviceId=").append(serviceId);
sb.append(", applyTime=").append(applyTime);
sb.append(", customerExpect=").append(customerExpect);
sb.append(", customerExpectName=").append(customerExpectName);
sb.append(", serviceStatus=").append(serviceStatus);
sb.append(", serviceStatusName=").append(serviceStatusName);
sb.append(", customerPin=").append(customerPin);
sb.append(", customerName=").append(customerName);
sb.append(", customerTel=").append(customerTel);
sb.append(", pickwareAddress=").append(pickwareAddress);
sb.append(", pickwareType=").append(pickwareType);
sb.append(", orderId=").append(orderId);
sb.append(", orderType=").append(orderType);
sb.append(", orderTypeName=").append(orderTypeName);
sb.append(", actualPayPrice=").append(actualPayPrice);
sb.append(", skuId=").append(skuId);
sb.append(", wareType=").append(wareType);
sb.append(", wareTypeName=").append(wareTypeName);
sb.append(", wareName=").append(wareName);
sb.append(", skuType=").append(skuType);
sb.append(", skuTypeName=").append(skuTypeName);
sb.append(", approvePin=").append(approvePin);
sb.append(", approveName=").append(approveName);
sb.append(", approveTime=").append(approveTime);
sb.append(", approveResult=").append(approveResult);
sb.append(", approveResultName=").append(approveResultName);
sb.append(", processPin=").append(processPin);
sb.append(", processName=").append(processName);
sb.append(", processTime=").append(processTime);
sb.append(", processResult=").append(processResult);
sb.append(", processResultName=").append(processResultName);
sb.append(", platformSrc=").append(platformSrc);
sb.append(", platformSrcName=").append(platformSrcName);
sb.append(", serviceCount=").append(serviceCount);
sb.append(", desenCustomerTel=").append(desenCustomerTel);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@ -0,0 +1,18 @@
package com.qihang.jd.mapper;
import com.qihang.jd.domain.JdOrderAfter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author qilip
* @description 针对表jd_order_after(京东售后)的数据库操作Mapper
* @createDate 2024-03-10 18:37:36
* @Entity com.qihang.jd.domain.JdOrderAfter
*/
public interface JdOrderAfterMapper extends BaseMapper<JdOrderAfter> {
}

View File

@ -63,6 +63,7 @@ public class ApiCommon {
params.setTokenRequestUrl(platform.getRedirectUri()); params.setTokenRequestUrl(platform.getRedirectUri());
params.setApiRequestUrl(shop.getApiRequestUrl()); params.setApiRequestUrl(shop.getApiRequestUrl());
params.setServerUrl(platform.getServerUrl()); params.setServerUrl(platform.getServerUrl());
params.setSellerId(shop.getSellerId().toString());
if (!StringUtils.hasText(shop.getAccessToken())) { if (!StringUtils.hasText(shop.getAccessToken())) {
return ApiResult.build(HttpStatus.UNAUTHORIZED, "Token已过期请重新授权", params); return ApiResult.build(HttpStatus.UNAUTHORIZED, "Token已过期请重新授权", params);

View File

@ -0,0 +1,14 @@
package com.qihang.jd.service;
import com.qihang.common.common.ResultVo;
import com.qihang.jd.domain.JdOrderAfter;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author qilip
* @description 针对表jd_order_after(京东售后)的数据库操作Service
* @createDate 2024-03-10 18:37:36
*/
public interface JdOrderAfterService extends IService<JdOrderAfter> {
ResultVo<Integer> saveAfter(Integer shopId,JdOrderAfter after);
}

View File

@ -0,0 +1,64 @@
package com.qihang.jd.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qihang.common.common.ResultVo;
import com.qihang.common.common.ResultVoEnum;
import com.qihang.jd.domain.JdOrderAfter;
import com.qihang.jd.service.JdOrderAfterService;
import com.qihang.jd.mapper.JdOrderAfterMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.util.List;
/**
* @author qilip
* @description 针对表jd_order_after(京东售后)的数据库操作Service实现
* @createDate 2024-03-10 18:37:36
*/
@AllArgsConstructor
@Service
public class JdOrderAfterServiceImpl extends ServiceImpl<JdOrderAfterMapper, JdOrderAfter>
implements JdOrderAfterService{
private final JdOrderAfterMapper mapper;
@Override
public ResultVo<Integer> saveAfter(Integer shopId, JdOrderAfter after) {
try {
List<JdOrderAfter> jdOrderAfters = mapper.selectList(new LambdaQueryWrapper<JdOrderAfter>().eq(JdOrderAfter::getApplyId, after.getApplyId()));
if (jdOrderAfters != null && jdOrderAfters.size() > 0) {
// 存在修改
JdOrderAfter update = new JdOrderAfter();
update.setId(jdOrderAfters.get(0).getId());
update.setServiceStatus(after.getServiceStatus());
update.setServiceStatusName(after.getServiceStatusName());
update.setApprovePin(after.getApprovePin());
update.setApproveName(after.getApproveName());
update.setApproveTime(after.getApproveTime());
update.setApproveResult(after.getApproveResult());
update.setApproveResultName(after.getApproveResultName());
update.setProcessPin(after.getProcessPin());
update.setProcessName(after.getProcessName());
update.setProcessTime(after.getProcessTime());
update.setProcessResult(after.getProcessResult());
update.setProcessResultName(after.getProcessResultName());
mapper.updateById(update);
return new ResultVo<>(ResultVoEnum.DataExist, "退款已经存在,更新成功");
} else {
// 新增
after.setShopId(shopId);
mapper.insert(after);
return new ResultVo<>(ResultVoEnum.SUCCESS, "SUCCESS");
}
} catch (Exception e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return new ResultVo<>(ResultVoEnum.SystemException, "系统异常:" + e.getMessage());
}
}
}

View File

@ -5,8 +5,11 @@ import com.qihang.jd.domain.SysTask;
import com.qihang.jd.service.SysTaskService; import com.qihang.jd.service.SysTaskService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.java.Log;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
@Log
@AllArgsConstructor @AllArgsConstructor
@Service @Service
public class OrderTask implements IPollableService { public class OrderTask implements IPollableService {
@ -14,7 +17,8 @@ public class OrderTask implements IPollableService {
private final SysTaskService taskService; private final SysTaskService taskService;
@Override @Override
public void poll() { public void poll() {
System.out.printf("更新JD订单%s","echo"); log.info("=======自动任务=====拉取订单========="+ LocalDateTime.now());
// System.out.printf("更新JD订单%s","echo");
} }
@Override @Override

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qihang.jd.mapper.JdOrderAfterMapper">
<resultMap id="BaseResultMap" type="com.qihang.jd.domain.JdOrderAfter">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="applyId" column="apply_id" jdbcType="BIGINT"/>
<result property="serviceId" column="service_id" jdbcType="BIGINT"/>
<result property="applyTime" column="apply_time" jdbcType="TIMESTAMP"/>
<result property="customerExpect" column="customer_expect" jdbcType="INTEGER"/>
<result property="customerExpectName" column="customer_expect_name" jdbcType="VARCHAR"/>
<result property="serviceStatus" column="service_status" jdbcType="INTEGER"/>
<result property="serviceStatusName" column="service_status_name" jdbcType="VARCHAR"/>
<result property="customerPin" column="customer_pin" jdbcType="VARCHAR"/>
<result property="customerName" column="customer_name" jdbcType="VARCHAR"/>
<result property="customerTel" column="customer_tel" jdbcType="VARCHAR"/>
<result property="pickwareAddress" column="pickware_address" jdbcType="VARCHAR"/>
<result property="pickwareType" column="pickware_type" jdbcType="INTEGER"/>
<result property="orderId" column="order_id" jdbcType="BIGINT"/>
<result property="orderType" column="order_type" jdbcType="INTEGER"/>
<result property="orderTypeName" column="order_type_name" jdbcType="VARCHAR"/>
<result property="actualPayPrice" column="actual_pay_price" jdbcType="DECIMAL"/>
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
<result property="wareType" column="ware_type" jdbcType="INTEGER"/>
<result property="wareTypeName" column="ware_type_name" jdbcType="VARCHAR"/>
<result property="wareName" column="ware_name" jdbcType="VARCHAR"/>
<result property="skuType" column="sku_type" jdbcType="INTEGER"/>
<result property="skuTypeName" column="sku_type_name" jdbcType="VARCHAR"/>
<result property="approvePin" column="approve_pin" jdbcType="VARCHAR"/>
<result property="approveName" column="approve_name" jdbcType="VARCHAR"/>
<result property="approveTime" column="approve_time" jdbcType="TIMESTAMP"/>
<result property="approveResult" column="approve_result" jdbcType="INTEGER"/>
<result property="approveResultName" column="approve_result_name" jdbcType="VARCHAR"/>
<result property="processPin" column="process_pin" jdbcType="VARCHAR"/>
<result property="processName" column="process_name" jdbcType="VARCHAR"/>
<result property="processTime" column="process_time" jdbcType="TIMESTAMP"/>
<result property="processResult" column="process_result" jdbcType="INTEGER"/>
<result property="processResultName" column="process_result_name" jdbcType="VARCHAR"/>
<result property="platformSrc" column="platform_src" jdbcType="INTEGER"/>
<result property="platformSrcName" column="platform_src_name" jdbcType="VARCHAR"/>
<result property="serviceCount" column="service_count" jdbcType="INTEGER"/>
<result property="desenCustomerTel" column="desen_customer_tel" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,shop_id,apply_id,
service_id,apply_time,customer_expect,
customer_expect_name,service_status,service_status_name,
customer_pin,customer_name,customer_tel,
pickware_address,pickware_type,order_id,
order_type,order_type_name,actual_pay_price,
sku_id,ware_type,ware_type_name,
ware_name,sku_type,sku_type_name,
approve_pin,approve_name,approve_time,
approve_result,approve_result_name,process_pin,
process_name,process_time,process_result,
process_result_name,platform_src,platform_src_name,
service_count,desen_customer_tel
</sql>
</mapper>

View File

@ -0,0 +1,881 @@
package com.qihang.sys.api.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 京东售后
* @TableName jd_order_after
*/
public class JdOrderAfter implements Serializable {
/**
*
*/
private Long id;
/**
* 店铺id
*/
private Integer shopId;
/**
* 申请单号
*/
private Long applyId;
/**
* 服务单号
*/
private Long serviceId;
/**
* 申请时间
*/
private Date applyTime;
/**
* 客户期望(10-退货 20-换货 30-维修 40-大家电安装 50-大家电移机 60-大家电增值服务 70-上门维修 90-优鲜赔 80-补发商品 100-试用收回 11-仅退款)
*/
private Integer customerExpect;
/**
* 客户期望名称
*/
private String customerExpectName;
/**
* 服务单状态10000-待审核领取 10001-待审核 10002-待客户反馈 10004-审核关闭 10005-待收货 10006-待处理领取 10007-待处理 10009-待用户确认 10010-完成 10011-取消 10012-客户已反馈 10013-待审核和待客户反馈 10041-提交退款申请 1100-待下发维修中心接单 12000-上门维修中 14000-上门检测中 13000-商家催收待处理 13000-未收货待收款 13000-已收货待收款
*/
private Integer serviceStatus;
/**
* 服务单状态名称
*/
private String serviceStatusName;
/**
* 客户账号
*/
private String customerPin;
/**
* 客户姓名
*/
private String customerName;
/**
* 用户电话
*/
private String customerTel;
/**
* 取件地址
*/
private String pickwareAddress;
/**
* 取件方式(4-上门取件 5-上门换新取件 7-客户送货 8-大家电上门取件 9-大家电换新取件 40-客户发货 70-送货至门店 71-快递至门店 72-门店上门取件 80-京东快运上门取件 85-德邦取件)
*/
private Integer pickwareType;
/**
* 订单号
*/
private Long orderId;
/**
* 订单类型(0-一般订单 2-拍卖订单 11-售后调货 15-返修发货 16-直接赔偿 21-POPFBP 22-POPSOP 23-POPLBP 24-POPLBV 25-POPSOPL 18-厂商直送 19-客服补件 42-通用合约 61-EPT订单 69-京东服务产品订单 19-客服补件 75-LOC订单 77-LSP订单 42-虚拟订单 88-总代订单 96-sop虚拟订单 100-提货卡订单 33-电子礼品卡 49-礼品卡 108-京东维修服务产品订单 131-X无人超市订单 142-企业店铺IBS订单 151-品牌门店线下订单 112-自营采购以销定结 159-领货码订单 89-移动仓库订单 170-实体领货码订单 140-商家采购订单 193-scf订单 54-线下礼品卡订单 202-月卡订单 4-虚拟商品)
*/
private Integer orderType;
/**
* 订单类型名称
*/
private String orderTypeName;
/**
* 实付金额
*/
private BigDecimal actualPayPrice;
/**
* 商品编号
*/
private Long skuId;
/**
* 售后商品类型(10-申请主商品 20-申请的赠品 30-附件 40-发票 50-发票复印件 60-出检报告 70-包装 80-防损吊牌 90-贺卡 100-礼品购包装 110-loc订单验证码 120-服务产品标识)
*/
private Integer wareType;
/**
* 商品类型名称
*/
private String wareTypeName;
/**
* 商品名称
*/
private String wareName;
/**
* 商品类型(1-单品 2-赠品套装中的主商品 3-赠品套装中的赠品 4-套装中的单品 5-套装中的赠品 6-加价购赠品 7-延保通 8-延保通赠品)
*/
private Integer skuType;
/**
* skuType对应名称
*/
private String skuTypeName;
/**
* 审核人账号
*/
private String approvePin;
/**
* 审核人姓名
*/
private String approveName;
/**
* 审核时间
*/
private Date approveTime;
/**
* 审核结果(11-直赔积分 12-直赔余额 13-直赔优惠卷 14-直赔京豆 21-直赔商品 22-上门换新 31-自营取件 32-客户送货 33-客户发货 34-闪电退款 35-虚拟退款 36-上门检测 37-客户送货至门店 38-保外维修 39-快递至门店 40-门店上门取件 80-大家电检测 81-大家电安装 82-大家电移机 83-大家电维修 84-大家电其它 85-闪电催收 86-上门维修 87-补发商品 91-退款不退货 92-预授权冻结 93-ACS换新 95-(超级体验店)门店换新 96-(超级体验店)主站换新 97-厂商维修-寄修 98-厂商维修-上门维修 99-厂商维修-送修 101-厂商大家电检测鉴定 102-厂商大家电安装 103-厂商大家电移机拆机 104-厂商大家电维修(上门维修) 105-厂商大家电拆机鉴定 106-换货 100-客户退货至团长 107-3c上门维修 108-增值服务 109-退货(筋斗云使用) 110-直赔(筋斗云使用) 111-上门检测取件)
*/
private Integer approveResult;
/**
* 审核结果名称
*/
private String approveResultName;
/**
* 处理人账号
*/
private String processPin;
/**
* 处理人姓名
*/
private String processName;
/**
* 处理时间
*/
private Date processTime;
/**
* 处理结果(0-初始化 1-安装完成 2-维修完成 3-检测完成 4-拆机完成 5-咨询解释 6-取消 70-原返 80-换货 100-赔付)
*/
private Integer processResult;
/**
* 处理结果名称
*/
private String processResultName;
/**
* 平台来源
*/
private Integer platformSrc;
/**
* 平台来源名称
*/
private String platformSrcName;
/**
* 服务单售后数量
*/
private Integer serviceCount;
/**
* 用户电话
*/
private String desenCustomerTel;
private static final long serialVersionUID = 1L;
/**
*
*/
public Long getId() {
return id;
}
/**
*
*/
public void setId(Long id) {
this.id = id;
}
/**
* 店铺id
*/
public Integer getShopId() {
return shopId;
}
/**
* 店铺id
*/
public void setShopId(Integer shopId) {
this.shopId = shopId;
}
/**
* 申请单号
*/
public Long getApplyId() {
return applyId;
}
/**
* 申请单号
*/
public void setApplyId(Long applyId) {
this.applyId = applyId;
}
/**
* 服务单号
*/
public Long getServiceId() {
return serviceId;
}
/**
* 服务单号
*/
public void setServiceId(Long serviceId) {
this.serviceId = serviceId;
}
/**
* 申请时间
*/
public Date getApplyTime() {
return applyTime;
}
/**
* 申请时间
*/
public void setApplyTime(Date applyTime) {
this.applyTime = applyTime;
}
/**
* 客户期望(10-退货 20-换货 30-维修 40-大家电安装 50-大家电移机 60-大家电增值服务 70-上门维修 90-优鲜赔 80-补发商品 100-试用收回 11-仅退款)
*/
public Integer getCustomerExpect() {
return customerExpect;
}
/**
* 客户期望(10-退货 20-换货 30-维修 40-大家电安装 50-大家电移机 60-大家电增值服务 70-上门维修 90-优鲜赔 80-补发商品 100-试用收回 11-仅退款)
*/
public void setCustomerExpect(Integer customerExpect) {
this.customerExpect = customerExpect;
}
/**
* 客户期望名称
*/
public String getCustomerExpectName() {
return customerExpectName;
}
/**
* 客户期望名称
*/
public void setCustomerExpectName(String customerExpectName) {
this.customerExpectName = customerExpectName;
}
/**
* 服务单状态10000-待审核领取 10001-待审核 10002-待客户反馈 10004-审核关闭 10005-待收货 10006-待处理领取 10007-待处理 10009-待用户确认 10010-完成 10011-取消 10012-客户已反馈 10013-待审核和待客户反馈 10041-提交退款申请 1100-待下发维修中心接单 12000-上门维修中 14000-上门检测中 13000-商家催收待处理 13000-未收货待收款 13000-已收货待收款
*/
public Integer getServiceStatus() {
return serviceStatus;
}
/**
* 服务单状态10000-待审核领取 10001-待审核 10002-待客户反馈 10004-审核关闭 10005-待收货 10006-待处理领取 10007-待处理 10009-待用户确认 10010-完成 10011-取消 10012-客户已反馈 10013-待审核和待客户反馈 10041-提交退款申请 1100-待下发维修中心接单 12000-上门维修中 14000-上门检测中 13000-商家催收待处理 13000-未收货待收款 13000-已收货待收款
*/
public void setServiceStatus(Integer serviceStatus) {
this.serviceStatus = serviceStatus;
}
/**
* 服务单状态名称
*/
public String getServiceStatusName() {
return serviceStatusName;
}
/**
* 服务单状态名称
*/
public void setServiceStatusName(String serviceStatusName) {
this.serviceStatusName = serviceStatusName;
}
/**
* 客户账号
*/
public String getCustomerPin() {
return customerPin;
}
/**
* 客户账号
*/
public void setCustomerPin(String customerPin) {
this.customerPin = customerPin;
}
/**
* 客户姓名
*/
public String getCustomerName() {
return customerName;
}
/**
* 客户姓名
*/
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
/**
* 用户电话
*/
public String getCustomerTel() {
return customerTel;
}
/**
* 用户电话
*/
public void setCustomerTel(String customerTel) {
this.customerTel = customerTel;
}
/**
* 取件地址
*/
public String getPickwareAddress() {
return pickwareAddress;
}
/**
* 取件地址
*/
public void setPickwareAddress(String pickwareAddress) {
this.pickwareAddress = pickwareAddress;
}
/**
* 取件方式(4-上门取件 5-上门换新取件 7-客户送货 8-大家电上门取件 9-大家电换新取件 40-客户发货 70-送货至门店 71-快递至门店 72-门店上门取件 80-京东快运上门取件 85-德邦取件)
*/
public Integer getPickwareType() {
return pickwareType;
}
/**
* 取件方式(4-上门取件 5-上门换新取件 7-客户送货 8-大家电上门取件 9-大家电换新取件 40-客户发货 70-送货至门店 71-快递至门店 72-门店上门取件 80-京东快运上门取件 85-德邦取件)
*/
public void setPickwareType(Integer pickwareType) {
this.pickwareType = pickwareType;
}
/**
* 订单号
*/
public Long getOrderId() {
return orderId;
}
/**
* 订单号
*/
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
/**
* 订单类型(0-一般订单 2-拍卖订单 11-售后调货 15-返修发货 16-直接赔偿 21-POPFBP 22-POPSOP 23-POPLBP 24-POPLBV 25-POPSOPL 18-厂商直送 19-客服补件 42-通用合约 61-EPT订单 69-京东服务产品订单 19-客服补件 75-LOC订单 77-LSP订单 42-虚拟订单 88-总代订单 96-sop虚拟订单 100-提货卡订单 33-电子礼品卡 49-礼品卡 108-京东维修服务产品订单 131-X无人超市订单 142-企业店铺IBS订单 151-品牌门店线下订单 112-自营采购以销定结 159-领货码订单 89-移动仓库订单 170-实体领货码订单 140-商家采购订单 193-scf订单 54-线下礼品卡订单 202-月卡订单 4-虚拟商品)
*/
public Integer getOrderType() {
return orderType;
}
/**
* 订单类型(0-一般订单 2-拍卖订单 11-售后调货 15-返修发货 16-直接赔偿 21-POPFBP 22-POPSOP 23-POPLBP 24-POPLBV 25-POPSOPL 18-厂商直送 19-客服补件 42-通用合约 61-EPT订单 69-京东服务产品订单 19-客服补件 75-LOC订单 77-LSP订单 42-虚拟订单 88-总代订单 96-sop虚拟订单 100-提货卡订单 33-电子礼品卡 49-礼品卡 108-京东维修服务产品订单 131-X无人超市订单 142-企业店铺IBS订单 151-品牌门店线下订单 112-自营采购以销定结 159-领货码订单 89-移动仓库订单 170-实体领货码订单 140-商家采购订单 193-scf订单 54-线下礼品卡订单 202-月卡订单 4-虚拟商品)
*/
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
/**
* 订单类型名称
*/
public String getOrderTypeName() {
return orderTypeName;
}
/**
* 订单类型名称
*/
public void setOrderTypeName(String orderTypeName) {
this.orderTypeName = orderTypeName;
}
/**
* 实付金额
*/
public BigDecimal getActualPayPrice() {
return actualPayPrice;
}
/**
* 实付金额
*/
public void setActualPayPrice(BigDecimal actualPayPrice) {
this.actualPayPrice = actualPayPrice;
}
/**
* 商品编号
*/
public Long getSkuId() {
return skuId;
}
/**
* 商品编号
*/
public void setSkuId(Long skuId) {
this.skuId = skuId;
}
/**
* 售后商品类型(10-申请主商品 20-申请的赠品 30-附件 40-发票 50-发票复印件 60-出检报告 70-包装 80-防损吊牌 90-贺卡 100-礼品购包装 110-loc订单验证码 120-服务产品标识)
*/
public Integer getWareType() {
return wareType;
}
/**
* 售后商品类型(10-申请主商品 20-申请的赠品 30-附件 40-发票 50-发票复印件 60-出检报告 70-包装 80-防损吊牌 90-贺卡 100-礼品购包装 110-loc订单验证码 120-服务产品标识)
*/
public void setWareType(Integer wareType) {
this.wareType = wareType;
}
/**
* 商品类型名称
*/
public String getWareTypeName() {
return wareTypeName;
}
/**
* 商品类型名称
*/
public void setWareTypeName(String wareTypeName) {
this.wareTypeName = wareTypeName;
}
/**
* 商品名称
*/
public String getWareName() {
return wareName;
}
/**
* 商品名称
*/
public void setWareName(String wareName) {
this.wareName = wareName;
}
/**
* 商品类型(1-单品 2-赠品套装中的主商品 3-赠品套装中的赠品 4-套装中的单品 5-套装中的赠品 6-加价购赠品 7-延保通 8-延保通赠品)
*/
public Integer getSkuType() {
return skuType;
}
/**
* 商品类型(1-单品 2-赠品套装中的主商品 3-赠品套装中的赠品 4-套装中的单品 5-套装中的赠品 6-加价购赠品 7-延保通 8-延保通赠品)
*/
public void setSkuType(Integer skuType) {
this.skuType = skuType;
}
/**
* skuType对应名称
*/
public String getSkuTypeName() {
return skuTypeName;
}
/**
* skuType对应名称
*/
public void setSkuTypeName(String skuTypeName) {
this.skuTypeName = skuTypeName;
}
/**
* 审核人账号
*/
public String getApprovePin() {
return approvePin;
}
/**
* 审核人账号
*/
public void setApprovePin(String approvePin) {
this.approvePin = approvePin;
}
/**
* 审核人姓名
*/
public String getApproveName() {
return approveName;
}
/**
* 审核人姓名
*/
public void setApproveName(String approveName) {
this.approveName = approveName;
}
/**
* 审核时间
*/
public Date getApproveTime() {
return approveTime;
}
/**
* 审核时间
*/
public void setApproveTime(Date approveTime) {
this.approveTime = approveTime;
}
/**
* 审核结果(11-直赔积分 12-直赔余额 13-直赔优惠卷 14-直赔京豆 21-直赔商品 22-上门换新 31-自营取件 32-客户送货 33-客户发货 34-闪电退款 35-虚拟退款 36-上门检测 37-客户送货至门店 38-保外维修 39-快递至门店 40-门店上门取件 80-大家电检测 81-大家电安装 82-大家电移机 83-大家电维修 84-大家电其它 85-闪电催收 86-上门维修 87-补发商品 91-退款不退货 92-预授权冻结 93-ACS换新 95-(超级体验店)门店换新 96-(超级体验店)主站换新 97-厂商维修-寄修 98-厂商维修-上门维修 99-厂商维修-送修 101-厂商大家电检测鉴定 102-厂商大家电安装 103-厂商大家电移机拆机 104-厂商大家电维修(上门维修) 105-厂商大家电拆机鉴定 106-换货 100-客户退货至团长 107-3c上门维修 108-增值服务 109-退货(筋斗云使用) 110-直赔(筋斗云使用) 111-上门检测取件)
*/
public Integer getApproveResult() {
return approveResult;
}
/**
* 审核结果(11-直赔积分 12-直赔余额 13-直赔优惠卷 14-直赔京豆 21-直赔商品 22-上门换新 31-自营取件 32-客户送货 33-客户发货 34-闪电退款 35-虚拟退款 36-上门检测 37-客户送货至门店 38-保外维修 39-快递至门店 40-门店上门取件 80-大家电检测 81-大家电安装 82-大家电移机 83-大家电维修 84-大家电其它 85-闪电催收 86-上门维修 87-补发商品 91-退款不退货 92-预授权冻结 93-ACS换新 95-(超级体验店)门店换新 96-(超级体验店)主站换新 97-厂商维修-寄修 98-厂商维修-上门维修 99-厂商维修-送修 101-厂商大家电检测鉴定 102-厂商大家电安装 103-厂商大家电移机拆机 104-厂商大家电维修(上门维修) 105-厂商大家电拆机鉴定 106-换货 100-客户退货至团长 107-3c上门维修 108-增值服务 109-退货(筋斗云使用) 110-直赔(筋斗云使用) 111-上门检测取件)
*/
public void setApproveResult(Integer approveResult) {
this.approveResult = approveResult;
}
/**
* 审核结果名称
*/
public String getApproveResultName() {
return approveResultName;
}
/**
* 审核结果名称
*/
public void setApproveResultName(String approveResultName) {
this.approveResultName = approveResultName;
}
/**
* 处理人账号
*/
public String getProcessPin() {
return processPin;
}
/**
* 处理人账号
*/
public void setProcessPin(String processPin) {
this.processPin = processPin;
}
/**
* 处理人姓名
*/
public String getProcessName() {
return processName;
}
/**
* 处理人姓名
*/
public void setProcessName(String processName) {
this.processName = processName;
}
/**
* 处理时间
*/
public Date getProcessTime() {
return processTime;
}
/**
* 处理时间
*/
public void setProcessTime(Date processTime) {
this.processTime = processTime;
}
/**
* 处理结果(0-初始化 1-安装完成 2-维修完成 3-检测完成 4-拆机完成 5-咨询解释 6-取消 70-原返 80-换货 100-赔付)
*/
public Integer getProcessResult() {
return processResult;
}
/**
* 处理结果(0-初始化 1-安装完成 2-维修完成 3-检测完成 4-拆机完成 5-咨询解释 6-取消 70-原返 80-换货 100-赔付)
*/
public void setProcessResult(Integer processResult) {
this.processResult = processResult;
}
/**
* 处理结果名称
*/
public String getProcessResultName() {
return processResultName;
}
/**
* 处理结果名称
*/
public void setProcessResultName(String processResultName) {
this.processResultName = processResultName;
}
/**
* 平台来源
*/
public Integer getPlatformSrc() {
return platformSrc;
}
/**
* 平台来源
*/
public void setPlatformSrc(Integer platformSrc) {
this.platformSrc = platformSrc;
}
/**
* 平台来源名称
*/
public String getPlatformSrcName() {
return platformSrcName;
}
/**
* 平台来源名称
*/
public void setPlatformSrcName(String platformSrcName) {
this.platformSrcName = platformSrcName;
}
/**
* 服务单售后数量
*/
public Integer getServiceCount() {
return serviceCount;
}
/**
* 服务单售后数量
*/
public void setServiceCount(Integer serviceCount) {
this.serviceCount = serviceCount;
}
/**
* 用户电话
*/
public String getDesenCustomerTel() {
return desenCustomerTel;
}
/**
* 用户电话
*/
public void setDesenCustomerTel(String desenCustomerTel) {
this.desenCustomerTel = desenCustomerTel;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
JdOrderAfter other = (JdOrderAfter) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
&& (this.getApplyId() == null ? other.getApplyId() == null : this.getApplyId().equals(other.getApplyId()))
&& (this.getServiceId() == null ? other.getServiceId() == null : this.getServiceId().equals(other.getServiceId()))
&& (this.getApplyTime() == null ? other.getApplyTime() == null : this.getApplyTime().equals(other.getApplyTime()))
&& (this.getCustomerExpect() == null ? other.getCustomerExpect() == null : this.getCustomerExpect().equals(other.getCustomerExpect()))
&& (this.getCustomerExpectName() == null ? other.getCustomerExpectName() == null : this.getCustomerExpectName().equals(other.getCustomerExpectName()))
&& (this.getServiceStatus() == null ? other.getServiceStatus() == null : this.getServiceStatus().equals(other.getServiceStatus()))
&& (this.getServiceStatusName() == null ? other.getServiceStatusName() == null : this.getServiceStatusName().equals(other.getServiceStatusName()))
&& (this.getCustomerPin() == null ? other.getCustomerPin() == null : this.getCustomerPin().equals(other.getCustomerPin()))
&& (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()))
&& (this.getCustomerTel() == null ? other.getCustomerTel() == null : this.getCustomerTel().equals(other.getCustomerTel()))
&& (this.getPickwareAddress() == null ? other.getPickwareAddress() == null : this.getPickwareAddress().equals(other.getPickwareAddress()))
&& (this.getPickwareType() == null ? other.getPickwareType() == null : this.getPickwareType().equals(other.getPickwareType()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
&& (this.getOrderTypeName() == null ? other.getOrderTypeName() == null : this.getOrderTypeName().equals(other.getOrderTypeName()))
&& (this.getActualPayPrice() == null ? other.getActualPayPrice() == null : this.getActualPayPrice().equals(other.getActualPayPrice()))
&& (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId()))
&& (this.getWareType() == null ? other.getWareType() == null : this.getWareType().equals(other.getWareType()))
&& (this.getWareTypeName() == null ? other.getWareTypeName() == null : this.getWareTypeName().equals(other.getWareTypeName()))
&& (this.getWareName() == null ? other.getWareName() == null : this.getWareName().equals(other.getWareName()))
&& (this.getSkuType() == null ? other.getSkuType() == null : this.getSkuType().equals(other.getSkuType()))
&& (this.getSkuTypeName() == null ? other.getSkuTypeName() == null : this.getSkuTypeName().equals(other.getSkuTypeName()))
&& (this.getApprovePin() == null ? other.getApprovePin() == null : this.getApprovePin().equals(other.getApprovePin()))
&& (this.getApproveName() == null ? other.getApproveName() == null : this.getApproveName().equals(other.getApproveName()))
&& (this.getApproveTime() == null ? other.getApproveTime() == null : this.getApproveTime().equals(other.getApproveTime()))
&& (this.getApproveResult() == null ? other.getApproveResult() == null : this.getApproveResult().equals(other.getApproveResult()))
&& (this.getApproveResultName() == null ? other.getApproveResultName() == null : this.getApproveResultName().equals(other.getApproveResultName()))
&& (this.getProcessPin() == null ? other.getProcessPin() == null : this.getProcessPin().equals(other.getProcessPin()))
&& (this.getProcessName() == null ? other.getProcessName() == null : this.getProcessName().equals(other.getProcessName()))
&& (this.getProcessTime() == null ? other.getProcessTime() == null : this.getProcessTime().equals(other.getProcessTime()))
&& (this.getProcessResult() == null ? other.getProcessResult() == null : this.getProcessResult().equals(other.getProcessResult()))
&& (this.getProcessResultName() == null ? other.getProcessResultName() == null : this.getProcessResultName().equals(other.getProcessResultName()))
&& (this.getPlatformSrc() == null ? other.getPlatformSrc() == null : this.getPlatformSrc().equals(other.getPlatformSrc()))
&& (this.getPlatformSrcName() == null ? other.getPlatformSrcName() == null : this.getPlatformSrcName().equals(other.getPlatformSrcName()))
&& (this.getServiceCount() == null ? other.getServiceCount() == null : this.getServiceCount().equals(other.getServiceCount()))
&& (this.getDesenCustomerTel() == null ? other.getDesenCustomerTel() == null : this.getDesenCustomerTel().equals(other.getDesenCustomerTel()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
result = prime * result + ((getApplyId() == null) ? 0 : getApplyId().hashCode());
result = prime * result + ((getServiceId() == null) ? 0 : getServiceId().hashCode());
result = prime * result + ((getApplyTime() == null) ? 0 : getApplyTime().hashCode());
result = prime * result + ((getCustomerExpect() == null) ? 0 : getCustomerExpect().hashCode());
result = prime * result + ((getCustomerExpectName() == null) ? 0 : getCustomerExpectName().hashCode());
result = prime * result + ((getServiceStatus() == null) ? 0 : getServiceStatus().hashCode());
result = prime * result + ((getServiceStatusName() == null) ? 0 : getServiceStatusName().hashCode());
result = prime * result + ((getCustomerPin() == null) ? 0 : getCustomerPin().hashCode());
result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
result = prime * result + ((getCustomerTel() == null) ? 0 : getCustomerTel().hashCode());
result = prime * result + ((getPickwareAddress() == null) ? 0 : getPickwareAddress().hashCode());
result = prime * result + ((getPickwareType() == null) ? 0 : getPickwareType().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
result = prime * result + ((getOrderTypeName() == null) ? 0 : getOrderTypeName().hashCode());
result = prime * result + ((getActualPayPrice() == null) ? 0 : getActualPayPrice().hashCode());
result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode());
result = prime * result + ((getWareType() == null) ? 0 : getWareType().hashCode());
result = prime * result + ((getWareTypeName() == null) ? 0 : getWareTypeName().hashCode());
result = prime * result + ((getWareName() == null) ? 0 : getWareName().hashCode());
result = prime * result + ((getSkuType() == null) ? 0 : getSkuType().hashCode());
result = prime * result + ((getSkuTypeName() == null) ? 0 : getSkuTypeName().hashCode());
result = prime * result + ((getApprovePin() == null) ? 0 : getApprovePin().hashCode());
result = prime * result + ((getApproveName() == null) ? 0 : getApproveName().hashCode());
result = prime * result + ((getApproveTime() == null) ? 0 : getApproveTime().hashCode());
result = prime * result + ((getApproveResult() == null) ? 0 : getApproveResult().hashCode());
result = prime * result + ((getApproveResultName() == null) ? 0 : getApproveResultName().hashCode());
result = prime * result + ((getProcessPin() == null) ? 0 : getProcessPin().hashCode());
result = prime * result + ((getProcessName() == null) ? 0 : getProcessName().hashCode());
result = prime * result + ((getProcessTime() == null) ? 0 : getProcessTime().hashCode());
result = prime * result + ((getProcessResult() == null) ? 0 : getProcessResult().hashCode());
result = prime * result + ((getProcessResultName() == null) ? 0 : getProcessResultName().hashCode());
result = prime * result + ((getPlatformSrc() == null) ? 0 : getPlatformSrc().hashCode());
result = prime * result + ((getPlatformSrcName() == null) ? 0 : getPlatformSrcName().hashCode());
result = prime * result + ((getServiceCount() == null) ? 0 : getServiceCount().hashCode());
result = prime * result + ((getDesenCustomerTel() == null) ? 0 : getDesenCustomerTel().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", shopId=").append(shopId);
sb.append(", applyId=").append(applyId);
sb.append(", serviceId=").append(serviceId);
sb.append(", applyTime=").append(applyTime);
sb.append(", customerExpect=").append(customerExpect);
sb.append(", customerExpectName=").append(customerExpectName);
sb.append(", serviceStatus=").append(serviceStatus);
sb.append(", serviceStatusName=").append(serviceStatusName);
sb.append(", customerPin=").append(customerPin);
sb.append(", customerName=").append(customerName);
sb.append(", customerTel=").append(customerTel);
sb.append(", pickwareAddress=").append(pickwareAddress);
sb.append(", pickwareType=").append(pickwareType);
sb.append(", orderId=").append(orderId);
sb.append(", orderType=").append(orderType);
sb.append(", orderTypeName=").append(orderTypeName);
sb.append(", actualPayPrice=").append(actualPayPrice);
sb.append(", skuId=").append(skuId);
sb.append(", wareType=").append(wareType);
sb.append(", wareTypeName=").append(wareTypeName);
sb.append(", wareName=").append(wareName);
sb.append(", skuType=").append(skuType);
sb.append(", skuTypeName=").append(skuTypeName);
sb.append(", approvePin=").append(approvePin);
sb.append(", approveName=").append(approveName);
sb.append(", approveTime=").append(approveTime);
sb.append(", approveResult=").append(approveResult);
sb.append(", approveResultName=").append(approveResultName);
sb.append(", processPin=").append(processPin);
sb.append(", processName=").append(processName);
sb.append(", processTime=").append(processTime);
sb.append(", processResult=").append(processResult);
sb.append(", processResultName=").append(processResultName);
sb.append(", platformSrc=").append(platformSrc);
sb.append(", platformSrcName=").append(platformSrcName);
sb.append(", serviceCount=").append(serviceCount);
sb.append(", desenCustomerTel=").append(desenCustomerTel);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@ -1,462 +1,265 @@
package com.qihang.sys.api.domain; package com.qihang.sys.api.domain;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
* 订单明细表 * 订单明细表
* @TableName o_order_item * @TableName o_order_item
*/ */
public class OOrderItem implements Serializable { public class OOrderItem implements Serializable {
/** /**
* id自增 * id自增
*/ */
private Long id; private Long id;
/** /**
* 订单ID * 订单IDo_order外键
*/ */
private Long orderId; private Long orderId;
/** /**
* erp系统商品id * 子订单号第三方平台
*/ */
private Long goodsId; private String subOrderNum;
/** /**
* erp系统商品规格id * 第三方平台skuId
*/ */
private Long skuId; private String skuId;
/** /**
* 商品标题 * erp系统商品id
*/ */
private Long erpGoodsId;
/**
* erp系统商品规格id
*/
private Long erpSkuId;
/**
* 商品标题
*/
private String goodsTitle; private String goodsTitle;
/** /**
* 商品图片 * 商品图片
*/ */
private String goodsImg; private String goodsImg;
/** /**
* 商品编码 * 商品编码
*/ */
private String goodsNum; private String goodsNum;
/** /**
* 商品规格 * 商品规格
*/ */
private String goodsSpec; private String goodsSpec;
/** /**
* 商品规格编码 * 商品规格编码
*/ */
private String skuNum; private String skuNum;
/** /**
* 商品单价 * 商品单价
*/ */
private Double goodsPrice; private Double goodsPrice;
/** /**
* 子订单金额 * 子订单金额
*/ */
private Double itemAmount; private Double itemAmount;
/** /**
* 商品数量 * 商品数量
*/ */
private Integer quantity; private Integer quantity;
/** /**
* 备注 * 备注
*/ */
private String remark; private String remark;
/** /**
* 已退货数量 * 已退货数量
*/ */
private Integer refundCount; private Integer refundCount;
/** /**
* 售后状态 1无售后或售后关闭2售后处理中3退款中4 退款成功 * 售后状态 1无售后或售后关闭2售后处理中3退款中4 退款成功
*/ */
private Integer refundStatus; private Integer refundStatus;
/** /**
* 创建时间 * 创建时间
*/ */
private Date createTime; private Date createTime;
/** /**
* 创建人 * 创建人
*/ */
private String createBy; private String createBy;
/** /**
* 更新时间 * 更新时间
*/ */
private Date updateTime; private Date updateTime;
/** /**
* 更新人 * 更新人
*/ */
private String updateBy; private String updateBy;
private static final long serialVersionUID = 1L;
/**
* id自增
*/
public Long getId() { public Long getId() {
return id; return id;
} }
/**
* id自增
*/
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
/**
* 订单ID
*/
public Long getOrderId() { public Long getOrderId() {
return orderId; return orderId;
} }
/**
* 订单ID
*/
public void setOrderId(Long orderId) { public void setOrderId(Long orderId) {
this.orderId = orderId; this.orderId = orderId;
} }
/** public String getSubOrderNum() {
* erp系统商品id return subOrderNum;
*/
public Long getGoodsId() {
return goodsId;
} }
/** public void setSubOrderNum(String subOrderNum) {
* erp系统商品id this.subOrderNum = subOrderNum;
*/
public void setGoodsId(Long goodsId) {
this.goodsId = goodsId;
} }
/** public String getSkuId() {
* erp系统商品规格id
*/
public Long getSkuId() {
return skuId; return skuId;
} }
/** public void setSkuId(String skuId) {
* erp系统商品规格id
*/
public void setSkuId(Long skuId) {
this.skuId = skuId; this.skuId = skuId;
} }
/** public Long getErpGoodsId() {
* 商品标题 return erpGoodsId;
*/ }
public void setErpGoodsId(Long erpGoodsId) {
this.erpGoodsId = erpGoodsId;
}
public Long getErpSkuId() {
return erpSkuId;
}
public void setErpSkuId(Long erpSkuId) {
this.erpSkuId = erpSkuId;
}
public String getGoodsTitle() { public String getGoodsTitle() {
return goodsTitle; return goodsTitle;
} }
/**
* 商品标题
*/
public void setGoodsTitle(String goodsTitle) { public void setGoodsTitle(String goodsTitle) {
this.goodsTitle = goodsTitle; this.goodsTitle = goodsTitle;
} }
/**
* 商品图片
*/
public String getGoodsImg() { public String getGoodsImg() {
return goodsImg; return goodsImg;
} }
/**
* 商品图片
*/
public void setGoodsImg(String goodsImg) { public void setGoodsImg(String goodsImg) {
this.goodsImg = goodsImg; this.goodsImg = goodsImg;
} }
/**
* 商品编码
*/
public String getGoodsNum() { public String getGoodsNum() {
return goodsNum; return goodsNum;
} }
/**
* 商品编码
*/
public void setGoodsNum(String goodsNum) { public void setGoodsNum(String goodsNum) {
this.goodsNum = goodsNum; this.goodsNum = goodsNum;
} }
/**
* 商品规格
*/
public String getGoodsSpec() { public String getGoodsSpec() {
return goodsSpec; return goodsSpec;
} }
/**
* 商品规格
*/
public void setGoodsSpec(String goodsSpec) { public void setGoodsSpec(String goodsSpec) {
this.goodsSpec = goodsSpec; this.goodsSpec = goodsSpec;
} }
/**
* 商品规格编码
*/
public String getSkuNum() { public String getSkuNum() {
return skuNum; return skuNum;
} }
/**
* 商品规格编码
*/
public void setSkuNum(String skuNum) { public void setSkuNum(String skuNum) {
this.skuNum = skuNum; this.skuNum = skuNum;
} }
/**
* 商品单价
*/
public Double getGoodsPrice() { public Double getGoodsPrice() {
return goodsPrice; return goodsPrice;
} }
/**
* 商品单价
*/
public void setGoodsPrice(Double goodsPrice) { public void setGoodsPrice(Double goodsPrice) {
this.goodsPrice = goodsPrice; this.goodsPrice = goodsPrice;
} }
/**
* 子订单金额
*/
public Double getItemAmount() { public Double getItemAmount() {
return itemAmount; return itemAmount;
} }
/**
* 子订单金额
*/
public void setItemAmount(Double itemAmount) { public void setItemAmount(Double itemAmount) {
this.itemAmount = itemAmount; this.itemAmount = itemAmount;
} }
/**
* 商品数量
*/
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
/**
* 商品数量
*/
public void setQuantity(Integer quantity) { public void setQuantity(Integer quantity) {
this.quantity = quantity; this.quantity = quantity;
} }
/**
* 备注
*/
public String getRemark() { public String getRemark() {
return remark; return remark;
} }
/**
* 备注
*/
public void setRemark(String remark) { public void setRemark(String remark) {
this.remark = remark; this.remark = remark;
} }
/**
* 已退货数量
*/
public Integer getRefundCount() { public Integer getRefundCount() {
return refundCount; return refundCount;
} }
/**
* 已退货数量
*/
public void setRefundCount(Integer refundCount) { public void setRefundCount(Integer refundCount) {
this.refundCount = refundCount; this.refundCount = refundCount;
} }
/**
* 售后状态 1无售后或售后关闭2售后处理中3退款中4 退款成功
*/
public Integer getRefundStatus() { public Integer getRefundStatus() {
return refundStatus; return refundStatus;
} }
/**
* 售后状态 1无售后或售后关闭2售后处理中3退款中4 退款成功
*/
public void setRefundStatus(Integer refundStatus) { public void setRefundStatus(Integer refundStatus) {
this.refundStatus = refundStatus; this.refundStatus = refundStatus;
} }
/**
* 创建时间
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
/**
* 创建时间
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
/**
* 创建人
*/
public String getCreateBy() { public String getCreateBy() {
return createBy; return createBy;
} }
/**
* 创建人
*/
public void setCreateBy(String createBy) { public void setCreateBy(String createBy) {
this.createBy = createBy; this.createBy = createBy;
} }
/**
* 更新时间
*/
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
/**
* 更新时间
*/
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
/**
* 更新人
*/
public String getUpdateBy() { public String getUpdateBy() {
return updateBy; return updateBy;
} }
/**
* 更新人
*/
public void setUpdateBy(String updateBy) { public void setUpdateBy(String updateBy) {
this.updateBy = updateBy; this.updateBy = updateBy;
} }
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
OOrderItem other = (OOrderItem) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
&& (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId()))
&& (this.getGoodsTitle() == null ? other.getGoodsTitle() == null : this.getGoodsTitle().equals(other.getGoodsTitle()))
&& (this.getGoodsImg() == null ? other.getGoodsImg() == null : this.getGoodsImg().equals(other.getGoodsImg()))
&& (this.getGoodsNum() == null ? other.getGoodsNum() == null : this.getGoodsNum().equals(other.getGoodsNum()))
&& (this.getGoodsSpec() == null ? other.getGoodsSpec() == null : this.getGoodsSpec().equals(other.getGoodsSpec()))
&& (this.getSkuNum() == null ? other.getSkuNum() == null : this.getSkuNum().equals(other.getSkuNum()))
&& (this.getGoodsPrice() == null ? other.getGoodsPrice() == null : this.getGoodsPrice().equals(other.getGoodsPrice()))
&& (this.getItemAmount() == null ? other.getItemAmount() == null : this.getItemAmount().equals(other.getItemAmount()))
&& (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getRefundCount() == null ? other.getRefundCount() == null : this.getRefundCount().equals(other.getRefundCount()))
&& (this.getRefundStatus() == null ? other.getRefundStatus() == null : this.getRefundStatus().equals(other.getRefundStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode());
result = prime * result + ((getGoodsTitle() == null) ? 0 : getGoodsTitle().hashCode());
result = prime * result + ((getGoodsImg() == null) ? 0 : getGoodsImg().hashCode());
result = prime * result + ((getGoodsNum() == null) ? 0 : getGoodsNum().hashCode());
result = prime * result + ((getGoodsSpec() == null) ? 0 : getGoodsSpec().hashCode());
result = prime * result + ((getSkuNum() == null) ? 0 : getSkuNum().hashCode());
result = prime * result + ((getGoodsPrice() == null) ? 0 : getGoodsPrice().hashCode());
result = prime * result + ((getItemAmount() == null) ? 0 : getItemAmount().hashCode());
result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
result = prime * result + ((getRefundCount() == null) ? 0 : getRefundCount().hashCode());
result = prime * result + ((getRefundStatus() == null) ? 0 : getRefundStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", orderId=").append(orderId);
sb.append(", goodsId=").append(goodsId);
sb.append(", skuId=").append(skuId);
sb.append(", goodsTitle=").append(goodsTitle);
sb.append(", goodsImg=").append(goodsImg);
sb.append(", goodsNum=").append(goodsNum);
sb.append(", goodsSpec=").append(goodsSpec);
sb.append(", skuNum=").append(skuNum);
sb.append(", goodsPrice=").append(goodsPrice);
sb.append(", itemAmount=").append(itemAmount);
sb.append(", quantity=").append(quantity);
sb.append(", remark=").append(remark);
sb.append(", refundCount=").append(refundCount);
sb.append(", refundStatus=").append(refundStatus);
sb.append(", createTime=").append(createTime);
sb.append(", createBy=").append(createBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@ -0,0 +1,18 @@
package com.qihang.sys.api.mapper;
import com.qihang.sys.api.domain.JdOrderAfter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author qilip
* @description 针对表jd_order_after(京东售后)的数据库操作Mapper
* @createDate 2024-03-10 18:54:09
* @Entity com.qihang.sys.api.domain.JdOrderAfter
*/
public interface JdOrderAfterMapper extends BaseMapper<JdOrderAfter> {
}

View File

@ -0,0 +1,13 @@
package com.qihang.sys.api.service;
import com.qihang.sys.api.domain.JdOrderAfter;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author qilip
* @description 针对表jd_order_after(京东售后)的数据库操作Service
* @createDate 2024-03-10 18:54:09
*/
public interface JdOrderAfterService extends IService<JdOrderAfter> {
}

View File

@ -0,0 +1,22 @@
package com.qihang.sys.api.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qihang.sys.api.domain.JdOrderAfter;
import com.qihang.sys.api.service.JdOrderAfterService;
import com.qihang.sys.api.mapper.JdOrderAfterMapper;
import org.springframework.stereotype.Service;
/**
* @author qilip
* @description 针对表jd_order_after(京东售后)的数据库操作Service实现
* @createDate 2024-03-10 18:54:09
*/
@Service
public class JdOrderAfterServiceImpl extends ServiceImpl<JdOrderAfterMapper, JdOrderAfter>
implements JdOrderAfterService{
}

View File

@ -87,6 +87,7 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
for (var item : jdOrderItems) { for (var item : jdOrderItems) {
OOrderItem orderItem = new OOrderItem(); OOrderItem orderItem = new OOrderItem();
orderItem.setOrderId(insert.getId()); orderItem.setOrderId(insert.getId());
orderItem.setSubOrderNum(item.getId().toString());
// TODO这里将订单商品skuid转换成erp系统的skuid // TODO这里将订单商品skuid转换成erp系统的skuid
Long erpGoodsId = 0L; Long erpGoodsId = 0L;
Long erpSkuId = 0L; Long erpSkuId = 0L;
@ -99,8 +100,11 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
orderItem.setGoodsSpec(jdGoodsSkus.get(0).getSkuName()); orderItem.setGoodsSpec(jdGoodsSkus.get(0).getSkuName());
orderItem.setSkuNum(jdGoodsSkus.get(0).getOuterId()); orderItem.setSkuNum(jdGoodsSkus.get(0).getOuterId());
} }
orderItem.setGoodsId(erpGoodsId); orderItem.setSkuId(item.getSkuId());
orderItem.setSkuId(erpSkuId); orderItem.setErpGoodsId(erpGoodsId);
orderItem.setErpSkuId(erpSkuId);
// orderItem.setGoodsId(erpGoodsId);
// orderItem.setSkuId(erpSkuId);
orderItem.setGoodsTitle(item.getSkuName()); orderItem.setGoodsTitle(item.getSkuName());
orderItem.setGoodsPrice(StringUtils.isEmpty(item.getJdPrice())?0.0:Double.parseDouble(item.getJdPrice())); orderItem.setGoodsPrice(StringUtils.isEmpty(item.getJdPrice())?0.0:Double.parseDouble(item.getJdPrice()));
Integer quantity = StringUtils.isEmpty(item.getItemTotal())?0: Integer.parseInt(item.getItemTotal()); Integer quantity = StringUtils.isEmpty(item.getItemTotal())?0: Integer.parseInt(item.getItemTotal());

View File

@ -4,16 +4,16 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qihang.common.common.ResultVo; import com.qihang.common.common.ResultVo;
import com.qihang.common.common.ResultVoEnum; import com.qihang.common.common.ResultVoEnum;
import com.qihang.sys.api.domain.JdRefund; import com.qihang.common.enums.EnumShopType;
import com.qihang.sys.api.domain.ORefund; import com.qihang.sys.api.domain.*;
import com.qihang.sys.api.mapper.JdRefundMapper; import com.qihang.sys.api.mapper.*;
import com.qihang.sys.api.service.ORefundService; import com.qihang.sys.api.service.ORefundService;
import com.qihang.sys.api.mapper.ORefundMapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.java.Log; import lombok.extern.java.Log;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -27,25 +27,71 @@ import java.util.List;
public class ORefundServiceImpl extends ServiceImpl<ORefundMapper, ORefund> public class ORefundServiceImpl extends ServiceImpl<ORefundMapper, ORefund>
implements ORefundService{ implements ORefundService{
private final ORefundMapper mapper; private final ORefundMapper mapper;
private final JdRefundMapper jdRefundMapper; private final JdOrderAfterMapper jdOrderAfterMapper;
private final OOrderItemMapper orderItemMapper;
private final OOrderMapper orderMapper;
private final JdOrderMapper jdOrderMapper;
private final JdOrderItemMapper jdOrderItemMapper;
@Transactional @Transactional
@Override @Override
public ResultVo<Integer> jdRefundMessage(String refundId) { public ResultVo<Integer> jdRefundMessage(String refundId) {
log.info("京东退款消息处理"+refundId); log.info("京东退款消息处理"+refundId);
// TODO:业务问题一个订单退款单是否包含多个商品一个京东订单是否包含多个ITEM // TODO:业务问题一个订单退款单是否包含多个商品一个京东订单是否包含多个ITEM
List<JdRefund> jdRefunds = jdRefundMapper.selectList(new LambdaQueryWrapper<JdRefund>().eq(JdRefund::getRefundId, refundId)); List<JdOrderAfter> afterList = jdOrderAfterMapper.selectList(new LambdaQueryWrapper<JdOrderAfter>().eq(JdOrderAfter::getApplyId, refundId));
if(jdRefunds == null || jdRefunds.size() == 0) { if(afterList == null || afterList.size() == 0) {
// 没有找到订单信息 // 没有找到订单信息
return new ResultVo<>(ResultVoEnum.NotFound,"没有找到京东退款单:"+refundId); return new ResultVo<>(ResultVoEnum.NotFound,"没有找到京东售后单:"+refundId);
} }
JdRefund jdRefund = jdRefunds.get(0); JdOrderAfter jdAfter = afterList.get(0);
List<ORefund> oRefunds = mapper.selectList(new LambdaQueryWrapper<ORefund>().eq(ORefund::getRefundNum, jdRefund.getRefundId())); // 查询子订单
OOrder order = null;
OOrderItem orderItem = null;
List<OOrder> oOrders = orderMapper.selectList(new LambdaQueryWrapper<OOrder>().eq(OOrder::getOrderNum, jdAfter.getOrderId()).eq(OOrder::getShopId, jdAfter.getShopId()));
if(oOrders!=null && oOrders.size()>0){
order = oOrders.get(0);
List<OOrderItem> oOrderItems = orderItemMapper.selectList(new LambdaQueryWrapper<OOrderItem>().eq(OOrderItem::getOrderId, oOrders.get(0).getId()).eq(OOrderItem::getSkuId, jdAfter.getSkuId()));
if(oOrderItems!=null && oOrderItems.size()>0){
orderItem = oOrderItems.get(0);
}else{
return new ResultVo<>(ResultVoEnum.NotFound,"没有找到京东子订单信息:"+jdAfter.getOrderId()+",SKU:"+jdAfter.getSkuId());
}
}else{
return new ResultVo<>(ResultVoEnum.NotFound,"没有找到京东订单信息:"+jdAfter.getOrderId());
}
List<ORefund> oRefunds = mapper.selectList(new LambdaQueryWrapper<ORefund>().eq(ORefund::getRefundNum, jdAfter.getApplyId()));
if(oRefunds == null || oRefunds.isEmpty()) { if(oRefunds == null || oRefunds.isEmpty()) {
// 新增 // 新增
ORefund insert = new ORefund(); ORefund insert = new ORefund();
insert.setRefundNum(jdAfter.getApplyId().toString());
insert.setRefundType(jdAfter.getCustomerExpect());
insert.setShopId(jdAfter.getShopId());
insert.setShopType(EnumShopType.JD.getIndex());
insert.setOrderNum(jdAfter.getOrderId().toString());
insert.setOrderItemNum(orderItem.getSubOrderNum());
insert.setSkuId(jdAfter.getSkuId());
insert.setErpGoodsId(orderItem.getErpGoodsId());
insert.setErpSkuId(orderItem.getErpSkuId());
insert.setSkuNum(orderItem.getSkuNum());
insert.setGoodsName(orderItem.getGoodsTitle());
insert.setGoodsSku(orderItem.getGoodsSpec());
insert.setGoodsImage(orderItem.getGoodsImg());
insert.setQuantity(jdAfter.getServiceCount().longValue());
insert.setContactperson(jdAfter.getCustomerName());
insert.setMobile(jdAfter.getCustomerTel());
insert.setAddress(jdAfter.getPickwareAddress());
insert.setStatus(jdAfter.getServiceStatus());
insert.setCreateTime(new Date());
insert.setCreateBy("REFUND_MESSAGE");
mapper.insert(insert);
}else{ }else{
// 修改 // 修改
ORefund update = new ORefund();
update.setId(oRefunds.get(0).getId());
update.setStatus(jdAfter.getServiceStatus());
update.setUpdateTime(new Date());
update.setUpdateBy("REFUND_MESSAGE");
mapper.updateById(update);
} }
return null; return null;
} }

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qihang.sys.api.mapper.JdOrderAfterMapper">
<resultMap id="BaseResultMap" type="com.qihang.sys.api.domain.JdOrderAfter">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="applyId" column="apply_id" jdbcType="BIGINT"/>
<result property="serviceId" column="service_id" jdbcType="BIGINT"/>
<result property="applyTime" column="apply_time" jdbcType="TIMESTAMP"/>
<result property="customerExpect" column="customer_expect" jdbcType="INTEGER"/>
<result property="customerExpectName" column="customer_expect_name" jdbcType="VARCHAR"/>
<result property="serviceStatus" column="service_status" jdbcType="INTEGER"/>
<result property="serviceStatusName" column="service_status_name" jdbcType="VARCHAR"/>
<result property="customerPin" column="customer_pin" jdbcType="VARCHAR"/>
<result property="customerName" column="customer_name" jdbcType="VARCHAR"/>
<result property="customerTel" column="customer_tel" jdbcType="VARCHAR"/>
<result property="pickwareAddress" column="pickware_address" jdbcType="VARCHAR"/>
<result property="pickwareType" column="pickware_type" jdbcType="INTEGER"/>
<result property="orderId" column="order_id" jdbcType="BIGINT"/>
<result property="orderType" column="order_type" jdbcType="INTEGER"/>
<result property="orderTypeName" column="order_type_name" jdbcType="VARCHAR"/>
<result property="actualPayPrice" column="actual_pay_price" jdbcType="DECIMAL"/>
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
<result property="wareType" column="ware_type" jdbcType="INTEGER"/>
<result property="wareTypeName" column="ware_type_name" jdbcType="VARCHAR"/>
<result property="wareName" column="ware_name" jdbcType="VARCHAR"/>
<result property="skuType" column="sku_type" jdbcType="INTEGER"/>
<result property="skuTypeName" column="sku_type_name" jdbcType="VARCHAR"/>
<result property="approvePin" column="approve_pin" jdbcType="VARCHAR"/>
<result property="approveName" column="approve_name" jdbcType="VARCHAR"/>
<result property="approveTime" column="approve_time" jdbcType="TIMESTAMP"/>
<result property="approveResult" column="approve_result" jdbcType="INTEGER"/>
<result property="approveResultName" column="approve_result_name" jdbcType="VARCHAR"/>
<result property="processPin" column="process_pin" jdbcType="VARCHAR"/>
<result property="processName" column="process_name" jdbcType="VARCHAR"/>
<result property="processTime" column="process_time" jdbcType="TIMESTAMP"/>
<result property="processResult" column="process_result" jdbcType="INTEGER"/>
<result property="processResultName" column="process_result_name" jdbcType="VARCHAR"/>
<result property="platformSrc" column="platform_src" jdbcType="INTEGER"/>
<result property="platformSrcName" column="platform_src_name" jdbcType="VARCHAR"/>
<result property="serviceCount" column="service_count" jdbcType="INTEGER"/>
<result property="desenCustomerTel" column="desen_customer_tel" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,shop_id,apply_id,
service_id,apply_time,customer_expect,
customer_expect_name,service_status,service_status_name,
customer_pin,customer_name,customer_tel,
pickware_address,pickware_type,order_id,
order_type,order_type_name,actual_pay_price,
sku_id,ware_type,ware_type_name,
ware_name,sku_type,sku_type_name,
approve_pin,approve_name,approve_time,
approve_result,approve_result_name,process_pin,
process_name,process_time,process_result,
process_result_name,platform_src,platform_src_name,
service_count,desen_customer_tel
</sql>
</mapper>