This commit is contained in:
parent
fa1615d7f8
commit
492448d564
|
|
@ -91,4 +91,8 @@ public class HttpStatus
|
|||
* 系统警告消息
|
||||
*/
|
||||
public static final int WARN = 601;
|
||||
|
||||
public static final int PARAMS_ERROR = 1001;
|
||||
public static final int SYSTEM_EXCEPTION = 2001;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
Target Server Version : 80032
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 29/02/2024 16:03:40
|
||||
Date: 29/02/2024 20:37:45
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
|
|
@ -87,7 +87,7 @@ CREATE TABLE `sys_platform` (
|
|||
-- ----------------------------
|
||||
-- Records of sys_platform
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_platform` VALUES (1, '天猫', 'TMALL', NULL, NULL);
|
||||
INSERT INTO `sys_platform` VALUES (1, '天猫', 'TMALL', '12175777', '368dbbd183a77d551735be13f59bbcda');
|
||||
INSERT INTO `sys_platform` VALUES (2, '京东', 'JD', NULL, NULL);
|
||||
INSERT INTO `sys_platform` VALUES (3, '抖店', 'DOUDIAN', NULL, NULL);
|
||||
INSERT INTO `sys_platform` VALUES (4, '拼多多', 'PDD', NULL, NULL);
|
||||
|
|
@ -120,7 +120,7 @@ CREATE TABLE `sys_shop` (
|
|||
-- ----------------------------
|
||||
-- Records of sys_shop
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_shop` VALUES (1, '天猫旗舰店', 1, '', 98, 1, 0, '', 2200787809358, '31014100', '7b0769269b0c0ca88949791c14eb3a5c', '610140071d1070a37cecea89f1c1f3d6e5d19bf4b58dd942200787809358', NULL, NULL, NULL, NULL, 'http://gw.api.taobao.com/router/rest');
|
||||
INSERT INTO `sys_shop` VALUES (1, '天猫旗舰店', 1, '', 98, 1, 0, '', 59972781, '31014100', '7b0769269b0c0ca88949791c14eb3a5c', '610140071d1070a37cecea89f1c1f3d6e5d19bf4b58dd942200787809358', NULL, NULL, NULL, NULL, 'http://gw.api.taobao.com/router/rest');
|
||||
INSERT INTO `sys_shop` VALUES (2, '京东旗舰店', 2, NULL, 9, 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_shop` VALUES (3, '抖音旗舰店', 3, 'http://openapi.jinritemai.com', 87, 1, 1653672695, NULL, 4463798, '7249607407477720636', '36a12497-fb9d-4b54-8cd1-fd1617346687', '', NULL, NULL, NULL, NULL, '2');
|
||||
INSERT INTO `sys_shop` VALUES (5, '拼多多旗舰店', 4, NULL, 99, 1, 1680698886, 'pdd10006159121', 100061591, NULL, NULL, '87f8044d2a5f45a489aa3a952785b0d35e61788a', NULL, NULL, NULL, NULL, NULL);
|
||||
|
|
@ -2660,7 +2660,7 @@ CREATE TABLE `tao_order` (
|
|||
`point_fee` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '买家使用积分,下单时生成,且一直不变。格式:100;单位:个.',
|
||||
`real_point_fee` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '买家实际使用积分(扣除部分退款使用的积分),交易完成后生成(交易成功或关闭),交易未完成时该字段值为0。格式:100;单位:个',
|
||||
`buyer_obtain_point_fee` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '买家获得积分,返点的积分。格式:100;单位:个。返点的积分要交易成功之后才能获得。',
|
||||
`receivingTime` datetime(0) DEFAULT NULL COMMENT '收货时间,这里返回的是完全收货时间',
|
||||
`receiving_time` datetime(0) DEFAULT NULL COMMENT '收货时间,这里返回的是完全收货时间',
|
||||
`status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '交易状态。可选值: * TRADE_NO_CREATE_PAY(没有创建支付宝交易) * WAIT_BUYER_PAY(等待买家付款) * SELLER_CONSIGNED_PART(卖家部分发货) * WAIT_SELLER_SEND_GOODS(等待卖家发货,即:买家已付款) * WAIT_BUYER_CONFIRM_GOODS(等待买家确认收货,即:卖家已发货) * TRADE_BUYER_SIGNED(买家已签收,货到付款专用) * TRADE_FINISHED(交易成功) * TRADE_CLOSED(付款以后用户退款成功,交易自动关闭) * TRADE_CLOSED_BY_TAOBAO(付款以前,卖家或买家主动关闭交易) * PAY_PENDING(国际信用卡支付付款确认中) * WAIT_PRE_AUTH_CONFIRM(0元购合约中) * PAID_FORBID_CONSIGN(拼团中订单或者发货强管控的订单,已付款但禁止发货)',
|
||||
`trade_memo` varchar(2000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '交易备注。',
|
||||
`erp_send_company` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'erp发货快递公司',
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -140,6 +140,13 @@
|
|||
<version>1.18.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>taobao</groupId>
|
||||
<artifactId>taobao-sdk</artifactId>
|
||||
<version>0.20200820</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/taobao-sdk-0.20200820.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -12,4 +12,18 @@ public class ApiResult<T> {
|
|||
private int code;
|
||||
private String msg;
|
||||
|
||||
public static <T> ApiResult<T> build(int code ,String msg){
|
||||
ApiResult<T> result = new ApiResult<>();
|
||||
result.setCode(code);
|
||||
result.setMsg(msg);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static <T> ApiResult<T> build(int code ,String msg,T data){
|
||||
ApiResult<T> result = new ApiResult<>();
|
||||
result.setCode(code);
|
||||
result.setMsg(msg);
|
||||
result.setData(data);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
package com.qihang.tao.common;
|
||||
|
||||
/**
|
||||
* 描述:
|
||||
* 店铺类型Enum
|
||||
*
|
||||
* @author qlp
|
||||
* @date 2019-09-18 19:44
|
||||
*/
|
||||
public enum EnumShopType {
|
||||
TAO("淘宝天猫", 1),
|
||||
JD("京东", 2),
|
||||
DOUDIAN("抖音", 3),
|
||||
PDD("拼多多", 4);
|
||||
private String name;
|
||||
private int index;
|
||||
|
||||
// 构造方法
|
||||
private EnumShopType(String name, int index) {
|
||||
this.name = name;
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
// 普通方法
|
||||
public static String getName(int index) {
|
||||
for (EnumShopType c : EnumShopType.values()) {
|
||||
if (c.getIndex() == index) {
|
||||
return c.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// get set 方法
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.qihang.tao.common;
|
||||
|
||||
|
||||
import com.qihang.security.utils.ServletUtils;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
/**
|
||||
* 服务相关配置
|
||||
*
|
||||
* @author qihang
|
||||
*/
|
||||
@Component
|
||||
public class ServerConfig
|
||||
{
|
||||
/**
|
||||
* 获取完整的请求路径,包括:域名,端口,上下文访问路径
|
||||
*
|
||||
* @return 服务地址
|
||||
*/
|
||||
public String getUrl()
|
||||
{
|
||||
HttpServletRequest request = ServletUtils.getRequest();
|
||||
return getDomain(request);
|
||||
}
|
||||
|
||||
public static String getDomain(HttpServletRequest request)
|
||||
{
|
||||
StringBuffer url = request.getRequestURL();
|
||||
String contextPath = request.getServletContext().getContextPath();
|
||||
return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.qihang.tao.common;
|
||||
|
||||
public class TaoRequest {
|
||||
private Integer shopId;//店铺Id
|
||||
private Long orderId;//订单id
|
||||
private Integer updType;//更新类型0拉取新订单1更新订单
|
||||
|
||||
public Integer getUpdType() {
|
||||
return updType;
|
||||
}
|
||||
|
||||
public void setUpdType(Integer updType) {
|
||||
this.updType = updType;
|
||||
}
|
||||
|
||||
public Long getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(Long orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Integer getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(Integer shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,14 @@
|
|||
//package com.qihang.tao.controller;
|
||||
//
|
||||
//import com.qihang.tao.common.ApiResult;
|
||||
//import org.springframework.util.StringUtils;
|
||||
//import org.springframework.web.bind.annotation.RequestBody;
|
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||
//import org.springframework.web.bind.annotation.RequestMethod;
|
||||
//import org.springframework.web.bind.annotation.RestController;
|
||||
//
|
||||
//import java.util.Map;
|
||||
//
|
||||
//@RestController
|
||||
//public class GoodsApiController {
|
||||
///**
|
||||
|
|
@ -19,7 +26,7 @@
|
|||
// }
|
||||
// */
|
||||
// @RequestMapping(value = "/pull_goods", method = RequestMethod.POST)
|
||||
// public ApiResult<Integer> getOrderList(@RequestBody DataRow reqData, HttpServletRequest request) throws Exception {
|
||||
// public ApiResult<Integer> getOrderList(@RequestBody DataRow reqData) throws Exception {
|
||||
// String startDate = reqData.getString("startTime");
|
||||
// String endDate = reqData.getString("endTime");
|
||||
// Integer shopId=reqData.getInt("shopId");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
package com.qihang.tao.controller;
|
||||
|
||||
import com.qihang.tao.domain.SysPlatform;
|
||||
import com.qihang.tao.service.SysPlatformService;
|
||||
import com.qihang.tao.service.SysShopService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 淘宝回调地址
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Controller
|
||||
public class OAuthTaoCallbackController {
|
||||
|
||||
private final SysPlatformService platformService;
|
||||
private final SysShopService shopService;
|
||||
private static Logger log = LoggerFactory.getLogger(OAuthTaoCallbackController.class);
|
||||
/**
|
||||
* 淘宝授权url
|
||||
*
|
||||
* @param shopId
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@GetMapping("/taoapi2/tao_oauth")
|
||||
public String aliOAuth(@RequestParam Integer shopId) throws IOException, InterruptedException {
|
||||
//查询店铺信息
|
||||
var shop = shopService.selectShopById(shopId);
|
||||
SysPlatform platform = platformService.selectById(shop.getType());
|
||||
|
||||
|
||||
// var entity = thirdSettingService.getEntity(shop.getType());
|
||||
String url = "http://container.open.taobao.com/container?appkey=" + platform.getAppKey() + "&state=" + shopId;
|
||||
//https://oauth.taobao.com/authorize?response_type=token&force_auth=true&from_site=fuwu&client_id=28181872
|
||||
return "redirect:" + url;
|
||||
}
|
||||
|
||||
/**
|
||||
* 淘宝授权回调
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/taoapi2/callback")
|
||||
public String callback(Model model, HttpServletRequest request) {
|
||||
log.info("淘系店铺授权回调开始");
|
||||
String sessionKey = request.getParameter("top_session");
|
||||
String state = request.getParameter("state");
|
||||
try {
|
||||
Integer shopId = Integer.parseInt(state);
|
||||
shopService.updateSessionKey(shopId, sessionKey);
|
||||
return "redirect:/order/list?shopId=" + shopId;
|
||||
} catch (Exception e) {
|
||||
return "redirect:/?msg=callback_taobao_error";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.qihang.tao.controller;
|
||||
|
||||
public class ShopApiParams {
|
||||
private String appKey;
|
||||
private String appSecret;
|
||||
private String accessToken;
|
||||
private String apiRequestUrl;
|
||||
private String tokenRequestUrl;
|
||||
|
||||
public String getTokenRequestUrl() {
|
||||
return tokenRequestUrl;
|
||||
}
|
||||
|
||||
public void setTokenRequestUrl(String tokenRequestUrl) {
|
||||
this.tokenRequestUrl = tokenRequestUrl;
|
||||
}
|
||||
|
||||
public String getAppKey() {
|
||||
return appKey;
|
||||
}
|
||||
|
||||
public void setAppKey(String appKey) {
|
||||
this.appKey = appKey;
|
||||
}
|
||||
|
||||
public String getAppSecret() {
|
||||
return appSecret;
|
||||
}
|
||||
|
||||
public void setAppSecret(String appSecret) {
|
||||
this.appSecret = appSecret;
|
||||
}
|
||||
|
||||
public String getAccessToken() {
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
public void setAccessToken(String accessToken) {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
|
||||
public String getApiRequestUrl() {
|
||||
return apiRequestUrl;
|
||||
}
|
||||
|
||||
public void setApiRequestUrl(String apiRequestUrl) {
|
||||
this.apiRequestUrl = apiRequestUrl;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,314 @@
|
|||
package com.qihang.tao.controller;
|
||||
|
||||
import com.qihang.common.enums.HttpStatus;
|
||||
import com.qihang.common.utils.DateUtils;
|
||||
|
||||
|
||||
import com.qihang.tao.domain.TaoOrder;
|
||||
import com.taobao.api.ApiException;
|
||||
import com.taobao.api.DefaultTaobaoClient;
|
||||
import com.taobao.api.TaobaoClient;
|
||||
import com.taobao.api.request.RefundsReceiveGetRequest;
|
||||
import com.taobao.api.request.TradesSoldGetRequest;
|
||||
import com.taobao.api.request.TradesSoldIncrementGetRequest;
|
||||
import com.taobao.api.response.RefundsReceiveGetResponse;
|
||||
import com.taobao.api.response.TradesSoldGetResponse;
|
||||
import com.taobao.api.response.TradesSoldIncrementGetResponse;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class TaoBaoOpenOrderUpdHelper {
|
||||
/**
|
||||
* 更新订单(循环分页)
|
||||
*
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param sessionKey
|
||||
* @return
|
||||
*/
|
||||
public static TaoBaoOpenOrderUpdResult<TaoOrder> updTmallOrder(Long pageNo, Long pageSize, String url, String appKey, String appSecret, String sessionKey) throws ApiException {
|
||||
TaobaoClient client = new DefaultTaobaoClient(url, appKey, appSecret);
|
||||
|
||||
TradesSoldGetRequest req = new TradesSoldGetRequest();
|
||||
req.setFields("tid,receiver_name,receiver_country,receiver_state,receiver_city,receiver_district,receiver_town,receiver_address,receiver_mobile," +
|
||||
"receiver_phone,title,seller_flag,has_buyer_message,credit_card_fee,mark_desc,consign_time,end_time" +
|
||||
",type,status,orders,rx_audit_status,seller_memo,buyer_memo,buyer_message,pay_time,created,modified,buyer_nick,buyer_open_uid,alipay_no,buyer_alipay_no,buyer_email" +
|
||||
",num_iid,num,price,total_fee,adjust_fee,post_fee,discount_fee,payment,received_payment,available_confirm_fee,commission_fee");
|
||||
// req.setStartCreated(DateUtil.stringtoDate("2019-11-27 00:00:00"));
|
||||
// req.setEndCreated(DateUtil.stringtoDate("2019-12-04 23:59:59"));
|
||||
// req.setStatus("WAIT_SELLER_SEND_GOODS");
|
||||
// req.setBuyerNick("美丽的你美丽的我");
|
||||
req.setType("fixed");//一口价
|
||||
// req.setExtType("service");
|
||||
// req.setRateStatus("RATE_UNBUYER");
|
||||
// req.setTag("time_card");
|
||||
req.setPageNo(pageNo);
|
||||
req.setPageSize(pageSize);
|
||||
// req.setUseHasNext(true);
|
||||
// req.setBuyerOpenId("AAHm5d-EAAeGwJedwSHpg8bT");
|
||||
TradesSoldGetResponse rsp = client.execute(req, sessionKey);
|
||||
// System.out.println(rsp.getBody());
|
||||
if(StringUtils.hasText(rsp.getErrorCode())){
|
||||
if(rsp.getErrorCode().equals("27")){
|
||||
return new TaoBaoOpenOrderUpdResult(HttpStatus.UNAUTHORIZED, "Token已过期,请重新授权");
|
||||
}
|
||||
}
|
||||
if (rsp.getTrades() == null) {
|
||||
//接口查询错误
|
||||
return new TaoBaoOpenOrderUpdResult(500, "接口调用错误:" + rsp.getMsg() + rsp.getSubMsg());
|
||||
}
|
||||
|
||||
//组合的订单列表
|
||||
List<TaoOrder> orderList = new ArrayList<>();
|
||||
|
||||
//有数据
|
||||
for (var trade : rsp.getTrades()) {
|
||||
try {
|
||||
// if(trade.getTid() == 770674433029365349L)
|
||||
// {
|
||||
// String id = trade.getTid().toString();
|
||||
// }
|
||||
TaoOrder order = new TaoOrder();
|
||||
order.setTid(trade.getTid());
|
||||
order.setTitle(trade.getTitle());
|
||||
order.setType(trade.getType());
|
||||
order.setSellerFlag(trade.getSellerFlag()+"");
|
||||
order.setHasBuyerMessage(trade.getHasBuyerMessage()+"");
|
||||
order.setCreditCardFee(trade.getCreditCardFee());
|
||||
order.setCreated(trade.getCreated());
|
||||
order.setModified(trade.getModified());
|
||||
order.setPayTime(trade.getPayTime());
|
||||
order.setPrice(Double.parseDouble(trade.getPrice()));
|
||||
order.setTotalFee(Double.parseDouble(trade.getTotalFee()));
|
||||
order.setAdjustFee(Double.parseDouble(trade.getAdjustFee()));
|
||||
order.setPostFee(BigDecimal.valueOf(Double.parseDouble(trade.getPostFee())));
|
||||
order.setDiscountFee(BigDecimal.valueOf(Double.parseDouble(trade.getDiscountFee())));
|
||||
order.setPayment(BigDecimal.valueOf(Double.parseDouble(trade.getPayment())));
|
||||
order.setReceivedPayment(BigDecimal.valueOf(Double.parseDouble(trade.getReceivedPayment())));
|
||||
order.setBuyerNick(trade.getBuyerNick());
|
||||
order.setBuyerOpenUid(trade.getBuyerOpenUid());
|
||||
order.setAlipayNo(trade.getAlipayNo());
|
||||
order.setBuyerAlipayNo(trade.getBuyerAlipayNo());
|
||||
order.setBuyerEmail(trade.getBuyerEmail());
|
||||
order.setBuyerMemo(trade.getBuyerMemo());
|
||||
order.setBuyerMessage(trade.getBuyerMessage());
|
||||
order.setMarkDesc(trade.getMarkDesc());
|
||||
order.setSellerMemo(trade.getSellerMemo());
|
||||
order.setReceiverCountry(trade.getReceiverCountry());
|
||||
order.setReceiverState(trade.getReceiverState());
|
||||
order.setReceiverCity(trade.getReceiverCity());
|
||||
order.setReceiverDistrict(trade.getReceiverDistrict());
|
||||
order.setReceiverTown(trade.getReceiverTown());
|
||||
order.setReceiverAddress(trade.getReceiverAddress());
|
||||
order.setReceiverName(trade.getReceiverName());
|
||||
order.setReceiverMobile(trade.getReceiverMobile());
|
||||
order.setReceiverPhone(trade.getReceiverPhone());
|
||||
order.setNumIid(trade.getNumIid()+"");
|
||||
order.setNum(trade.getNum().intValue());
|
||||
order.setStatus(trade.getStatus());
|
||||
order.setConsignTime(trade.getConsignTime());
|
||||
order.setEndTime(trade.getEndTime());
|
||||
|
||||
List<TaoOrderItem> items = new ArrayList<>();
|
||||
for (var item : trade.getOrders()) {
|
||||
TaoOrderItem orderItem = new TaoOrderItem();
|
||||
orderItem.setOrderId(order.getId());
|
||||
orderItem.setSubItemId(item.getOid().toString());
|
||||
Long refundStatus = -1L;
|
||||
if(item.getRefundStatus().equals("NO_REFUND")){
|
||||
refundStatus = 0L;
|
||||
}else {
|
||||
refundStatus = 1L;
|
||||
}
|
||||
orderItem.setRefundStatus(refundStatus);
|
||||
orderItem.setProductId(item.getNumIid());
|
||||
orderItem.setSkuId(Long.parseLong(item.getSkuId()));
|
||||
orderItem.setSpecNumber(item.getOuterSkuId());
|
||||
orderItem.setGoodsNumber(item.getOuterIid());
|
||||
orderItem.setProductImgUrl(item.getPicPath());
|
||||
orderItem.setGoodsTitle(item.getTitle());
|
||||
orderItem.setPrice(BigDecimal.valueOf(Double.parseDouble(item.getPrice())));
|
||||
orderItem.setQuantity(item.getNum());
|
||||
|
||||
orderItem.setSkuInfo(item.getSkuPropertiesName());
|
||||
orderItem.setItemAmount(BigDecimal.valueOf(Double.parseDouble(item.getPayment())));
|
||||
orderItem.setDiscountFee(new BigDecimal(item.getDiscountFee()));
|
||||
orderItem.setAdjustFee(new BigDecimal(item.getAdjustFee()));
|
||||
|
||||
orderItem.setRefundStatusStr(item.getRefundStatus());
|
||||
|
||||
orderItem.setNewSpecId(0L);
|
||||
orderItem.setIsGift(0);
|
||||
orderItem.setIsSwap(0);
|
||||
items.add(orderItem);
|
||||
}
|
||||
order.setTaoOrderItemList(items);
|
||||
|
||||
orderList.add(order);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
return new TaoBaoOpenOrderUpdResult(rsp.getTotalResults().intValue(), orderList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增量获取淘宝开放平台天猫订单
|
||||
*
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param sessionKey
|
||||
* @return
|
||||
* @throws ApiException
|
||||
*/
|
||||
public static TaoBaoOpenOrderUpdResult<TaoOrder> getIncrementTmallOrder(Long pageNo, Long pageSize,Date startTime, Date endTime,String url,String appKey,String appSecret, String sessionKey) throws ApiException {
|
||||
|
||||
|
||||
TaobaoClient client = new DefaultTaobaoClient(url, appKey, appSecret);
|
||||
|
||||
TradesSoldIncrementGetRequest req = new TradesSoldIncrementGetRequest();
|
||||
req.setFields("tid,post_fee,receiver_name,receiver_state,receiver_city,receiver_district,receiver_address,receiver_mobile,receiver_phone,received_payment,num," +
|
||||
"type,status,payment,orders,rx_audit_status,sellerMemo,pay_time,created,buyer_nick");
|
||||
req.setStartModified(startTime);
|
||||
req.setEndModified(endTime);
|
||||
|
||||
req.setType("fixed");//一口价
|
||||
// req.setExtType("service");
|
||||
// req.setRateStatus("RATE_UNBUYER");
|
||||
// req.setTag("time_card");
|
||||
req.setPageNo(pageNo);
|
||||
req.setPageSize(pageSize);
|
||||
// req.setUseHasNext(true);
|
||||
// req.setBuyerOpenId("AAHm5d-EAAeGwJedwSHpg8bT");
|
||||
TradesSoldIncrementGetResponse rsp = client.execute(req, sessionKey);
|
||||
System.out.println(rsp.getBody());
|
||||
|
||||
if (rsp.getTrades() == null) {
|
||||
if (StringUtils.isEmpty(rsp.getErrorCode()) == false) {
|
||||
//接口查询错误
|
||||
return new TaoBaoOpenOrderUpdResult(500, "接口调用错误:" + rsp.getMsg() + rsp.getSubMsg());
|
||||
}
|
||||
if (rsp.getTotalResults() == 0) {
|
||||
return new TaoBaoOpenOrderUpdResult(rsp.getTotalResults().intValue(), new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
//组合的订单列表
|
||||
List<TaoOrder> orderList = new ArrayList<>();
|
||||
|
||||
//有数据
|
||||
for (var trade : rsp.getTrades()) {
|
||||
try {
|
||||
TaoOrder order = new TaoOrder();
|
||||
order.setId(trade.getTid().toString());
|
||||
order.setOrderCreateTime(trade.getCreated());
|
||||
order.setOrderModifyTime(trade.getModified());
|
||||
order.setPayTime(trade.getPayTime());
|
||||
order.setTotalAmount(BigDecimal.valueOf(Double.parseDouble(trade.getPayment())));
|
||||
order.setShippingFee(BigDecimal.valueOf(Double.parseDouble(trade.getPostFee())));
|
||||
order.setPayAmount(BigDecimal.valueOf(Double.parseDouble(trade.getPayment())));
|
||||
order.setBuyerName(trade.getBuyerNick());
|
||||
order.setSellerMemo(trade.getSellerMemo());
|
||||
order.setProvince(trade.getReceiverState());
|
||||
order.setCity(trade.getReceiverCity());
|
||||
order.setDistrict(trade.getReceiverDistrict());
|
||||
order.setStatus(EnumTmallOrderStatus.getStatus(trade.getStatus()));
|
||||
order.setStatusStr(trade.getStatus());
|
||||
List<TaoOrderItem> items = new ArrayList<>();
|
||||
for (var item : trade.getOrders()) {
|
||||
TaoOrderItem orderItem = new TaoOrderItem();
|
||||
orderItem.setSpecNumber(item.getOuterSkuId());
|
||||
orderItem.setGoodsNumber(item.getOuterIid());
|
||||
orderItem.setProductImgUrl(item.getPicPath());
|
||||
orderItem.setGoodsTitle(item.getTitle());
|
||||
orderItem.setPrice(BigDecimal.valueOf(Double.parseDouble(item.getPayment())));
|
||||
orderItem.setQuantity(item.getNum());
|
||||
orderItem.setSubItemId(item.getOid().toString());
|
||||
orderItem.setSkuInfo(item.getSkuPropertiesName());
|
||||
orderItem.setItemAmount(BigDecimal.valueOf(Double.parseDouble(item.getPayment())));
|
||||
orderItem.setRefundStatusStr(item.getRefundStatus());
|
||||
items.add(orderItem);
|
||||
}
|
||||
order.setTaoOrderItemList(items);
|
||||
|
||||
orderList.add(order);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
return new TaoBaoOpenOrderUpdResult(rsp.getTotalResults().intValue(), orderList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉取淘系退货订单
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param url
|
||||
* @param appKey
|
||||
* @param appSecret
|
||||
* @param sessionKey
|
||||
* @return
|
||||
* @throws ApiException
|
||||
*/
|
||||
public static TaoBaoOpenOrderUpdResult<TaoOrderRefund> updTmallRefunOrder(Long pageNo, Long pageSize, String url, String appKey, String appSecret, String sessionKey) throws ApiException {
|
||||
TaobaoClient client = new DefaultTaobaoClient(url, appKey, appSecret);
|
||||
List<TaoOrderRefund> list = new ArrayList<>();
|
||||
|
||||
// TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
|
||||
// RefundGetRequest req1 = new RefundGetRequest();
|
||||
// req1.setFields("title,address,good_return_time,created");
|
||||
// req1.setRefundId(44929186648087305L);
|
||||
// RefundGetResponse rsp1 = client.execute(req1, sessionKey);
|
||||
// System.out.println(rsp1.getBody());
|
||||
// RefundsApplyGetRequest raReq = new RefundsApplyGetRequest();
|
||||
// raReq.setFields("refund_id, tid, title, buyer_nick, seller_nick, total_fee, status, created, refund_fee");
|
||||
// raReq.setPageNo(1L);
|
||||
// raReq.setPageSize(10L);
|
||||
////// raReq.setStatus("SUCCESS");
|
||||
////
|
||||
// RefundsApplyGetResponse raRsp = client.execute(raReq,sessionKey);
|
||||
|
||||
RefundsReceiveGetRequest req = new RefundsReceiveGetRequest();
|
||||
req.setFields("refund_id, tid, title, buyer_nick, seller_nick, total_fee, status, created,num, refund_fee, oid, good_status," +
|
||||
" company_name, sid, payment, reason, desc, has_good_return, modified, order_status,refund_phase,sku");
|
||||
// req.setStatus("WAIT_SELLER_AGREE");
|
||||
// req.setSellerNick("hz0799");
|
||||
// req.setBuyerNick("juan20108810");
|
||||
// req.setType("fixed");
|
||||
// req.setType("fixed");
|
||||
req.setPageNo(pageNo);
|
||||
req.setPageSize(pageSize);
|
||||
RefundsReceiveGetResponse rsp = client.execute(req, sessionKey);
|
||||
if (rsp.getTotalResults() > 0) {
|
||||
//查到了数据
|
||||
for (var item : rsp.getRefunds()) {
|
||||
//循环插入退货数据
|
||||
TaoOrderRefund tmallOrderRefund = new TaoOrderRefund();
|
||||
// tmallOrderRefund.setBuyer_nick(item.getBuyerNick());
|
||||
tmallOrderRefund.setCreated(DateUtil.dateToStamp(item.getCreated()));
|
||||
tmallOrderRefund.setRemark(item.getDesc());
|
||||
tmallOrderRefund.setGoodStatus(item.getGoodStatus());
|
||||
tmallOrderRefund.setHasGoodReturn(item.getHasGoodReturn() == true ? 1 : 0);
|
||||
tmallOrderRefund.setLogisticsCode(item.getSid());
|
||||
tmallOrderRefund.setLogisticsCompany(item.getCompanyName());
|
||||
tmallOrderRefund.setModified(DateUtils.dateToStamp(item.getModified()));
|
||||
tmallOrderRefund.setOid(item.getOid());
|
||||
// tmallOrderRefund.setOrderStatus(item.getOrderStatus());
|
||||
tmallOrderRefund.setReason(item.getReason());
|
||||
tmallOrderRefund.setRefundFee(BigDecimal.valueOf(Double.parseDouble(item.getRefundFee())));
|
||||
tmallOrderRefund.setRefundId(item.getRefundId());
|
||||
tmallOrderRefund.setStatus(item.getStatus());
|
||||
tmallOrderRefund.setTid(item.getTid());
|
||||
// tmallOrderRefund.setTotalFee(item.getTotalFee());
|
||||
tmallOrderRefund.setNum(item.getNum());
|
||||
tmallOrderRefund.setRefundPhase(item.getRefundPhase());
|
||||
list.add(tmallOrderRefund);
|
||||
}
|
||||
}
|
||||
return new TaoBaoOpenOrderUpdResult(rsp.getTotalResults().intValue(), list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.qihang.tao.controller;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 淘宝开放平台订单更新结果
|
||||
*/
|
||||
public class TaoBaoOpenOrderUpdResult<T> {
|
||||
private Integer code;//代码 0成功其他错误
|
||||
private String msg;//错误信息
|
||||
private Integer totalRecords;//总记录数
|
||||
private List<T> list;//订单
|
||||
|
||||
public TaoBaoOpenOrderUpdResult(Integer code, String msg, Integer totalRecords, List<T> list) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.totalRecords = totalRecords;
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public TaoBaoOpenOrderUpdResult(Integer code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.totalRecords = 0;
|
||||
this.list = null;
|
||||
}
|
||||
|
||||
public TaoBaoOpenOrderUpdResult(Integer totalRecords, List<T> list) {
|
||||
this.code = 0;
|
||||
this.msg = "SUCCESS";
|
||||
this.totalRecords = totalRecords;
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Integer getTotalRecords() {
|
||||
return totalRecords;
|
||||
}
|
||||
|
||||
public void setTotalRecords(Integer totalRecords) {
|
||||
this.totalRecords = totalRecords;
|
||||
}
|
||||
|
||||
public List<T> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<T> list) {
|
||||
this.list = list;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,562 @@
|
|||
package com.qihang.tao.controller;
|
||||
|
||||
import com.qihang.common.enums.HttpStatus;
|
||||
import com.qihang.erp.api.common.EnumResultVo;
|
||||
import com.qihang.erp.api.common.EnumTmallOrderStatus;
|
||||
import com.qihang.erp.api.domain.TaoOrderRefund;
|
||||
import com.qihang.erp.api.service.ITaoOrderRefundService;
|
||||
import com.qihang.erp.api.service.ITaoOrderService;
|
||||
import com.qihang.erp.api.utils.DateUtil;
|
||||
import com.qihang.tao.common.ApiResult;
|
||||
import com.qihang.tao.common.EnumShopType;
|
||||
import com.qihang.tao.common.ServerConfig;
|
||||
import com.qihang.tao.common.TaoRequest;
|
||||
import com.qihang.tao.domain.SysPlatform;
|
||||
import com.qihang.tao.domain.TaoOrder;
|
||||
import com.qihang.tao.service.SysPlatformService;
|
||||
import com.qihang.tao.service.SysShopService;
|
||||
import com.qihang.tao.service.TaoOrderService;
|
||||
import com.taobao.api.ApiException;
|
||||
import com.taobao.api.DefaultTaobaoClient;
|
||||
import com.taobao.api.TaobaoClient;
|
||||
import com.taobao.api.request.RefundGetRequest;
|
||||
import com.taobao.api.request.TradeFullinfoGetRequest;
|
||||
import com.taobao.api.response.RefundGetResponse;
|
||||
import com.taobao.api.response.TradeFullinfoGetResponse;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 淘系订单更新
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/taoapi")
|
||||
public class TaoOrderPullController {
|
||||
private static Logger log = LoggerFactory.getLogger(TaoOrderPullController.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
private TaoOrderService orderService;
|
||||
@Autowired
|
||||
private ITaoOrderRefundService tmallOrderReturnService;
|
||||
|
||||
private final SysShopService shopService;
|
||||
private final SysPlatformService platformService;
|
||||
private final ServerConfig serverConfig;
|
||||
/**
|
||||
* 更新前的检查
|
||||
*
|
||||
* @param shopId
|
||||
* @return
|
||||
* @throws ApiException
|
||||
*/
|
||||
public ApiResult<ShopApiParams> checkBefore(Integer shopId) throws ApiException {
|
||||
log.info("/**************主动更新tao 参数检查****************/");
|
||||
var shop = shopService.selectShopById(shopId);
|
||||
|
||||
if (shop == null) {
|
||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误,没有找到店铺");
|
||||
return ApiResult.build(HttpStatus.PARAMS_ERROR,"参数错误,没有找到店铺");
|
||||
}
|
||||
|
||||
if (shop.getType() != EnumShopType.TAO.getIndex()) {
|
||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "参数错误,店铺不是淘系店铺");
|
||||
}
|
||||
SysPlatform platform = platformService.selectById(EnumShopType.TAO.getIndex());
|
||||
|
||||
if(!StringUtils.hasText(platform.getAppKey())) {
|
||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "平台配置错误,没有找到AppKey");
|
||||
}
|
||||
if(!StringUtils.hasText(platform.getAppSecret())) {
|
||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到AppSercet");
|
||||
}
|
||||
if(!StringUtils.hasText(shop.getApiRequestUrl())) {
|
||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到ApiRequestUrl");
|
||||
}
|
||||
if(shop.getSellerId() == null || shop.getSellerId() <= 0) {
|
||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到SellerUserId");
|
||||
}
|
||||
|
||||
ShopApiParams params = new ShopApiParams();
|
||||
params.setAppKey(platform.getAppKey());
|
||||
params.setAppSecret(platform.getAppSecret());
|
||||
params.setAccessToken(shop.getAccessToken());
|
||||
params.setTokenRequestUrl(serverConfig.getUrl()+"/taoapi2/tao_oauth");
|
||||
params.setApiRequestUrl(shop.getApiRequestUrl());
|
||||
|
||||
if (!StringUtils.hasText(shop.getAccessToken())) {
|
||||
|
||||
return ApiResult.build(HttpStatus.UNAUTHORIZED, "Token已过期,请重新授权", params);
|
||||
}
|
||||
|
||||
/****************先查询卖家对不对***************/
|
||||
// TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
|
||||
// UserSellerGetRequest reqSeller = new UserSellerGetRequest();
|
||||
// reqSeller.setFields("nick,user_id");
|
||||
// UserSellerGetResponse rsp = client.execute(reqSeller, sessionKey);
|
||||
// if(StringUtils.hasText(rsp.getErrorCode())){
|
||||
// if(rsp.getErrorCode().equals("27")){
|
||||
// return new ApiResult<>(EnumResultVo.TokenFail.getIndex(), "Token已过期,请重新授权",params);
|
||||
// }
|
||||
// else if(rsp.getErrorCode().equals("11")){
|
||||
// if(rsp.getSubCode().equals("isv.permission-api-package-limit"))
|
||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "请检查淘宝用户API:taobao.user.seller.get是否具有访问权限",params);
|
||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), rsp.getSubCode(),params);
|
||||
// }
|
||||
// else if(rsp.getErrorCode().equals("25")){
|
||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "无效签名!请检查SessionKey、appKey、appSecret是否匹配",params);
|
||||
// } else
|
||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误!"+(StringUtils.hasText(rsp.getSubMsg()) ? rsp.getSubMsg(): rsp.getMsg()));
|
||||
// }
|
||||
// if(rsp.getUser() == null || rsp.getUser().getUserId() == null){
|
||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误!请设置店铺SellerUserId值!",params);
|
||||
// }
|
||||
// else if (shop.getSellerUserId().longValue() != rsp.getUser().getUserId().longValue()) {
|
||||
// return new ApiResult<>(EnumResultVo.TokenFail.getIndex(), "当前用户是:" + rsp.getUser().getNick() + ",请重新授权",params);
|
||||
// }
|
||||
return ApiResult.build(HttpStatus.SUCCESS,"",params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉取天猫订单
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
* @throws ApiException
|
||||
*/
|
||||
@GetMapping("/order/pull_order")
|
||||
@ResponseBody
|
||||
public ApiResult<Object> orderPull(TaoRequest req) throws ApiException {
|
||||
log.info("/**************主动更新tao订单****************/");
|
||||
if (req.getShopId() == null || req.getShopId() <= 0) {
|
||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "参数错误,没有店铺Id");
|
||||
}
|
||||
var checkResult = this.checkBefore(req.getShopId());
|
||||
if (checkResult.getCode() != HttpStatus.SUCCESS) {
|
||||
return ApiResult.build(checkResult.getCode(), checkResult.getMsg(),checkResult.getData());
|
||||
}
|
||||
String sessionKey = checkResult.getData().getAccessToken();
|
||||
String url = checkResult.getData().getApiRequestUrl();
|
||||
String appKey = checkResult.getData().getAppKey();
|
||||
String appSecret = checkResult.getData().getAppSecret();
|
||||
|
||||
// var shop = shopService.getShop(req.getShopId());
|
||||
// if (shop == null) return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误,没有找到店铺");
|
||||
// else if (shop.getType().intValue() != EnumShopType.Tmall.getIndex())
|
||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误,店铺不是淘系店铺");
|
||||
// else if (StringUtils.isEmpty(shop.getSessionKey()))
|
||||
// return new ApiResult<>(EnumResultVo.TokenFail.getIndex(), "Token已过期,请重新授权");
|
||||
//
|
||||
// String sessionKey = shop.getSessionKey();
|
||||
//
|
||||
// var thirdConfig = thirdSettingService.getEntity(shop.getType());
|
||||
// if (thirdConfig == null) return new ApiResult<>(EnumResultVo.SystemException.getIndex(), "系统错误,没有找到第三方平台的配置信息");
|
||||
// else if (StringUtils.isEmpty(thirdConfig.getAppKey())) return new ApiResult<>(EnumResultVo.SystemException.getIndex(), "系统错误,第三方平台配置信息不完整,缺少appkey");
|
||||
// else if (StringUtils.isEmpty(thirdConfig.getAppSecret())) return new ApiResult<>(EnumResultVo.SystemException.getIndex(), "系统错误,第三方平台配置信息不完整,缺少appSecret");
|
||||
// else if (StringUtils.isEmpty(thirdConfig.getRequest_url())) return new ApiResult<>(EnumResultVo.SystemException.getIndex(), "系统错误,第三方平台配置信息不完整,缺少request_url");
|
||||
//
|
||||
//
|
||||
// String url = thirdConfig.getRequest_url();
|
||||
// String appkey = thirdConfig.getAppKey();
|
||||
// String secret = thirdConfig.getAppSecret();
|
||||
//
|
||||
// /****************先查询卖家对不对***************/
|
||||
// TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
|
||||
// UserSellerGetRequest reqSeller = new UserSellerGetRequest();
|
||||
// reqSeller.setFields("nick,user_id");
|
||||
// UserSellerGetResponse rsp = client.execute(reqSeller, sessionKey);
|
||||
//// System.out.println(rsp.getBody());
|
||||
// if (shop.getSellerUserId().longValue() != rsp.getUser().getUserId().longValue()) {
|
||||
// return new ApiResult<>(EnumResultVo.TokenFail.getIndex(), "当前用户是:" + rsp.getUser().getNick() + ",请重新授权");
|
||||
// }
|
||||
|
||||
log.info("/**************主动更新tao订单,条件判断完成,开始更新。。。。。。****************/");
|
||||
Long pageSize = 50l;
|
||||
Long pageIndex = 1l;
|
||||
|
||||
//第一次获取
|
||||
TaoBaoOpenOrderUpdResult<TaoOrder> upResult = TaoBaoOpenOrderUpdHelper.updTmallOrder(pageIndex, pageSize, url, appKey, appSecret, sessionKey);
|
||||
|
||||
if (upResult.getCode().intValue() != 0) {
|
||||
log.info("/**************主动更新tao订单:第一次获取结果失败:" + upResult.getMsg() + "****************/");
|
||||
if(upResult.getCode().intValue() == HttpStatus.UNAUTHORIZED){
|
||||
return ApiResult.build(HttpStatus.UNAUTHORIZED, "Token已过期,请重新授权",checkResult.getData());
|
||||
}
|
||||
return ApiResult.build(HttpStatus.SYSTEM_EXCEPTION, upResult.getMsg());
|
||||
}
|
||||
|
||||
log.info("/**************主动更新tao订单:第一次获取结果:总记录数" + upResult.getTotalRecords() + "****************/");
|
||||
int insertSuccess = 0;//新增成功的订单
|
||||
int totalError = 0;
|
||||
int hasExistOrder = 0;//已存在的订单数
|
||||
|
||||
//循环插入订单数据到数据库
|
||||
for (var order : upResult.getList()) {
|
||||
|
||||
//插入订单数据
|
||||
var result = orderService.updateTmallOrderForOpenTaobao(req.getShopId(), order);
|
||||
if (result.getCode() == EnumResultVo.DataExist.getIndex()) {
|
||||
//已经存在
|
||||
log.info("/**************主动更新tao订单:开始更新数据库:" + order.getId() + "存在、更新****************/");
|
||||
hasExistOrder++;
|
||||
} else if (result.getCode() == EnumResultVo.SUCCESS.getIndex()) {
|
||||
log.info("/**************主动更新tao订单:开始更新数据库:" + order.getId() + "不存在、新增****************/");
|
||||
insertSuccess++;
|
||||
} else {
|
||||
log.info("/**************主动更新tao订单:开始更新数据库:" + order.getId() + "报错****************/");
|
||||
totalError++;
|
||||
}
|
||||
}
|
||||
|
||||
//计算总页数
|
||||
int totalPage = (upResult.getTotalRecords() % pageSize == 0) ? upResult.getTotalRecords() / pageSize.intValue() : (upResult.getTotalRecords() / pageSize.intValue()) + 1;
|
||||
pageIndex++;
|
||||
|
||||
while (pageIndex <= totalPage) {
|
||||
|
||||
TaoBaoOpenOrderUpdResult<TaoOrder> upResult1 = TaoBaoOpenOrderUpdHelper.updTmallOrder(pageIndex, pageSize, url, appKey, appSecret, sessionKey);
|
||||
//循环插入订单数据到数据库
|
||||
for (var order : upResult1.getList()) {
|
||||
//插入订单数据
|
||||
var result = orderService.updateTmallOrderForOpenTaobao(req.getShopId(), order);
|
||||
if (result.getCode() == EnumResultVo.DataExist.getIndex()) {
|
||||
//已经存在
|
||||
log.info("/**************主动更新tao订单:开始更新数据库:" + order.getId() + "存在、更新****************/");
|
||||
hasExistOrder++;
|
||||
} else if (result.getCode() == EnumResultVo.SUCCESS.getIndex()) {
|
||||
log.info("/**************主动更新tao订单:开始更新数据库:" + order.getId() + "不存在、新增****************/");
|
||||
insertSuccess++;
|
||||
} else {
|
||||
log.info("/**************主动更新tao订单:开始更新数据库:" + order.getId() + "报错****************/");
|
||||
totalError++;
|
||||
}
|
||||
}
|
||||
pageIndex++;
|
||||
}
|
||||
String msg = "成功,总共找到:" + upResult.getTotalRecords() + "条订单,新增:" + insertSuccess + "条,添加错误:" + totalError + "条,更新:" + hasExistOrder + "条";
|
||||
log.info("/**************主动更新tao订单:END:" + msg + "****************/");
|
||||
return ApiResult.build(HttpStatus.SUCCESS, msg);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新单个订单
|
||||
*
|
||||
* @param taoRequest
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
* @throws ApiException
|
||||
*/
|
||||
@RequestMapping("/order/pull_order_by_num")
|
||||
@ResponseBody
|
||||
public ApiResult<String> getOrderPullByNum(@RequestBody TaoRequest taoRequest) throws ApiException {
|
||||
log.info("/**************主动更新tao订单by number****************/");
|
||||
if (taoRequest.getShopId() == null || taoRequest.getShopId() <= 0) {
|
||||
return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误,没有店铺Id");
|
||||
}
|
||||
if (taoRequest.getOrderId() == null || taoRequest.getOrderId() <= 0) {
|
||||
return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误,缺少orderId");
|
||||
}
|
||||
|
||||
Integer shopId = taoRequest.getShopId();
|
||||
var checkResult = this.checkBefore(shopId);
|
||||
|
||||
if (checkResult.getCode() != EnumResultVo.SUCCESS.getIndex()) {
|
||||
return new ApiResult<>(checkResult.getCode(), checkResult.getMsg());
|
||||
}
|
||||
|
||||
String sessionKey = checkResult.getData().getAccessToken();
|
||||
String url = checkResult.getData().getApiRequestUrl();
|
||||
String appKey = checkResult.getData().getAppKey();
|
||||
String appSecret = checkResult.getData().getAppSecret();
|
||||
|
||||
TaobaoClient client = new DefaultTaobaoClient(url, appKey, appSecret);
|
||||
|
||||
TradeFullinfoGetRequest req = new TradeFullinfoGetRequest();
|
||||
// req.setFields("tid,type,status,payment,orders,promotion_details,post_fee");
|
||||
req.setFields("tid,post_fee,receiver_name,receiver_state,receiver_city,receiver_district,receiver_address,receiver_mobile,receiver_phone,received_payment,num," +
|
||||
"type,status,payment,orders,rx_audit_status,sellerMemo,pay_time,created,buyer_nick");
|
||||
req.setTid(taoRequest.getOrderId());
|
||||
TradeFullinfoGetResponse rsp = client.execute(req, sessionKey);
|
||||
System.out.println(rsp.getBody());
|
||||
|
||||
var trade = rsp.getTrade();
|
||||
if (trade == null) {
|
||||
//没有找到退款单
|
||||
log.info("/**************主动更新tao订单:END: 没有找到退单****************/");
|
||||
return new ApiResult<>(EnumResultVo.DataError.getIndex(), "没有找到退单" + taoRequest.getOrderId());
|
||||
}
|
||||
|
||||
//TODO:开始更新
|
||||
TaoOrder order = new TaoOrder();
|
||||
order.setId(trade.getTid().toString());
|
||||
order.setOrderCreateTime(trade.getCreated());
|
||||
order.setOrderModifyTime(trade.getModified());
|
||||
order.setPayTime(trade.getPayTime());
|
||||
order.setTotalAmount(BigDecimal.valueOf(Double.parseDouble(trade.getPayment())));
|
||||
order.setShippingFee(BigDecimal.valueOf(Double.parseDouble(trade.getPostFee())));
|
||||
order.setPayAmount(BigDecimal.valueOf(Double.parseDouble(trade.getPayment())));
|
||||
order.setBuyerName(trade.getBuyerNick());
|
||||
order.setSellerMemo(trade.getSellerMemo());
|
||||
order.setProvince(trade.getReceiverState());
|
||||
order.setCity(trade.getReceiverCity());
|
||||
order.setDistrict(trade.getReceiverDistrict());
|
||||
order.setStatus(EnumTmallOrderStatus.getStatus(trade.getStatus()));
|
||||
order.setStatusStr(trade.getStatus());
|
||||
List<TaoOrderItem> items = new ArrayList<>();
|
||||
for (var item : trade.getOrders()) {
|
||||
TaoOrderItem orderItem = new TaoOrderItem();
|
||||
orderItem.setSpecNumber(item.getOuterSkuId());
|
||||
orderItem.setGoodsNumber(item.getOuterIid());
|
||||
orderItem.setProductImgUrl(item.getPicPath());
|
||||
orderItem.setGoodsTitle(item.getTitle());
|
||||
orderItem.setPrice(BigDecimal.valueOf(Double.parseDouble(item.getPrice())));
|
||||
orderItem.setQuantity(item.getNum());
|
||||
orderItem.setSubItemId(item.getOid().toString());
|
||||
orderItem.setSkuInfo(item.getSkuPropertiesName());
|
||||
orderItem.setItemAmount(BigDecimal.valueOf(Double.parseDouble(item.getPayment())));
|
||||
orderItem.setDiscountFee(new BigDecimal(item.getDiscountFee()));
|
||||
orderItem.setAdjustFee(new BigDecimal(item.getAdjustFee()));
|
||||
|
||||
orderItem.setRefundStatusStr(item.getRefundStatus());
|
||||
items.add(orderItem);
|
||||
}
|
||||
order.setTaoOrderItemList(items);
|
||||
|
||||
var result = orderService.updateTmallOrderForOpenTaobao(taoRequest.getShopId(), order);
|
||||
if (result.getCode() == EnumResultVo.DataExist.getIndex()) {
|
||||
//已经存在
|
||||
log.info("/**************主动更新tao订单:开始更新数据库:" + order.getId() + "存在、更新****************/");
|
||||
} else if (result.getCode() == EnumResultVo.SUCCESS.getIndex()) {
|
||||
log.info("/**************主动更新tao订单:开始更新数据库:" + order.getId() + "不存在、新增****************/");
|
||||
} else {
|
||||
log.info("/**************主动更新tao订单:开始更新数据库:" + order.getId() + "报错****************/");
|
||||
}
|
||||
String msg = "";
|
||||
|
||||
log.info("/**************主动更新tao订单:END:" + msg + "****************/");
|
||||
return new ApiResult<>(EnumResultVo.SUCCESS.getIndex(), msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新退货订单
|
||||
*
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
* @throws ApiException
|
||||
*/
|
||||
@RequestMapping("/refund/pull_refund_order")
|
||||
@ResponseBody
|
||||
public ApiResult<String> refundOrderPull(@RequestBody TaoRequest taoRequest, Model model, HttpServletRequest request) throws ApiException {
|
||||
log.info("/**************主动更新tao退货订单****************/");
|
||||
if (taoRequest.getShopId() == null || taoRequest.getShopId() <= 0) {
|
||||
return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误,没有店铺Id");
|
||||
}
|
||||
Long shopId = taoRequest.getShopId();
|
||||
var checkResult = this.checkBefore(shopId);
|
||||
|
||||
if (checkResult.getCode() != EnumResultVo.SUCCESS.getIndex()) {
|
||||
return new ApiResult<>(checkResult.getCode(), checkResult.getMsg());
|
||||
}
|
||||
|
||||
String sessionKey = checkResult.getData().getAccessToken();
|
||||
String url = checkResult.getData().getApiRequestUrl();
|
||||
String appKey = checkResult.getData().getAppKey();
|
||||
String appSecret = checkResult.getData().getAppSecret();
|
||||
|
||||
|
||||
Long pageSize = 50l;
|
||||
Long pageIndex = 1l;
|
||||
|
||||
//第一次获取
|
||||
TaoBaoOpenOrderUpdResult<TaoOrderRefund> upResult = TaoBaoOpenOrderUpdHelper.updTmallRefunOrder(pageIndex, pageSize, url, appKey, appSecret, sessionKey);
|
||||
|
||||
if (upResult.getCode().intValue() != 0) {
|
||||
log.info("/**************主动更新tao退货订单:第一次获取结果失败:" + upResult.getMsg() + "****************/");
|
||||
return new ApiResult<>(EnumResultVo.SystemException.getIndex(), upResult.getMsg());
|
||||
}
|
||||
|
||||
log.info("/**************主动更新tao退货订单:第一次获取结果:总记录数" + upResult.getTotalRecords() + "****************/");
|
||||
int insertSuccess = 0;//新增成功的订单
|
||||
int totalError = 0;
|
||||
int hasExistOrder = 0;//已存在的订单数
|
||||
|
||||
//循环插入订单数据到数据库
|
||||
for (var order : upResult.getList()) {
|
||||
|
||||
//插入订单数据
|
||||
var result = tmallOrderReturnService.updOrderRefund(shopId, order);
|
||||
if (result == EnumResultVo.DataExist.getIndex()) {
|
||||
//已经存在
|
||||
log.info("/**************主动更新tao退货订单:开始更新数据库:" + order.getRefundId() + "存在、更新****************/");
|
||||
hasExistOrder++;
|
||||
} else if (result == EnumResultVo.SUCCESS.getIndex()) {
|
||||
log.info("/**************主动更新tao退货订单:开始更新数据库:" + order.getRefundId() + "不存在、新增****************/");
|
||||
insertSuccess++;
|
||||
} else {
|
||||
log.info("/**************主动更新tao退货订单:开始更新数据库:" + order.getRefundId() + "报错****************/");
|
||||
totalError++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//计算总页数
|
||||
int totalPage = (upResult.getTotalRecords() % pageSize == 0) ? upResult.getTotalRecords() / pageSize.intValue() : (upResult.getTotalRecords() / pageSize.intValue()) + 1;
|
||||
pageIndex++;
|
||||
|
||||
while (pageIndex <= totalPage) {
|
||||
TaoBaoOpenOrderUpdResult<TaoOrderRefund> upResult1 = TaoBaoOpenOrderUpdHelper.updTmallRefunOrder(pageIndex, pageSize, url, appKey, appSecret, sessionKey);
|
||||
//循环插入订单数据到数据库
|
||||
for (var order : upResult1.getList()) {
|
||||
|
||||
//插入订单数据
|
||||
var result1 = tmallOrderReturnService.updOrderRefund(shopId, order);
|
||||
if (result1 == EnumResultVo.DataExist.getIndex()) {
|
||||
//已经存在
|
||||
log.info("/**************主动更新tao退货订单:开始更新数据库:" + order.getRefundId() + "存在、更新****************/");
|
||||
hasExistOrder++;
|
||||
} else if (result1 == EnumResultVo.SUCCESS.getIndex()) {
|
||||
log.info("/**************主动更新tao退货订单:开始更新数据库:" + order.getRefundId() + "不存在、新增****************/");
|
||||
insertSuccess++;
|
||||
} else {
|
||||
log.info("/**************主动更新tao退货订单:开始更新数据库:" + order.getRefundId() + "报错****************/");
|
||||
totalError++;
|
||||
}
|
||||
}
|
||||
pageIndex++;
|
||||
}
|
||||
|
||||
String msg = "成功,总共找到:" + upResult.getTotalRecords() + "条订单,新增:" + insertSuccess + "条,添加错误:" + totalError + "条,更新:" + hasExistOrder + "条";
|
||||
log.info("/**************主动更新tao订单:END:" + msg + "****************/");
|
||||
return new ApiResult<>(EnumResultVo.SUCCESS.getIndex(), msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新单条退货单
|
||||
*
|
||||
* @param taoRequest
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
* @throws ApiException
|
||||
*/
|
||||
@RequestMapping("/refund/pull_refund_order_by_num")
|
||||
@ResponseBody
|
||||
public ApiResult<String> refundOrderPullByNum(@RequestBody TaoRequest taoRequest, Model model, HttpServletRequest request) throws ApiException {
|
||||
log.info("/**************主动更新tao退货订单by number****************/");
|
||||
if (taoRequest.getShopId() == null || taoRequest.getShopId() <= 0) {
|
||||
return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误,没有店铺Id");
|
||||
}
|
||||
if (taoRequest.getOrderId() == null || taoRequest.getOrderId() <= 0) {
|
||||
return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误,缺少退款单号");
|
||||
}
|
||||
|
||||
Long shopId = taoRequest.getShopId();
|
||||
var checkResult = this.checkBefore(shopId);
|
||||
|
||||
if (checkResult.getCode() != EnumResultVo.SUCCESS.getIndex()) {
|
||||
return new ApiResult<>(checkResult.getCode(), checkResult.getMsg());
|
||||
}
|
||||
|
||||
String sessionKey = checkResult.getData().getAccessToken();
|
||||
String url = checkResult.getData().getApiRequestUrl();
|
||||
String appKey = checkResult.getData().getAppKey();
|
||||
String appSecret = checkResult.getData().getAppSecret();
|
||||
|
||||
TaobaoClient client = new DefaultTaobaoClient(url, appKey, appSecret);
|
||||
|
||||
RefundGetRequest req1 = new RefundGetRequest();
|
||||
req1.setFields("refund_id, alipay_no, tid, oid, buyer_nick, seller_nick, total_fee, status, created, refund_fee, good_status, " +
|
||||
"has_good_return, payment, reason, desc,order_status, num_iid, title, price, num, good_return_time, company_name, sid, address, " +
|
||||
"shipping_type, refund_remind_timeout, refund_phase, refund_version, operation_contraint, attribute, outer_id, sku");
|
||||
req1.setRefundId(taoRequest.getOrderId());
|
||||
RefundGetResponse rsp1 = client.execute(req1, sessionKey);
|
||||
System.out.println(rsp1.getBody());
|
||||
|
||||
var item = rsp1.getRefund();
|
||||
if (item == null) {
|
||||
//没有找到退款单
|
||||
log.info("/**************主动更新tao订单:END: 没有找到退单****************/");
|
||||
return new ApiResult<>(EnumResultVo.DataError.getIndex(), "没有找到退单" + taoRequest.getOrderId());
|
||||
}
|
||||
|
||||
if (item.getHasGoodReturn()) {
|
||||
log.info("/**************主动更新tao退货订单:买家需要退货,处理快递公司和快递单号处理*********************/");
|
||||
//买家需要退货,处理快递公司和快递单号处理
|
||||
if (StringUtils.isEmpty(item.getCompanyName())) {
|
||||
log.info("/**************主动更新tao退货订单:买家需要退货,处理快递公司和快递单号处理,主数据中没有快递公司和单号*********************/");
|
||||
String companyName = "";
|
||||
if (rsp1.getRefund().getAttribute().indexOf("logisticsCompanyName:") > -1) {
|
||||
Integer companyNameStart = rsp1.getRefund().getAttribute().indexOf("logisticsCompanyName:") + 21;
|
||||
companyName = rsp1.getRefund().getAttribute().substring(companyNameStart, companyNameStart + 4);
|
||||
}
|
||||
String logisticsCode = "";
|
||||
if (rsp1.getRefund().getAttribute().indexOf("logisticsOrderCode:") > -1) {
|
||||
Integer logisticsCodeStart = rsp1.getRefund().getAttribute().indexOf("logisticsOrderCode:") + 19;
|
||||
logisticsCode = rsp1.getRefund().getAttribute().substring(logisticsCodeStart, logisticsCodeStart + 15);
|
||||
}
|
||||
if (StringUtils.isEmpty(companyName) == false) {
|
||||
item.setCompanyName(companyName);
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(logisticsCode) == false) {
|
||||
if (logisticsCode.indexOf(";") >= 0) {
|
||||
logisticsCode = logisticsCode.substring(0, logisticsCode.indexOf(";"));
|
||||
}
|
||||
item.setSid(logisticsCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
TaoOrderRefund tmallOrderRefund = new TaoOrderRefund();
|
||||
// tmallOrderRefund.setBuyer_nick(item.getBuyerNick());
|
||||
tmallOrderRefund.setCreated(DateUtil.dateToStamp(item.getCreated()));
|
||||
tmallOrderRefund.setRemark(item.getDesc());
|
||||
tmallOrderRefund.setGoodStatus(item.getGoodStatus());
|
||||
tmallOrderRefund.setHasGoodReturn(item.getHasGoodReturn() == true ? 1 : 0);
|
||||
tmallOrderRefund.setLogisticsCode(item.getSid());
|
||||
tmallOrderRefund.setLogisticsCompany(item.getCompanyName());
|
||||
tmallOrderRefund.setModified(DateUtil.dateToStamp(item.getModified()));
|
||||
tmallOrderRefund.setOid(item.getOid());
|
||||
// tmallOrderRefund.setOrderStatus(item.getOrderStatus());
|
||||
tmallOrderRefund.setReason(item.getReason());
|
||||
tmallOrderRefund.setRefundFee(BigDecimal.valueOf(Double.parseDouble(item.getRefundFee())));
|
||||
tmallOrderRefund.setRefundId(item.getRefundId());
|
||||
tmallOrderRefund.setStatus(item.getStatus());
|
||||
tmallOrderRefund.setTid(item.getTid());
|
||||
// tmallOrderRefund.setTotal_fee(item.getTotalFee());
|
||||
tmallOrderRefund.setNum(item.getNum());
|
||||
tmallOrderRefund.setRefundPhase(item.getRefundPhase());
|
||||
|
||||
//插入订单数据
|
||||
var result1 = tmallOrderReturnService.updOrderRefund(shopId, tmallOrderRefund);
|
||||
String msg = "SUCCESS";
|
||||
if (result1 == EnumResultVo.DataExist.getIndex()) {
|
||||
//已经存在
|
||||
log.info("/**************主动更新tao退货订单:开始更新数据库:" + tmallOrderRefund.getRefundId() + "存在、更新****************/");
|
||||
msg = "更新成功";
|
||||
} else if (result1 == EnumResultVo.SUCCESS.getIndex()) {
|
||||
log.info("/**************主动更新tao退货订单:开始更新数据库:" + tmallOrderRefund.getRefundId() + "不存在、新增****************/");
|
||||
msg = "新增成功";
|
||||
} else {
|
||||
log.info("/**************主动更新tao退货订单:开始更新数据库:" + tmallOrderRefund.getRefundId() + "报错****************/");
|
||||
msg = "更新报错";
|
||||
}
|
||||
|
||||
|
||||
log.info("/**************主动更新tao订单:END:" + msg + "****************/");
|
||||
return new ApiResult<>(EnumResultVo.SUCCESS.getIndex(), msg);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
package com.qihang.tao.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName sys_platform
|
||||
*/
|
||||
public class SysPlatform implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String appSecret;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getAppKey() {
|
||||
return appKey;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setAppKey(String appKey) {
|
||||
this.appKey = appKey;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getAppSecret() {
|
||||
return appSecret;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setAppSecret(String appSecret) {
|
||||
this.appSecret = appSecret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SysPlatform other = (SysPlatform) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
|
||||
&& (this.getAppKey() == null ? other.getAppKey() == null : this.getAppKey().equals(other.getAppKey()))
|
||||
&& (this.getAppSecret() == null ? other.getAppSecret() == null : this.getAppSecret().equals(other.getAppSecret()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
|
||||
result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
|
||||
result = prime * result + ((getAppSecret() == null) ? 0 : getAppSecret().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(", name=").append(name);
|
||||
sb.append(", code=").append(code);
|
||||
sb.append(", appKey=").append(appKey);
|
||||
sb.append(", appSecret=").append(appSecret);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,417 @@
|
|||
package com.qihang.tao.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 数据中心-店铺
|
||||
* @TableName sys_shop
|
||||
*/
|
||||
public class SysShop implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 店铺名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 对应第三方平台Id
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 店铺url
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 状态(1正常2已删除)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Long modifyOn;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 第三方平台店铺id,淘宝天猫开放平台使用
|
||||
*/
|
||||
private Long sellerId;
|
||||
|
||||
/**
|
||||
* Appkey
|
||||
*/
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
* Appsercet
|
||||
*/
|
||||
private String appSercet;
|
||||
|
||||
/**
|
||||
* 第三方平台sessionKey(access_token)
|
||||
*/
|
||||
private String accessToken;
|
||||
|
||||
/**
|
||||
* 到期
|
||||
*/
|
||||
private Long expiresIn;
|
||||
|
||||
/**
|
||||
* access_token开始时间
|
||||
*/
|
||||
private Long accessTokenBegin;
|
||||
|
||||
/**
|
||||
* 刷新token
|
||||
*/
|
||||
private String refreshToken;
|
||||
|
||||
/**
|
||||
* 刷新token过期时间
|
||||
*/
|
||||
private Long refreshTokenTimeout;
|
||||
|
||||
/**
|
||||
* 请求url
|
||||
*/
|
||||
private String apiRequestUrl;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺名
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺名
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对应第三方平台Id
|
||||
*/
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对应第三方平台Id
|
||||
*/
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺url
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺url
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(1正常2已删除)
|
||||
*/
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(1正常2已删除)
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
public Long getModifyOn() {
|
||||
return modifyOn;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
public void setModifyOn(Long modifyOn) {
|
||||
this.modifyOn = modifyOn;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
/**
|
||||
* 第三方平台店铺id,淘宝天猫开放平台使用
|
||||
*/
|
||||
public Long getSellerId() {
|
||||
return sellerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 第三方平台店铺id,淘宝天猫开放平台使用
|
||||
*/
|
||||
public void setSellerId(Long sellerId) {
|
||||
this.sellerId = sellerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appkey
|
||||
*/
|
||||
public String getAppKey() {
|
||||
return appKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appkey
|
||||
*/
|
||||
public void setAppKey(String appKey) {
|
||||
this.appKey = appKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appsercet
|
||||
*/
|
||||
public String getAppSercet() {
|
||||
return appSercet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appsercet
|
||||
*/
|
||||
public void setAppSercet(String appSercet) {
|
||||
this.appSercet = appSercet;
|
||||
}
|
||||
|
||||
/**
|
||||
* 第三方平台sessionKey(access_token)
|
||||
*/
|
||||
public String getAccessToken() {
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* 第三方平台sessionKey(access_token)
|
||||
*/
|
||||
public void setAccessToken(String accessToken) {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* 到期
|
||||
*/
|
||||
public Long getExpiresIn() {
|
||||
return expiresIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* 到期
|
||||
*/
|
||||
public void setExpiresIn(Long expiresIn) {
|
||||
this.expiresIn = expiresIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* access_token开始时间
|
||||
*/
|
||||
public Long getAccessTokenBegin() {
|
||||
return accessTokenBegin;
|
||||
}
|
||||
|
||||
/**
|
||||
* access_token开始时间
|
||||
*/
|
||||
public void setAccessTokenBegin(Long accessTokenBegin) {
|
||||
this.accessTokenBegin = accessTokenBegin;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新token
|
||||
*/
|
||||
public String getRefreshToken() {
|
||||
return refreshToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新token
|
||||
*/
|
||||
public void setRefreshToken(String refreshToken) {
|
||||
this.refreshToken = refreshToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新token过期时间
|
||||
*/
|
||||
public Long getRefreshTokenTimeout() {
|
||||
return refreshTokenTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新token过期时间
|
||||
*/
|
||||
public void setRefreshTokenTimeout(Long refreshTokenTimeout) {
|
||||
this.refreshTokenTimeout = refreshTokenTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求url
|
||||
*/
|
||||
public String getApiRequestUrl() {
|
||||
return apiRequestUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求url
|
||||
*/
|
||||
public void setApiRequestUrl(String apiRequestUrl) {
|
||||
this.apiRequestUrl = apiRequestUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SysShop other = (SysShop) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
|
||||
&& (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
|
||||
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||
&& (this.getModifyOn() == null ? other.getModifyOn() == null : this.getModifyOn().equals(other.getModifyOn()))
|
||||
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
|
||||
&& (this.getSellerId() == null ? other.getSellerId() == null : this.getSellerId().equals(other.getSellerId()))
|
||||
&& (this.getAppKey() == null ? other.getAppKey() == null : this.getAppKey().equals(other.getAppKey()))
|
||||
&& (this.getAppSercet() == null ? other.getAppSercet() == null : this.getAppSercet().equals(other.getAppSercet()))
|
||||
&& (this.getAccessToken() == null ? other.getAccessToken() == null : this.getAccessToken().equals(other.getAccessToken()))
|
||||
&& (this.getExpiresIn() == null ? other.getExpiresIn() == null : this.getExpiresIn().equals(other.getExpiresIn()))
|
||||
&& (this.getAccessTokenBegin() == null ? other.getAccessTokenBegin() == null : this.getAccessTokenBegin().equals(other.getAccessTokenBegin()))
|
||||
&& (this.getRefreshToken() == null ? other.getRefreshToken() == null : this.getRefreshToken().equals(other.getRefreshToken()))
|
||||
&& (this.getRefreshTokenTimeout() == null ? other.getRefreshTokenTimeout() == null : this.getRefreshTokenTimeout().equals(other.getRefreshTokenTimeout()))
|
||||
&& (this.getApiRequestUrl() == null ? other.getApiRequestUrl() == null : this.getApiRequestUrl().equals(other.getApiRequestUrl()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
|
||||
result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
|
||||
result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
result = prime * result + ((getModifyOn() == null) ? 0 : getModifyOn().hashCode());
|
||||
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
|
||||
result = prime * result + ((getSellerId() == null) ? 0 : getSellerId().hashCode());
|
||||
result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
|
||||
result = prime * result + ((getAppSercet() == null) ? 0 : getAppSercet().hashCode());
|
||||
result = prime * result + ((getAccessToken() == null) ? 0 : getAccessToken().hashCode());
|
||||
result = prime * result + ((getExpiresIn() == null) ? 0 : getExpiresIn().hashCode());
|
||||
result = prime * result + ((getAccessTokenBegin() == null) ? 0 : getAccessTokenBegin().hashCode());
|
||||
result = prime * result + ((getRefreshToken() == null) ? 0 : getRefreshToken().hashCode());
|
||||
result = prime * result + ((getRefreshTokenTimeout() == null) ? 0 : getRefreshTokenTimeout().hashCode());
|
||||
result = prime * result + ((getApiRequestUrl() == null) ? 0 : getApiRequestUrl().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(", name=").append(name);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append(", url=").append(url);
|
||||
sb.append(", sort=").append(sort);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", modifyOn=").append(modifyOn);
|
||||
sb.append(", remark=").append(remark);
|
||||
sb.append(", sellerId=").append(sellerId);
|
||||
sb.append(", appKey=").append(appKey);
|
||||
sb.append(", appSercet=").append(appSercet);
|
||||
sb.append(", accessToken=").append(accessToken);
|
||||
sb.append(", expiresIn=").append(expiresIn);
|
||||
sb.append(", accessTokenBegin=").append(accessTokenBegin);
|
||||
sb.append(", refreshToken=").append(refreshToken);
|
||||
sb.append(", refreshTokenTimeout=").append(refreshTokenTimeout);
|
||||
sb.append(", apiRequestUrl=").append(apiRequestUrl);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,462 @@
|
|||
package com.qihang.tao.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName tao_goods_sku
|
||||
*/
|
||||
public class TaoGoodsSku implements Serializable {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 外键id
|
||||
*/
|
||||
private Long taoGoodsId;
|
||||
|
||||
/**
|
||||
* sku所属商品数字id
|
||||
*/
|
||||
private Long numIid;
|
||||
|
||||
/**
|
||||
* sku所属商品id(注意:iid近期即将废弃,请用num_iid参数)
|
||||
*/
|
||||
private String iid;
|
||||
|
||||
/**
|
||||
* 商品skuid,阿里
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* sku的销售属性组合字符串(颜色,大小,等等,可通过类目API获取某类目下的销售属性),格式是p1:v1;p2:v2
|
||||
*/
|
||||
private String properties;
|
||||
|
||||
/**
|
||||
* sku所对应的销售属性的中文名字串,格式如:pid1:vid1:pid_name1:vid_name1;pid2:vid2:pid_name2:vid_name2……
|
||||
*/
|
||||
private String propertiesName;
|
||||
|
||||
/**
|
||||
* 属于这个sku的商品的数量,
|
||||
*/
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* specId
|
||||
*/
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 属于这个sku的商品的价格 取值范围:0-100000000;精确到2位小数;单位:元。如:200.07,表示:200元7分。
|
||||
*/
|
||||
private Double price;
|
||||
|
||||
/**
|
||||
* 商家设置的外部id。
|
||||
*/
|
||||
private String outerId;
|
||||
|
||||
/**
|
||||
* sku创建日期 时间格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private Date created;
|
||||
|
||||
/**
|
||||
* sku最后修改日期 时间格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private Date modified;
|
||||
|
||||
/**
|
||||
* sku状态。 normal
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 表示SKu上的产品规格信息
|
||||
*/
|
||||
private String skuSpecId;
|
||||
|
||||
/**
|
||||
* 商品级别的条形码
|
||||
*/
|
||||
private String barcode;
|
||||
|
||||
/**
|
||||
* erp商品SKUid
|
||||
*/
|
||||
private Integer erpGoodsSkuId;
|
||||
|
||||
/**
|
||||
* erp商品id
|
||||
*/
|
||||
private Integer erpGoodsId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 外键id
|
||||
*/
|
||||
public Long getTaoGoodsId() {
|
||||
return taoGoodsId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 外键id
|
||||
*/
|
||||
public void setTaoGoodsId(Long taoGoodsId) {
|
||||
this.taoGoodsId = taoGoodsId;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku所属商品数字id
|
||||
*/
|
||||
public Long getNumIid() {
|
||||
return numIid;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku所属商品数字id
|
||||
*/
|
||||
public void setNumIid(Long numIid) {
|
||||
this.numIid = numIid;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku所属商品id(注意:iid近期即将废弃,请用num_iid参数)
|
||||
*/
|
||||
public String getIid() {
|
||||
return iid;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku所属商品id(注意:iid近期即将废弃,请用num_iid参数)
|
||||
*/
|
||||
public void setIid(String iid) {
|
||||
this.iid = iid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品skuid,阿里
|
||||
*/
|
||||
public Long getSkuId() {
|
||||
return skuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品skuid,阿里
|
||||
*/
|
||||
public void setSkuId(Long skuId) {
|
||||
this.skuId = skuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku的销售属性组合字符串(颜色,大小,等等,可通过类目API获取某类目下的销售属性),格式是p1:v1;p2:v2
|
||||
*/
|
||||
public String getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku的销售属性组合字符串(颜色,大小,等等,可通过类目API获取某类目下的销售属性),格式是p1:v1;p2:v2
|
||||
*/
|
||||
public void setProperties(String properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku所对应的销售属性的中文名字串,格式如:pid1:vid1:pid_name1:vid_name1;pid2:vid2:pid_name2:vid_name2……
|
||||
*/
|
||||
public String getPropertiesName() {
|
||||
return propertiesName;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku所对应的销售属性的中文名字串,格式如:pid1:vid1:pid_name1:vid_name1;pid2:vid2:pid_name2:vid_name2……
|
||||
*/
|
||||
public void setPropertiesName(String propertiesName) {
|
||||
this.propertiesName = propertiesName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属于这个sku的商品的数量,
|
||||
*/
|
||||
public Long getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属于这个sku的商品的数量,
|
||||
*/
|
||||
public void setQuantity(Long quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* specId
|
||||
*/
|
||||
public String getSpec() {
|
||||
return spec;
|
||||
}
|
||||
|
||||
/**
|
||||
* specId
|
||||
*/
|
||||
public void setSpec(String spec) {
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属于这个sku的商品的价格 取值范围:0-100000000;精确到2位小数;单位:元。如:200.07,表示:200元7分。
|
||||
*/
|
||||
public Double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属于这个sku的商品的价格 取值范围:0-100000000;精确到2位小数;单位:元。如:200.07,表示:200元7分。
|
||||
*/
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家设置的外部id。
|
||||
*/
|
||||
public String getOuterId() {
|
||||
return outerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家设置的外部id。
|
||||
*/
|
||||
public void setOuterId(String outerId) {
|
||||
this.outerId = outerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku创建日期 时间格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku创建日期 时间格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public void setCreated(Date created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku最后修改日期 时间格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public Date getModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku最后修改日期 时间格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku状态。 normal
|
||||
*/
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku状态。 normal
|
||||
*/
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 表示SKu上的产品规格信息
|
||||
*/
|
||||
public String getSkuSpecId() {
|
||||
return skuSpecId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 表示SKu上的产品规格信息
|
||||
*/
|
||||
public void setSkuSpecId(String skuSpecId) {
|
||||
this.skuSpecId = skuSpecId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品级别的条形码
|
||||
*/
|
||||
public String getBarcode() {
|
||||
return barcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品级别的条形码
|
||||
*/
|
||||
public void setBarcode(String barcode) {
|
||||
this.barcode = barcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* erp商品SKUid
|
||||
*/
|
||||
public Integer getErpGoodsSkuId() {
|
||||
return erpGoodsSkuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* erp商品SKUid
|
||||
*/
|
||||
public void setErpGoodsSkuId(Integer erpGoodsSkuId) {
|
||||
this.erpGoodsSkuId = erpGoodsSkuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* erp商品id
|
||||
*/
|
||||
public Integer getErpGoodsId() {
|
||||
return erpGoodsId;
|
||||
}
|
||||
|
||||
/**
|
||||
* erp商品id
|
||||
*/
|
||||
public void setErpGoodsId(Integer erpGoodsId) {
|
||||
this.erpGoodsId = erpGoodsId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
TaoGoodsSku other = (TaoGoodsSku) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getTaoGoodsId() == null ? other.getTaoGoodsId() == null : this.getTaoGoodsId().equals(other.getTaoGoodsId()))
|
||||
&& (this.getNumIid() == null ? other.getNumIid() == null : this.getNumIid().equals(other.getNumIid()))
|
||||
&& (this.getIid() == null ? other.getIid() == null : this.getIid().equals(other.getIid()))
|
||||
&& (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId()))
|
||||
&& (this.getProperties() == null ? other.getProperties() == null : this.getProperties().equals(other.getProperties()))
|
||||
&& (this.getPropertiesName() == null ? other.getPropertiesName() == null : this.getPropertiesName().equals(other.getPropertiesName()))
|
||||
&& (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
|
||||
&& (this.getSpec() == null ? other.getSpec() == null : this.getSpec().equals(other.getSpec()))
|
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
|
||||
&& (this.getOuterId() == null ? other.getOuterId() == null : this.getOuterId().equals(other.getOuterId()))
|
||||
&& (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
|
||||
&& (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||
&& (this.getSkuSpecId() == null ? other.getSkuSpecId() == null : this.getSkuSpecId().equals(other.getSkuSpecId()))
|
||||
&& (this.getBarcode() == null ? other.getBarcode() == null : this.getBarcode().equals(other.getBarcode()))
|
||||
&& (this.getErpGoodsSkuId() == null ? other.getErpGoodsSkuId() == null : this.getErpGoodsSkuId().equals(other.getErpGoodsSkuId()))
|
||||
&& (this.getErpGoodsId() == null ? other.getErpGoodsId() == null : this.getErpGoodsId().equals(other.getErpGoodsId()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getTaoGoodsId() == null) ? 0 : getTaoGoodsId().hashCode());
|
||||
result = prime * result + ((getNumIid() == null) ? 0 : getNumIid().hashCode());
|
||||
result = prime * result + ((getIid() == null) ? 0 : getIid().hashCode());
|
||||
result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode());
|
||||
result = prime * result + ((getProperties() == null) ? 0 : getProperties().hashCode());
|
||||
result = prime * result + ((getPropertiesName() == null) ? 0 : getPropertiesName().hashCode());
|
||||
result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
|
||||
result = prime * result + ((getSpec() == null) ? 0 : getSpec().hashCode());
|
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
|
||||
result = prime * result + ((getOuterId() == null) ? 0 : getOuterId().hashCode());
|
||||
result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
|
||||
result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
result = prime * result + ((getSkuSpecId() == null) ? 0 : getSkuSpecId().hashCode());
|
||||
result = prime * result + ((getBarcode() == null) ? 0 : getBarcode().hashCode());
|
||||
result = prime * result + ((getErpGoodsSkuId() == null) ? 0 : getErpGoodsSkuId().hashCode());
|
||||
result = prime * result + ((getErpGoodsId() == null) ? 0 : getErpGoodsId().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", taoGoodsId=").append(taoGoodsId);
|
||||
sb.append(", numIid=").append(numIid);
|
||||
sb.append(", iid=").append(iid);
|
||||
sb.append(", skuId=").append(skuId);
|
||||
sb.append(", properties=").append(properties);
|
||||
sb.append(", propertiesName=").append(propertiesName);
|
||||
sb.append(", quantity=").append(quantity);
|
||||
sb.append(", spec=").append(spec);
|
||||
sb.append(", price=").append(price);
|
||||
sb.append(", outerId=").append(outerId);
|
||||
sb.append(", created=").append(created);
|
||||
sb.append(", modified=").append(modified);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", skuSpecId=").append(skuSpecId);
|
||||
sb.append(", barcode=").append(barcode);
|
||||
sb.append(", erpGoodsSkuId=").append(erpGoodsSkuId);
|
||||
sb.append(", erpGoodsId=").append(erpGoodsId);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,952 @@
|
|||
package com.qihang.tao.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 淘宝订单明细表
|
||||
* @TableName tao_order_item
|
||||
*/
|
||||
public class TaoOrderItem implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Long tid;
|
||||
|
||||
/**
|
||||
* 子订单编号
|
||||
*/
|
||||
private Long oid;
|
||||
|
||||
/**
|
||||
* 应付金额(商品价格 * 商品数量 + 手工调整金额 - 子订单级订单优惠金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分
|
||||
*/
|
||||
private BigDecimal totalFee;
|
||||
|
||||
/**
|
||||
* 子订单级订单优惠金额。精确到2位小数;单位:元。如:200.07,表示:200元7分
|
||||
*/
|
||||
private BigDecimal discountFee;
|
||||
|
||||
/**
|
||||
* 手工调整金额.格式为:1.01;单位:元;精确到小数点后两位.
|
||||
*/
|
||||
private BigDecimal adjustFee;
|
||||
|
||||
/**
|
||||
* 分摊之后的实付金额
|
||||
*/
|
||||
private Double divideOrderFee;
|
||||
|
||||
/**
|
||||
* 优惠分摊
|
||||
*/
|
||||
private Double partMjzDiscount;
|
||||
|
||||
/**
|
||||
* 子订单实付金额。精确到2位小数,单位:元。如:200.07,表示:200元7分。对于多子订单的交易,计算公式如下:payment = price * num + adjust_fee - discount_fee ;单子订单交易,payment与主订单的payment一致,对于退款成功的子订单,由于主订单的优惠分摊金额,会造成该字段可能不为0.00元。建议使用退款前的实付金额减去退款单中的实际退款金额计算。
|
||||
*/
|
||||
private Double payment;
|
||||
|
||||
/**
|
||||
* 商品标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 商品主图
|
||||
*/
|
||||
private String picPath;
|
||||
|
||||
/**
|
||||
* 商品价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 商品数字ID
|
||||
*/
|
||||
private Long numIid;
|
||||
|
||||
/**
|
||||
* 商品的最小库存单位Sku的id.可以通过taobao.item.sku.get获取详细的Sku信息天猫的SKUID
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* 商家外部编码(可与商家外部系统对接)。
|
||||
*/
|
||||
private String outerIid;
|
||||
|
||||
/**
|
||||
* 外部网店自己定义的Sku编号
|
||||
*/
|
||||
private String outerSkuId;
|
||||
|
||||
/**
|
||||
* SKU的值。如:机身颜色:黑色;手机套餐:官方标配
|
||||
*/
|
||||
private String skuPropertiesName;
|
||||
|
||||
/**
|
||||
* 套餐ID
|
||||
*/
|
||||
private String itemMealId;
|
||||
|
||||
/**
|
||||
* 套餐的值。如:M8原装电池:便携支架:M8专用座充:莫凡保护袋
|
||||
*/
|
||||
private String itemMealName;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer num;
|
||||
|
||||
/**
|
||||
* 订单快照URL
|
||||
*/
|
||||
private String snapshotUrl;
|
||||
|
||||
/**
|
||||
* 订单超时到期时间。格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private Date timeoutActionTime;
|
||||
|
||||
/**
|
||||
* 商品备注
|
||||
*/
|
||||
private String itemMemo;
|
||||
|
||||
/**
|
||||
* 买家是否已评价。可选值:true(已评价),false(未评价)
|
||||
*/
|
||||
private String buyerRate;
|
||||
|
||||
/**
|
||||
* 卖家是否已评价。可选值:true(已评价),false(未评价)
|
||||
*/
|
||||
private String sellerRate;
|
||||
|
||||
/**
|
||||
* 卖家类型,可选值为:B(商城商家),C(普通卖家)
|
||||
*/
|
||||
private String sellerType;
|
||||
|
||||
/**
|
||||
* 交易商品对应的类目ID
|
||||
*/
|
||||
private Long cid;
|
||||
|
||||
/**
|
||||
* 是否超卖
|
||||
*/
|
||||
private String isOversold;
|
||||
|
||||
/**
|
||||
* 子订单的交易结束时间说明:子订单有单独的结束时间,与主订单的结束时间可能有所不同,在有退款发起的时候或者是主订单分阶段付款的时候,子订单的结束时间会早于主订单的结束时间,所以开放这个字段便于订单结束状态的判断
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 子订单来源,如jhs(聚划算)、taobao(淘宝)、wap(无线)
|
||||
*/
|
||||
private String orderFrom;
|
||||
|
||||
/**
|
||||
* 是否是服务订单,是返回true,否返回false。
|
||||
*/
|
||||
private String isServiceOrder;
|
||||
|
||||
/**
|
||||
* 子订单发货时间,当卖家对订单进行了多次发货,子订单的发货时间和主订单的发货时间可能不一样了,那么就需要以子订单的时间为准。(没有进行多次发货的订单,主订单的发货时间和子订单的发货时间都一样)
|
||||
*/
|
||||
private Date consignTime;
|
||||
|
||||
/**
|
||||
* 子订单的运送方式(卖家对订单进行多次发货之后,一个主订单下的子订单的运送方式可能不同,用order.shipping_type来区分子订单的运送方式)
|
||||
*/
|
||||
private String shippingType;
|
||||
|
||||
/**
|
||||
* 子订单发货的快递公司名称
|
||||
*/
|
||||
private String logisticsCompany;
|
||||
|
||||
/**
|
||||
* 子订单所在包裹的运单号
|
||||
*/
|
||||
private String invoiceNo;
|
||||
|
||||
/**
|
||||
* 捆绑的子订单号,表示该子订单要和捆绑的子订单一起发货,用于卖家子订单捆绑发货
|
||||
*/
|
||||
private String bindOid;
|
||||
|
||||
/**
|
||||
* 订单状态(请关注此状态,如果为TRADE_CLOSED_BY_TAOBAO状态,则不要对此订单进行发货,切记啊!)。可选值:
|
||||
TRADE_NO_CREATE_PAY(没有创建支付宝交易)
|
||||
WAIT_BUYER_PAY(等待买家付款)
|
||||
WAIT_SELLER_SEND_GOODS(等待卖家发货,即:买家已付款)
|
||||
WAIT_BUYER_CONFIRM_GOODS(等待买家确认收货,即:卖家已发货)
|
||||
TRADE_BUYER_SIGNED(买家已签收,货到付款专用)
|
||||
TRADE_FINISHED(交易成功)
|
||||
TRADE_CLOSED(付款以后用户退款成功,交易自动关闭)
|
||||
TRADE_CLOSED_BY_TAOBAO(付款以前,卖家或买家主动关闭交易)
|
||||
PAY_PENDING(国际信用卡支付付款确认中)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 退款状态。退款状态。可选值 WAIT_SELLER_AGREE(买家已经申请退款,等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款,等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货,等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功)
|
||||
*/
|
||||
private String refundStatus;
|
||||
|
||||
/**
|
||||
* 最近退款ID
|
||||
*/
|
||||
private String refundId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
public Long getTid() {
|
||||
return tid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
public void setTid(Long tid) {
|
||||
this.tid = tid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单编号
|
||||
*/
|
||||
public Long getOid() {
|
||||
return oid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单编号
|
||||
*/
|
||||
public void setOid(Long oid) {
|
||||
this.oid = oid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应付金额(商品价格 * 商品数量 + 手工调整金额 - 子订单级订单优惠金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分
|
||||
*/
|
||||
public BigDecimal getTotalFee() {
|
||||
return totalFee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应付金额(商品价格 * 商品数量 + 手工调整金额 - 子订单级订单优惠金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分
|
||||
*/
|
||||
public void setTotalFee(BigDecimal totalFee) {
|
||||
this.totalFee = totalFee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单级订单优惠金额。精确到2位小数;单位:元。如:200.07,表示:200元7分
|
||||
*/
|
||||
public BigDecimal getDiscountFee() {
|
||||
return discountFee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单级订单优惠金额。精确到2位小数;单位:元。如:200.07,表示:200元7分
|
||||
*/
|
||||
public void setDiscountFee(BigDecimal discountFee) {
|
||||
this.discountFee = discountFee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手工调整金额.格式为:1.01;单位:元;精确到小数点后两位.
|
||||
*/
|
||||
public BigDecimal getAdjustFee() {
|
||||
return adjustFee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手工调整金额.格式为:1.01;单位:元;精确到小数点后两位.
|
||||
*/
|
||||
public void setAdjustFee(BigDecimal adjustFee) {
|
||||
this.adjustFee = adjustFee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分摊之后的实付金额
|
||||
*/
|
||||
public Double getDivideOrderFee() {
|
||||
return divideOrderFee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分摊之后的实付金额
|
||||
*/
|
||||
public void setDivideOrderFee(Double divideOrderFee) {
|
||||
this.divideOrderFee = divideOrderFee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 优惠分摊
|
||||
*/
|
||||
public Double getPartMjzDiscount() {
|
||||
return partMjzDiscount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 优惠分摊
|
||||
*/
|
||||
public void setPartMjzDiscount(Double partMjzDiscount) {
|
||||
this.partMjzDiscount = partMjzDiscount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单实付金额。精确到2位小数,单位:元。如:200.07,表示:200元7分。对于多子订单的交易,计算公式如下:payment = price * num + adjust_fee - discount_fee ;单子订单交易,payment与主订单的payment一致,对于退款成功的子订单,由于主订单的优惠分摊金额,会造成该字段可能不为0.00元。建议使用退款前的实付金额减去退款单中的实际退款金额计算。
|
||||
*/
|
||||
public Double getPayment() {
|
||||
return payment;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单实付金额。精确到2位小数,单位:元。如:200.07,表示:200元7分。对于多子订单的交易,计算公式如下:payment = price * num + adjust_fee - discount_fee ;单子订单交易,payment与主订单的payment一致,对于退款成功的子订单,由于主订单的优惠分摊金额,会造成该字段可能不为0.00元。建议使用退款前的实付金额减去退款单中的实际退款金额计算。
|
||||
*/
|
||||
public void setPayment(Double payment) {
|
||||
this.payment = payment;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品标题
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品标题
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品主图
|
||||
*/
|
||||
public String getPicPath() {
|
||||
return picPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品主图
|
||||
*/
|
||||
public void setPicPath(String picPath) {
|
||||
this.picPath = picPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品价格
|
||||
*/
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品价格
|
||||
*/
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品数字ID
|
||||
*/
|
||||
public Long getNumIid() {
|
||||
return numIid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品数字ID
|
||||
*/
|
||||
public void setNumIid(Long numIid) {
|
||||
this.numIid = numIid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品的最小库存单位Sku的id.可以通过taobao.item.sku.get获取详细的Sku信息天猫的SKUID
|
||||
*/
|
||||
public Long getSkuId() {
|
||||
return skuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品的最小库存单位Sku的id.可以通过taobao.item.sku.get获取详细的Sku信息天猫的SKUID
|
||||
*/
|
||||
public void setSkuId(Long skuId) {
|
||||
this.skuId = skuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家外部编码(可与商家外部系统对接)。
|
||||
*/
|
||||
public String getOuterIid() {
|
||||
return outerIid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家外部编码(可与商家外部系统对接)。
|
||||
*/
|
||||
public void setOuterIid(String outerIid) {
|
||||
this.outerIid = outerIid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部网店自己定义的Sku编号
|
||||
*/
|
||||
public String getOuterSkuId() {
|
||||
return outerSkuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部网店自己定义的Sku编号
|
||||
*/
|
||||
public void setOuterSkuId(String outerSkuId) {
|
||||
this.outerSkuId = outerSkuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* SKU的值。如:机身颜色:黑色;手机套餐:官方标配
|
||||
*/
|
||||
public String getSkuPropertiesName() {
|
||||
return skuPropertiesName;
|
||||
}
|
||||
|
||||
/**
|
||||
* SKU的值。如:机身颜色:黑色;手机套餐:官方标配
|
||||
*/
|
||||
public void setSkuPropertiesName(String skuPropertiesName) {
|
||||
this.skuPropertiesName = skuPropertiesName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 套餐ID
|
||||
*/
|
||||
public String getItemMealId() {
|
||||
return itemMealId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 套餐ID
|
||||
*/
|
||||
public void setItemMealId(String itemMealId) {
|
||||
this.itemMealId = itemMealId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 套餐的值。如:M8原装电池:便携支架:M8专用座充:莫凡保护袋
|
||||
*/
|
||||
public String getItemMealName() {
|
||||
return itemMealName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 套餐的值。如:M8原装电池:便携支架:M8专用座充:莫凡保护袋
|
||||
*/
|
||||
public void setItemMealName(String itemMealName) {
|
||||
this.itemMealName = itemMealName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
public Integer getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
public void setNum(Integer num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单快照URL
|
||||
*/
|
||||
public String getSnapshotUrl() {
|
||||
return snapshotUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单快照URL
|
||||
*/
|
||||
public void setSnapshotUrl(String snapshotUrl) {
|
||||
this.snapshotUrl = snapshotUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单超时到期时间。格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public Date getTimeoutActionTime() {
|
||||
return timeoutActionTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单超时到期时间。格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public void setTimeoutActionTime(Date timeoutActionTime) {
|
||||
this.timeoutActionTime = timeoutActionTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品备注
|
||||
*/
|
||||
public String getItemMemo() {
|
||||
return itemMemo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品备注
|
||||
*/
|
||||
public void setItemMemo(String itemMemo) {
|
||||
this.itemMemo = itemMemo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 买家是否已评价。可选值:true(已评价),false(未评价)
|
||||
*/
|
||||
public String getBuyerRate() {
|
||||
return buyerRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 买家是否已评价。可选值:true(已评价),false(未评价)
|
||||
*/
|
||||
public void setBuyerRate(String buyerRate) {
|
||||
this.buyerRate = buyerRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 卖家是否已评价。可选值:true(已评价),false(未评价)
|
||||
*/
|
||||
public String getSellerRate() {
|
||||
return sellerRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 卖家是否已评价。可选值:true(已评价),false(未评价)
|
||||
*/
|
||||
public void setSellerRate(String sellerRate) {
|
||||
this.sellerRate = sellerRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 卖家类型,可选值为:B(商城商家),C(普通卖家)
|
||||
*/
|
||||
public String getSellerType() {
|
||||
return sellerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 卖家类型,可选值为:B(商城商家),C(普通卖家)
|
||||
*/
|
||||
public void setSellerType(String sellerType) {
|
||||
this.sellerType = sellerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 交易商品对应的类目ID
|
||||
*/
|
||||
public Long getCid() {
|
||||
return cid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 交易商品对应的类目ID
|
||||
*/
|
||||
public void setCid(Long cid) {
|
||||
this.cid = cid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否超卖
|
||||
*/
|
||||
public String getIsOversold() {
|
||||
return isOversold;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否超卖
|
||||
*/
|
||||
public void setIsOversold(String isOversold) {
|
||||
this.isOversold = isOversold;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单的交易结束时间说明:子订单有单独的结束时间,与主订单的结束时间可能有所不同,在有退款发起的时候或者是主订单分阶段付款的时候,子订单的结束时间会早于主订单的结束时间,所以开放这个字段便于订单结束状态的判断
|
||||
*/
|
||||
public Date getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单的交易结束时间说明:子订单有单独的结束时间,与主订单的结束时间可能有所不同,在有退款发起的时候或者是主订单分阶段付款的时候,子订单的结束时间会早于主订单的结束时间,所以开放这个字段便于订单结束状态的判断
|
||||
*/
|
||||
public void setEndTime(Date endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单来源,如jhs(聚划算)、taobao(淘宝)、wap(无线)
|
||||
*/
|
||||
public String getOrderFrom() {
|
||||
return orderFrom;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单来源,如jhs(聚划算)、taobao(淘宝)、wap(无线)
|
||||
*/
|
||||
public void setOrderFrom(String orderFrom) {
|
||||
this.orderFrom = orderFrom;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是服务订单,是返回true,否返回false。
|
||||
*/
|
||||
public String getIsServiceOrder() {
|
||||
return isServiceOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是服务订单,是返回true,否返回false。
|
||||
*/
|
||||
public void setIsServiceOrder(String isServiceOrder) {
|
||||
this.isServiceOrder = isServiceOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单发货时间,当卖家对订单进行了多次发货,子订单的发货时间和主订单的发货时间可能不一样了,那么就需要以子订单的时间为准。(没有进行多次发货的订单,主订单的发货时间和子订单的发货时间都一样)
|
||||
*/
|
||||
public Date getConsignTime() {
|
||||
return consignTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单发货时间,当卖家对订单进行了多次发货,子订单的发货时间和主订单的发货时间可能不一样了,那么就需要以子订单的时间为准。(没有进行多次发货的订单,主订单的发货时间和子订单的发货时间都一样)
|
||||
*/
|
||||
public void setConsignTime(Date consignTime) {
|
||||
this.consignTime = consignTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单的运送方式(卖家对订单进行多次发货之后,一个主订单下的子订单的运送方式可能不同,用order.shipping_type来区分子订单的运送方式)
|
||||
*/
|
||||
public String getShippingType() {
|
||||
return shippingType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单的运送方式(卖家对订单进行多次发货之后,一个主订单下的子订单的运送方式可能不同,用order.shipping_type来区分子订单的运送方式)
|
||||
*/
|
||||
public void setShippingType(String shippingType) {
|
||||
this.shippingType = shippingType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单发货的快递公司名称
|
||||
*/
|
||||
public String getLogisticsCompany() {
|
||||
return logisticsCompany;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单发货的快递公司名称
|
||||
*/
|
||||
public void setLogisticsCompany(String logisticsCompany) {
|
||||
this.logisticsCompany = logisticsCompany;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单所在包裹的运单号
|
||||
*/
|
||||
public String getInvoiceNo() {
|
||||
return invoiceNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 子订单所在包裹的运单号
|
||||
*/
|
||||
public void setInvoiceNo(String invoiceNo) {
|
||||
this.invoiceNo = invoiceNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 捆绑的子订单号,表示该子订单要和捆绑的子订单一起发货,用于卖家子订单捆绑发货
|
||||
*/
|
||||
public String getBindOid() {
|
||||
return bindOid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 捆绑的子订单号,表示该子订单要和捆绑的子订单一起发货,用于卖家子订单捆绑发货
|
||||
*/
|
||||
public void setBindOid(String bindOid) {
|
||||
this.bindOid = bindOid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单状态(请关注此状态,如果为TRADE_CLOSED_BY_TAOBAO状态,则不要对此订单进行发货,切记啊!)。可选值:
|
||||
TRADE_NO_CREATE_PAY(没有创建支付宝交易)
|
||||
WAIT_BUYER_PAY(等待买家付款)
|
||||
WAIT_SELLER_SEND_GOODS(等待卖家发货,即:买家已付款)
|
||||
WAIT_BUYER_CONFIRM_GOODS(等待买家确认收货,即:卖家已发货)
|
||||
TRADE_BUYER_SIGNED(买家已签收,货到付款专用)
|
||||
TRADE_FINISHED(交易成功)
|
||||
TRADE_CLOSED(付款以后用户退款成功,交易自动关闭)
|
||||
TRADE_CLOSED_BY_TAOBAO(付款以前,卖家或买家主动关闭交易)
|
||||
PAY_PENDING(国际信用卡支付付款确认中)
|
||||
*/
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单状态(请关注此状态,如果为TRADE_CLOSED_BY_TAOBAO状态,则不要对此订单进行发货,切记啊!)。可选值:
|
||||
TRADE_NO_CREATE_PAY(没有创建支付宝交易)
|
||||
WAIT_BUYER_PAY(等待买家付款)
|
||||
WAIT_SELLER_SEND_GOODS(等待卖家发货,即:买家已付款)
|
||||
WAIT_BUYER_CONFIRM_GOODS(等待买家确认收货,即:卖家已发货)
|
||||
TRADE_BUYER_SIGNED(买家已签收,货到付款专用)
|
||||
TRADE_FINISHED(交易成功)
|
||||
TRADE_CLOSED(付款以后用户退款成功,交易自动关闭)
|
||||
TRADE_CLOSED_BY_TAOBAO(付款以前,卖家或买家主动关闭交易)
|
||||
PAY_PENDING(国际信用卡支付付款确认中)
|
||||
*/
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款状态。退款状态。可选值 WAIT_SELLER_AGREE(买家已经申请退款,等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款,等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货,等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功)
|
||||
*/
|
||||
public String getRefundStatus() {
|
||||
return refundStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款状态。退款状态。可选值 WAIT_SELLER_AGREE(买家已经申请退款,等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款,等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货,等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功)
|
||||
*/
|
||||
public void setRefundStatus(String refundStatus) {
|
||||
this.refundStatus = refundStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最近退款ID
|
||||
*/
|
||||
public String getRefundId() {
|
||||
return refundId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最近退款ID
|
||||
*/
|
||||
public void setRefundId(String refundId) {
|
||||
this.refundId = refundId;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
TaoOrderItem other = (TaoOrderItem) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getTid() == null ? other.getTid() == null : this.getTid().equals(other.getTid()))
|
||||
&& (this.getOid() == null ? other.getOid() == null : this.getOid().equals(other.getOid()))
|
||||
&& (this.getTotalFee() == null ? other.getTotalFee() == null : this.getTotalFee().equals(other.getTotalFee()))
|
||||
&& (this.getDiscountFee() == null ? other.getDiscountFee() == null : this.getDiscountFee().equals(other.getDiscountFee()))
|
||||
&& (this.getAdjustFee() == null ? other.getAdjustFee() == null : this.getAdjustFee().equals(other.getAdjustFee()))
|
||||
&& (this.getDivideOrderFee() == null ? other.getDivideOrderFee() == null : this.getDivideOrderFee().equals(other.getDivideOrderFee()))
|
||||
&& (this.getPartMjzDiscount() == null ? other.getPartMjzDiscount() == null : this.getPartMjzDiscount().equals(other.getPartMjzDiscount()))
|
||||
&& (this.getPayment() == null ? other.getPayment() == null : this.getPayment().equals(other.getPayment()))
|
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
|
||||
&& (this.getPicPath() == null ? other.getPicPath() == null : this.getPicPath().equals(other.getPicPath()))
|
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
|
||||
&& (this.getNumIid() == null ? other.getNumIid() == null : this.getNumIid().equals(other.getNumIid()))
|
||||
&& (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId()))
|
||||
&& (this.getOuterIid() == null ? other.getOuterIid() == null : this.getOuterIid().equals(other.getOuterIid()))
|
||||
&& (this.getOuterSkuId() == null ? other.getOuterSkuId() == null : this.getOuterSkuId().equals(other.getOuterSkuId()))
|
||||
&& (this.getSkuPropertiesName() == null ? other.getSkuPropertiesName() == null : this.getSkuPropertiesName().equals(other.getSkuPropertiesName()))
|
||||
&& (this.getItemMealId() == null ? other.getItemMealId() == null : this.getItemMealId().equals(other.getItemMealId()))
|
||||
&& (this.getItemMealName() == null ? other.getItemMealName() == null : this.getItemMealName().equals(other.getItemMealName()))
|
||||
&& (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum()))
|
||||
&& (this.getSnapshotUrl() == null ? other.getSnapshotUrl() == null : this.getSnapshotUrl().equals(other.getSnapshotUrl()))
|
||||
&& (this.getTimeoutActionTime() == null ? other.getTimeoutActionTime() == null : this.getTimeoutActionTime().equals(other.getTimeoutActionTime()))
|
||||
&& (this.getItemMemo() == null ? other.getItemMemo() == null : this.getItemMemo().equals(other.getItemMemo()))
|
||||
&& (this.getBuyerRate() == null ? other.getBuyerRate() == null : this.getBuyerRate().equals(other.getBuyerRate()))
|
||||
&& (this.getSellerRate() == null ? other.getSellerRate() == null : this.getSellerRate().equals(other.getSellerRate()))
|
||||
&& (this.getSellerType() == null ? other.getSellerType() == null : this.getSellerType().equals(other.getSellerType()))
|
||||
&& (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
|
||||
&& (this.getIsOversold() == null ? other.getIsOversold() == null : this.getIsOversold().equals(other.getIsOversold()))
|
||||
&& (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
|
||||
&& (this.getOrderFrom() == null ? other.getOrderFrom() == null : this.getOrderFrom().equals(other.getOrderFrom()))
|
||||
&& (this.getIsServiceOrder() == null ? other.getIsServiceOrder() == null : this.getIsServiceOrder().equals(other.getIsServiceOrder()))
|
||||
&& (this.getConsignTime() == null ? other.getConsignTime() == null : this.getConsignTime().equals(other.getConsignTime()))
|
||||
&& (this.getShippingType() == null ? other.getShippingType() == null : this.getShippingType().equals(other.getShippingType()))
|
||||
&& (this.getLogisticsCompany() == null ? other.getLogisticsCompany() == null : this.getLogisticsCompany().equals(other.getLogisticsCompany()))
|
||||
&& (this.getInvoiceNo() == null ? other.getInvoiceNo() == null : this.getInvoiceNo().equals(other.getInvoiceNo()))
|
||||
&& (this.getBindOid() == null ? other.getBindOid() == null : this.getBindOid().equals(other.getBindOid()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||
&& (this.getRefundStatus() == null ? other.getRefundStatus() == null : this.getRefundStatus().equals(other.getRefundStatus()))
|
||||
&& (this.getRefundId() == null ? other.getRefundId() == null : this.getRefundId().equals(other.getRefundId()))
|
||||
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getTid() == null) ? 0 : getTid().hashCode());
|
||||
result = prime * result + ((getOid() == null) ? 0 : getOid().hashCode());
|
||||
result = prime * result + ((getTotalFee() == null) ? 0 : getTotalFee().hashCode());
|
||||
result = prime * result + ((getDiscountFee() == null) ? 0 : getDiscountFee().hashCode());
|
||||
result = prime * result + ((getAdjustFee() == null) ? 0 : getAdjustFee().hashCode());
|
||||
result = prime * result + ((getDivideOrderFee() == null) ? 0 : getDivideOrderFee().hashCode());
|
||||
result = prime * result + ((getPartMjzDiscount() == null) ? 0 : getPartMjzDiscount().hashCode());
|
||||
result = prime * result + ((getPayment() == null) ? 0 : getPayment().hashCode());
|
||||
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
|
||||
result = prime * result + ((getPicPath() == null) ? 0 : getPicPath().hashCode());
|
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
|
||||
result = prime * result + ((getNumIid() == null) ? 0 : getNumIid().hashCode());
|
||||
result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode());
|
||||
result = prime * result + ((getOuterIid() == null) ? 0 : getOuterIid().hashCode());
|
||||
result = prime * result + ((getOuterSkuId() == null) ? 0 : getOuterSkuId().hashCode());
|
||||
result = prime * result + ((getSkuPropertiesName() == null) ? 0 : getSkuPropertiesName().hashCode());
|
||||
result = prime * result + ((getItemMealId() == null) ? 0 : getItemMealId().hashCode());
|
||||
result = prime * result + ((getItemMealName() == null) ? 0 : getItemMealName().hashCode());
|
||||
result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode());
|
||||
result = prime * result + ((getSnapshotUrl() == null) ? 0 : getSnapshotUrl().hashCode());
|
||||
result = prime * result + ((getTimeoutActionTime() == null) ? 0 : getTimeoutActionTime().hashCode());
|
||||
result = prime * result + ((getItemMemo() == null) ? 0 : getItemMemo().hashCode());
|
||||
result = prime * result + ((getBuyerRate() == null) ? 0 : getBuyerRate().hashCode());
|
||||
result = prime * result + ((getSellerRate() == null) ? 0 : getSellerRate().hashCode());
|
||||
result = prime * result + ((getSellerType() == null) ? 0 : getSellerType().hashCode());
|
||||
result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
|
||||
result = prime * result + ((getIsOversold() == null) ? 0 : getIsOversold().hashCode());
|
||||
result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
|
||||
result = prime * result + ((getOrderFrom() == null) ? 0 : getOrderFrom().hashCode());
|
||||
result = prime * result + ((getIsServiceOrder() == null) ? 0 : getIsServiceOrder().hashCode());
|
||||
result = prime * result + ((getConsignTime() == null) ? 0 : getConsignTime().hashCode());
|
||||
result = prime * result + ((getShippingType() == null) ? 0 : getShippingType().hashCode());
|
||||
result = prime * result + ((getLogisticsCompany() == null) ? 0 : getLogisticsCompany().hashCode());
|
||||
result = prime * result + ((getInvoiceNo() == null) ? 0 : getInvoiceNo().hashCode());
|
||||
result = prime * result + ((getBindOid() == null) ? 0 : getBindOid().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
result = prime * result + ((getRefundStatus() == null) ? 0 : getRefundStatus().hashCode());
|
||||
result = prime * result + ((getRefundId() == null) ? 0 : getRefundId().hashCode());
|
||||
result = prime * result + ((getRemark() == null) ? 0 : getRemark().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(", tid=").append(tid);
|
||||
sb.append(", oid=").append(oid);
|
||||
sb.append(", totalFee=").append(totalFee);
|
||||
sb.append(", discountFee=").append(discountFee);
|
||||
sb.append(", adjustFee=").append(adjustFee);
|
||||
sb.append(", divideOrderFee=").append(divideOrderFee);
|
||||
sb.append(", partMjzDiscount=").append(partMjzDiscount);
|
||||
sb.append(", payment=").append(payment);
|
||||
sb.append(", title=").append(title);
|
||||
sb.append(", picPath=").append(picPath);
|
||||
sb.append(", price=").append(price);
|
||||
sb.append(", numIid=").append(numIid);
|
||||
sb.append(", skuId=").append(skuId);
|
||||
sb.append(", outerIid=").append(outerIid);
|
||||
sb.append(", outerSkuId=").append(outerSkuId);
|
||||
sb.append(", skuPropertiesName=").append(skuPropertiesName);
|
||||
sb.append(", itemMealId=").append(itemMealId);
|
||||
sb.append(", itemMealName=").append(itemMealName);
|
||||
sb.append(", num=").append(num);
|
||||
sb.append(", snapshotUrl=").append(snapshotUrl);
|
||||
sb.append(", timeoutActionTime=").append(timeoutActionTime);
|
||||
sb.append(", itemMemo=").append(itemMemo);
|
||||
sb.append(", buyerRate=").append(buyerRate);
|
||||
sb.append(", sellerRate=").append(sellerRate);
|
||||
sb.append(", sellerType=").append(sellerType);
|
||||
sb.append(", cid=").append(cid);
|
||||
sb.append(", isOversold=").append(isOversold);
|
||||
sb.append(", endTime=").append(endTime);
|
||||
sb.append(", orderFrom=").append(orderFrom);
|
||||
sb.append(", isServiceOrder=").append(isServiceOrder);
|
||||
sb.append(", consignTime=").append(consignTime);
|
||||
sb.append(", shippingType=").append(shippingType);
|
||||
sb.append(", logisticsCompany=").append(logisticsCompany);
|
||||
sb.append(", invoiceNo=").append(invoiceNo);
|
||||
sb.append(", bindOid=").append(bindOid);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", refundStatus=").append(refundStatus);
|
||||
sb.append(", refundId=").append(refundId);
|
||||
sb.append(", remark=").append(remark);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.tao.mapper;
|
||||
|
||||
import com.qihang.tao.domain.SysPlatform;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【sys_platform】的数据库操作Mapper
|
||||
* @createDate 2024-02-29 18:52:46
|
||||
* @Entity com.qihang.tao.domain.SysPlatform
|
||||
*/
|
||||
public interface SysPlatformMapper extends BaseMapper<SysPlatform> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.tao.mapper;
|
||||
|
||||
import com.qihang.tao.domain.SysShop;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【sys_shop(数据中心-店铺)】的数据库操作Mapper
|
||||
* @createDate 2024-02-29 18:37:06
|
||||
* @Entity com.qihang.tao.domain.SysShop
|
||||
*/
|
||||
public interface SysShopMapper extends BaseMapper<SysShop> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.tao.mapper;
|
||||
|
||||
import com.qihang.tao.domain.TaoGoodsSku;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_goods_sku】的数据库操作Mapper
|
||||
* @createDate 2024-02-29 19:01:35
|
||||
* @Entity com.qihang.tao.domain.TaoGoodsSku
|
||||
*/
|
||||
public interface TaoGoodsSkuMapper extends BaseMapper<TaoGoodsSku> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.tao.mapper;
|
||||
|
||||
import com.qihang.tao.domain.TaoOrderItem;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_order_item(淘宝订单明细表)】的数据库操作Mapper
|
||||
* @createDate 2024-02-29 19:01:22
|
||||
* @Entity com.qihang.tao.domain.TaoOrderItem
|
||||
*/
|
||||
public interface TaoOrderItemMapper extends BaseMapper<TaoOrderItem> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.tao.mapper;
|
||||
|
||||
import com.qihang.tao.domain.TaoOrder;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_order(淘宝订单表)】的数据库操作Mapper
|
||||
* @createDate 2024-02-29 19:01:11
|
||||
* @Entity com.qihang.tao.domain.TaoOrder
|
||||
*/
|
||||
public interface TaoOrderMapper extends BaseMapper<TaoOrder> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.tao.mapper;
|
||||
|
||||
import com.qihang.tao.domain.TaoRefund;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_refund(淘宝退款订单表)】的数据库操作Mapper
|
||||
* @createDate 2024-02-29 19:01:45
|
||||
* @Entity com.qihang.tao.domain.TaoRefund
|
||||
*/
|
||||
public interface TaoRefundMapper extends BaseMapper<TaoRefund> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.tao.service;
|
||||
|
||||
import com.qihang.tao.domain.SysPlatform;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【sys_platform】的数据库操作Service
|
||||
* @createDate 2024-02-29 18:52:46
|
||||
*/
|
||||
public interface SysPlatformService extends IService<SysPlatform> {
|
||||
SysPlatform selectById(Integer id);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.qihang.tao.service;
|
||||
|
||||
import com.qihang.tao.domain.SysShop;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【sys_shop(数据中心-店铺)】的数据库操作Service
|
||||
* @createDate 2024-02-29 18:37:06
|
||||
*/
|
||||
public interface SysShopService extends IService<SysShop> {
|
||||
SysShop selectShopById(Integer shopId);
|
||||
|
||||
void updateSessionKey(Integer shopId,String sessionKey);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.tao.service;
|
||||
|
||||
import com.qihang.tao.domain.TaoGoodsSku;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_goods_sku】的数据库操作Service
|
||||
* @createDate 2024-02-29 19:01:35
|
||||
*/
|
||||
public interface TaoGoodsSkuService extends IService<TaoGoodsSku> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.tao.service;
|
||||
|
||||
import com.qihang.tao.domain.TaoOrderItem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_order_item(淘宝订单明细表)】的数据库操作Service
|
||||
* @createDate 2024-02-29 19:01:22
|
||||
*/
|
||||
public interface TaoOrderItemService extends IService<TaoOrderItem> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.tao.service;
|
||||
|
||||
import com.qihang.tao.domain.TaoOrder;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_order(淘宝订单表)】的数据库操作Service
|
||||
* @createDate 2024-02-29 19:01:11
|
||||
*/
|
||||
public interface TaoOrderService extends IService<TaoOrder> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.tao.service;
|
||||
|
||||
import com.qihang.tao.domain.TaoRefund;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_refund(淘宝退款订单表)】的数据库操作Service
|
||||
* @createDate 2024-02-29 19:01:45
|
||||
*/
|
||||
public interface TaoRefundService extends IService<TaoRefund> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.qihang.tao.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.tao.domain.SysPlatform;
|
||||
import com.qihang.tao.service.SysPlatformService;
|
||||
import com.qihang.tao.mapper.SysPlatformMapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【sys_platform】的数据库操作Service实现
|
||||
* @createDate 2024-02-29 18:52:46
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class SysPlatformServiceImpl extends ServiceImpl<SysPlatformMapper, SysPlatform>
|
||||
implements SysPlatformService{
|
||||
|
||||
private final SysPlatformMapper mapper;
|
||||
@Override
|
||||
public SysPlatform selectById(Integer id) {
|
||||
return mapper.selectById(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.qihang.tao.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.tao.domain.SysShop;
|
||||
import com.qihang.tao.service.SysShopService;
|
||||
import com.qihang.tao.mapper.SysShopMapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【sys_shop(数据中心-店铺)】的数据库操作Service实现
|
||||
* @createDate 2024-02-29 18:37:06
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class SysShopServiceImpl extends ServiceImpl<SysShopMapper, SysShop>
|
||||
implements SysShopService{
|
||||
|
||||
private SysShopMapper mapper;
|
||||
@Override
|
||||
public SysShop selectShopById(Integer shopId) {
|
||||
return mapper.selectById(shopId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSessionKey(Integer shopId, String sessionKey) {
|
||||
SysShop shop = new SysShop();
|
||||
shop.setId(shopId);
|
||||
shop.setAccessToken(sessionKey);
|
||||
mapper.updateById(shop);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.tao.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.tao.domain.TaoGoodsSku;
|
||||
import com.qihang.tao.service.TaoGoodsSkuService;
|
||||
import com.qihang.tao.mapper.TaoGoodsSkuMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_goods_sku】的数据库操作Service实现
|
||||
* @createDate 2024-02-29 19:01:35
|
||||
*/
|
||||
@Service
|
||||
public class TaoGoodsSkuServiceImpl extends ServiceImpl<TaoGoodsSkuMapper, TaoGoodsSku>
|
||||
implements TaoGoodsSkuService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.tao.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.tao.domain.TaoOrderItem;
|
||||
import com.qihang.tao.service.TaoOrderItemService;
|
||||
import com.qihang.tao.mapper.TaoOrderItemMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_order_item(淘宝订单明细表)】的数据库操作Service实现
|
||||
* @createDate 2024-02-29 19:01:22
|
||||
*/
|
||||
@Service
|
||||
public class TaoOrderItemServiceImpl extends ServiceImpl<TaoOrderItemMapper, TaoOrderItem>
|
||||
implements TaoOrderItemService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.tao.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.tao.domain.TaoOrder;
|
||||
import com.qihang.tao.service.TaoOrderService;
|
||||
import com.qihang.tao.mapper.TaoOrderMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_order(淘宝订单表)】的数据库操作Service实现
|
||||
* @createDate 2024-02-29 19:01:11
|
||||
*/
|
||||
@Service
|
||||
public class TaoOrderServiceImpl extends ServiceImpl<TaoOrderMapper, TaoOrder>
|
||||
implements TaoOrderService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.tao.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.tao.domain.TaoRefund;
|
||||
import com.qihang.tao.service.TaoRefundService;
|
||||
import com.qihang.tao.mapper.TaoRefundMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【tao_refund(淘宝退款订单表)】的数据库操作Service实现
|
||||
* @createDate 2024-02-29 19:01:45
|
||||
*/
|
||||
@Service
|
||||
public class TaoRefundServiceImpl extends ServiceImpl<TaoRefundMapper, TaoRefund>
|
||||
implements TaoRefundService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?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.tao.mapper.SysPlatformMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.tao.domain.SysPlatform">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="appKey" column="app_key" jdbcType="VARCHAR"/>
|
||||
<result property="appSecret" column="app_secret" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,name,code,
|
||||
app_key,app_secret
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?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.tao.mapper.SysShopMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.tao.domain.SysShop">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
<result property="url" column="url" jdbcType="VARCHAR"/>
|
||||
<result property="sort" column="sort" jdbcType="INTEGER"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
<result property="modifyOn" column="modify_on" jdbcType="BIGINT"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="sellerId" column="seller_id" jdbcType="BIGINT"/>
|
||||
<result property="appKey" column="app_key" jdbcType="VARCHAR"/>
|
||||
<result property="appSercet" column="app_sercet" jdbcType="VARCHAR"/>
|
||||
<result property="accessToken" column="access_token" jdbcType="VARCHAR"/>
|
||||
<result property="expiresIn" column="expires_in" jdbcType="BIGINT"/>
|
||||
<result property="accessTokenBegin" column="access_token_begin" jdbcType="BIGINT"/>
|
||||
<result property="refreshToken" column="refresh_token" jdbcType="VARCHAR"/>
|
||||
<result property="refreshTokenTimeout" column="refresh_token_timeout" jdbcType="BIGINT"/>
|
||||
<result property="apiRequestUrl" column="api_request_url" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,name,type,
|
||||
url,sort,status,
|
||||
modify_on,remark,seller_id,
|
||||
app_key,app_sercet,access_token,
|
||||
expires_in,access_token_begin,refresh_token,
|
||||
refresh_token_timeout,api_request_url
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?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.tao.mapper.TaoGoodsSkuMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.tao.domain.TaoGoodsSku">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="taoGoodsId" column="tao_goods_id" jdbcType="BIGINT"/>
|
||||
<result property="numIid" column="num_iid" jdbcType="BIGINT"/>
|
||||
<result property="iid" column="iid" jdbcType="VARCHAR"/>
|
||||
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
||||
<result property="properties" column="properties" jdbcType="VARCHAR"/>
|
||||
<result property="propertiesName" column="properties_name" jdbcType="VARCHAR"/>
|
||||
<result property="quantity" column="quantity" jdbcType="BIGINT"/>
|
||||
<result property="spec" column="spec" jdbcType="VARCHAR"/>
|
||||
<result property="price" column="price" jdbcType="DOUBLE"/>
|
||||
<result property="outerId" column="outer_id" jdbcType="VARCHAR"/>
|
||||
<result property="created" column="created" jdbcType="TIMESTAMP"/>
|
||||
<result property="modified" column="modified" jdbcType="TIMESTAMP"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="skuSpecId" column="sku_spec_id" jdbcType="VARCHAR"/>
|
||||
<result property="barcode" column="barcode" jdbcType="VARCHAR"/>
|
||||
<result property="erpGoodsSkuId" column="erp_goods_sku_id" jdbcType="INTEGER"/>
|
||||
<result property="erpGoodsId" column="erp_goods_id" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,tao_goods_id,num_iid,
|
||||
iid,sku_id,properties,
|
||||
properties_name,quantity,spec,
|
||||
price,outer_id,created,
|
||||
modified,status,sku_spec_id,
|
||||
barcode,erp_goods_sku_id,erp_goods_id,
|
||||
create_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?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.tao.mapper.TaoOrderItemMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.tao.domain.TaoOrderItem">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="tid" column="tid" jdbcType="BIGINT"/>
|
||||
<result property="oid" column="oid" jdbcType="BIGINT"/>
|
||||
<result property="totalFee" column="total_fee" jdbcType="DECIMAL"/>
|
||||
<result property="discountFee" column="discount_fee" jdbcType="DECIMAL"/>
|
||||
<result property="adjustFee" column="adjust_fee" jdbcType="DECIMAL"/>
|
||||
<result property="divideOrderFee" column="divide_order_fee" jdbcType="FLOAT"/>
|
||||
<result property="partMjzDiscount" column="part_mjz_discount" jdbcType="FLOAT"/>
|
||||
<result property="payment" column="payment" jdbcType="FLOAT"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="picPath" column="pic_path" jdbcType="VARCHAR"/>
|
||||
<result property="price" column="price" jdbcType="DECIMAL"/>
|
||||
<result property="numIid" column="num_iid" jdbcType="BIGINT"/>
|
||||
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
||||
<result property="outerIid" column="outer_iid" jdbcType="VARCHAR"/>
|
||||
<result property="outerSkuId" column="outer_sku_id" jdbcType="VARCHAR"/>
|
||||
<result property="skuPropertiesName" column="sku_properties_name" jdbcType="VARCHAR"/>
|
||||
<result property="itemMealId" column="item_meal_id" jdbcType="VARCHAR"/>
|
||||
<result property="itemMealName" column="item_meal_name" jdbcType="VARCHAR"/>
|
||||
<result property="num" column="num" jdbcType="INTEGER"/>
|
||||
<result property="snapshotUrl" column="snapshot_url" jdbcType="VARCHAR"/>
|
||||
<result property="timeoutActionTime" column="timeout_action_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="itemMemo" column="item_memo" jdbcType="VARCHAR"/>
|
||||
<result property="buyerRate" column="buyer_rate" jdbcType="VARCHAR"/>
|
||||
<result property="sellerRate" column="seller_rate" jdbcType="VARCHAR"/>
|
||||
<result property="sellerType" column="seller_type" jdbcType="VARCHAR"/>
|
||||
<result property="cid" column="cid" jdbcType="BIGINT"/>
|
||||
<result property="isOversold" column="is_oversold" jdbcType="VARCHAR"/>
|
||||
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="orderFrom" column="order_from" jdbcType="VARCHAR"/>
|
||||
<result property="isServiceOrder" column="is_service_order" jdbcType="VARCHAR"/>
|
||||
<result property="consignTime" column="consign_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="shippingType" column="shipping_type" jdbcType="VARCHAR"/>
|
||||
<result property="logisticsCompany" column="logistics_company" jdbcType="VARCHAR"/>
|
||||
<result property="invoiceNo" column="invoice_no" jdbcType="VARCHAR"/>
|
||||
<result property="bindOid" column="bind_oid" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="refundStatus" column="refund_status" jdbcType="VARCHAR"/>
|
||||
<result property="refundId" column="refund_id" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,tid,oid,
|
||||
total_fee,discount_fee,adjust_fee,
|
||||
divide_order_fee,part_mjz_discount,payment,
|
||||
title,pic_path,price,
|
||||
num_iid,sku_id,outer_iid,
|
||||
outer_sku_id,sku_properties_name,item_meal_id,
|
||||
item_meal_name,num,snapshot_url,
|
||||
timeout_action_time,item_memo,buyer_rate,
|
||||
seller_rate,seller_type,cid,
|
||||
is_oversold,end_time,order_from,
|
||||
is_service_order,consign_time,shipping_type,
|
||||
logistics_company,invoice_no,bind_oid,
|
||||
status,refund_status,refund_id,
|
||||
remark
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<?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.tao.mapper.TaoOrderMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.tao.domain.TaoOrder">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="tid" column="tid" jdbcType="BIGINT"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||
<result property="sellerFlag" column="seller_flag" jdbcType="VARCHAR"/>
|
||||
<result property="hasBuyerMessage" column="has_buyer_message" jdbcType="VARCHAR"/>
|
||||
<result property="creditCardFee" column="credit_card_fee" jdbcType="VARCHAR"/>
|
||||
<result property="stepTradeStatus" column="step_trade_status" jdbcType="VARCHAR"/>
|
||||
<result property="stepPaidFee" column="step_paid_fee" jdbcType="VARCHAR"/>
|
||||
<result property="buyerOpenUid" column="buyer_open_uid" jdbcType="VARCHAR"/>
|
||||
<result property="markDesc" column="mark_desc" jdbcType="VARCHAR"/>
|
||||
<result property="buyerNick" column="buyer_nick" jdbcType="VARCHAR"/>
|
||||
<result property="numIid" column="num_iid" jdbcType="VARCHAR"/>
|
||||
<result property="num" column="num" jdbcType="INTEGER"/>
|
||||
<result property="price" column="price" jdbcType="FLOAT"/>
|
||||
<result property="totalFee" column="total_fee" jdbcType="FLOAT"/>
|
||||
<result property="adjustFee" column="adjust_fee" jdbcType="FLOAT"/>
|
||||
<result property="postFee" column="post_fee" jdbcType="DECIMAL"/>
|
||||
<result property="discountFee" column="discount_fee" jdbcType="DECIMAL"/>
|
||||
<result property="payment" column="payment" jdbcType="DECIMAL"/>
|
||||
<result property="receivedPayment" column="received_payment" jdbcType="DECIMAL"/>
|
||||
<result property="availableConfirmFee" column="available_confirm_fee" jdbcType="FLOAT"/>
|
||||
<result property="codFee" column="cod_fee" jdbcType="FLOAT"/>
|
||||
<result property="codStatus" column="cod_status" jdbcType="VARCHAR"/>
|
||||
<result property="buyerCodFee" column="buyer_cod_fee" jdbcType="VARCHAR"/>
|
||||
<result property="sellerCodFee" column="seller_cod_fee" jdbcType="VARCHAR"/>
|
||||
<result property="expressAgencyFee" column="express_agency_fee" jdbcType="VARCHAR"/>
|
||||
<result property="commissionFee" column="commission_fee" jdbcType="FLOAT"/>
|
||||
<result property="shippingType" column="shipping_type" jdbcType="VARCHAR"/>
|
||||
<result property="created" column="created" jdbcType="TIMESTAMP"/>
|
||||
<result property="modified" column="modified" jdbcType="TIMESTAMP"/>
|
||||
<result property="payTime" column="pay_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="consignTime" column="consign_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sellerMemo" column="seller_memo" jdbcType="VARCHAR"/>
|
||||
<result property="buyerMemo" column="buyer_memo" jdbcType="VARCHAR"/>
|
||||
<result property="buyerMessage" column="buyer_message" jdbcType="VARCHAR"/>
|
||||
<result property="pointFee" column="point_fee" jdbcType="VARCHAR"/>
|
||||
<result property="realPointFee" column="real_point_fee" jdbcType="VARCHAR"/>
|
||||
<result property="buyerObtainPointFee" column="buyer_obtain_point_fee" jdbcType="VARCHAR"/>
|
||||
<result property="receivingtime" column="receiving_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="tradeMemo" column="trade_memo" jdbcType="VARCHAR"/>
|
||||
<result property="erpSendCompany" column="erp_send_company" jdbcType="VARCHAR"/>
|
||||
<result property="erpSendCode" column="erp_send_code" jdbcType="VARCHAR"/>
|
||||
<result property="erpSendStatus" column="erp_send_status" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
<result property="oaid" column="oaid" jdbcType="VARCHAR"/>
|
||||
<result property="aid" column="aid" jdbcType="VARCHAR"/>
|
||||
<result property="receiverCountry" column="receiver_country" jdbcType="VARCHAR"/>
|
||||
<result property="receiverState" column="receiver_state" jdbcType="VARCHAR"/>
|
||||
<result property="receiverCity" column="receiver_city" jdbcType="VARCHAR"/>
|
||||
<result property="receiverDistrict" column="receiver_district" jdbcType="VARCHAR"/>
|
||||
<result property="receiverTown" column="receiver_town" jdbcType="VARCHAR"/>
|
||||
<result property="receiverAddress" column="receiver_address" jdbcType="VARCHAR"/>
|
||||
<result property="receiverZip" column="receiver_zip" jdbcType="VARCHAR"/>
|
||||
<result property="receiverName" column="receiver_name" jdbcType="VARCHAR"/>
|
||||
<result property="receiverMobile" column="receiver_mobile" jdbcType="VARCHAR"/>
|
||||
<result property="receiverPhone" column="receiver_phone" jdbcType="VARCHAR"/>
|
||||
<result property="sellerRate" column="seller_rate" jdbcType="VARCHAR"/>
|
||||
<result property="sellerNick" column="seller_nick" jdbcType="VARCHAR"/>
|
||||
<result property="buyerRate" column="buyer_rate" jdbcType="VARCHAR"/>
|
||||
<result property="buyerArea" column="buyer_area" jdbcType="VARCHAR"/>
|
||||
<result property="alipayNo" column="alipay_no" jdbcType="VARCHAR"/>
|
||||
<result property="buyerAlipayNo" column="buyer_alipay_no" jdbcType="VARCHAR"/>
|
||||
<result property="buyerEmail" column="buyer_email" jdbcType="VARCHAR"/>
|
||||
<result property="sellerAlipayNo" column="seller_alipay_no" jdbcType="VARCHAR"/>
|
||||
<result property="hasPostFee" column="has_post_fee" jdbcType="VARCHAR"/>
|
||||
<result property="timeoutActionTime" column="timeout_action_time" jdbcType="VARCHAR"/>
|
||||
<result property="snapshotUrl" column="snapshot_url" jdbcType="VARCHAR"/>
|
||||
<result property="promotion" column="promotion" jdbcType="VARCHAR"/>
|
||||
<result property="yfxFee" column="yfx_fee" jdbcType="FLOAT"/>
|
||||
<result property="sendTime" column="send_time" jdbcType="VARCHAR"/>
|
||||
<result property="isPartConsign" column="is_part_consign" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,shop_id,tid,
|
||||
title,type,seller_flag,
|
||||
has_buyer_message,credit_card_fee,step_trade_status,
|
||||
step_paid_fee,buyer_open_uid,mark_desc,
|
||||
buyer_nick,num_iid,num,
|
||||
price,total_fee,adjust_fee,
|
||||
post_fee,discount_fee,payment,
|
||||
received_payment,available_confirm_fee,cod_fee,
|
||||
cod_status,buyer_cod_fee,seller_cod_fee,
|
||||
express_agency_fee,commission_fee,shipping_type,
|
||||
created,modified,pay_time,
|
||||
consign_time,end_time,seller_memo,
|
||||
buyer_memo,buyer_message,point_fee,
|
||||
real_point_fee,buyer_obtain_point_fee,receiving_time,
|
||||
status,trade_memo,erp_send_company,
|
||||
erp_send_code,erp_send_status,create_time,
|
||||
update_time,update_by,oaid,
|
||||
aid,receiver_country,receiver_state,
|
||||
receiver_city,receiver_district,receiver_town,
|
||||
receiver_address,receiver_zip,receiver_name,
|
||||
receiver_mobile,receiver_phone,seller_rate,
|
||||
seller_nick,buyer_rate,buyer_area,
|
||||
alipay_no,buyer_alipay_no,buyer_email,
|
||||
seller_alipay_no,has_post_fee,timeout_action_time,
|
||||
snapshot_url,promotion,yfx_fee,
|
||||
send_time,is_part_consign
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<?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.tao.mapper.TaoRefundMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.tao.domain.TaoRefund">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="refundId" column="refund_id" jdbcType="VARCHAR"/>
|
||||
<result property="disputeType" column="dispute_type" jdbcType="VARCHAR"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="tid" column="tid" jdbcType="BIGINT"/>
|
||||
<result property="oid" column="oid" jdbcType="BIGINT"/>
|
||||
<result property="payment" column="payment" jdbcType="FLOAT"/>
|
||||
<result property="price" column="price" jdbcType="FLOAT"/>
|
||||
<result property="totalFee" column="total_fee" jdbcType="FLOAT"/>
|
||||
<result property="refundFee" column="refund_fee" jdbcType="FLOAT"/>
|
||||
<result property="splitSellerFee" column="split_seller_fee" jdbcType="FLOAT"/>
|
||||
<result property="splitTaobaoFee" column="split_taobao_fee" jdbcType="FLOAT"/>
|
||||
<result property="created" column="created" jdbcType="TIMESTAMP"/>
|
||||
<result property="modified" column="modified" jdbcType="TIMESTAMP"/>
|
||||
<result property="sellerNick" column="seller_nick" jdbcType="VARCHAR"/>
|
||||
<result property="csStatus" column="cs_status" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="orderStatus" column="order_status" jdbcType="VARCHAR"/>
|
||||
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||
<result property="advanceStatus" column="advance_status" jdbcType="VARCHAR"/>
|
||||
<result property="alipayNo" column="alipay_no" jdbcType="VARCHAR"/>
|
||||
<result property="goodReturnTime" column="good_return_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="goodStatus" column="good_status" jdbcType="VARCHAR"/>
|
||||
<result property="hasGoodReturn" column="has_good_return" jdbcType="INTEGER"/>
|
||||
<result property="numIid" column="num_iid" jdbcType="BIGINT"/>
|
||||
<result property="num" column="num" jdbcType="BIGINT"/>
|
||||
<result property="outerId" column="outer_id" jdbcType="VARCHAR"/>
|
||||
<result property="reason" column="reason" jdbcType="VARCHAR"/>
|
||||
<result property="refundPhase" column="refund_phase" jdbcType="VARCHAR"/>
|
||||
<result property="shippingType" column="shipping_type" jdbcType="VARCHAR"/>
|
||||
<result property="desc" column="desc" jdbcType="VARCHAR"/>
|
||||
<result property="companyName" column="company_name" jdbcType="VARCHAR"/>
|
||||
<result property="sid" column="sid" jdbcType="VARCHAR"/>
|
||||
<result property="sendTime" column="send_time" jdbcType="VARCHAR"/>
|
||||
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="sku" column="sku" jdbcType="VARCHAR"/>
|
||||
<result property="buyerOpenUid" column="buyer_open_uid" jdbcType="VARCHAR"/>
|
||||
<result property="buyerNick" column="buyer_nick" jdbcType="VARCHAR"/>
|
||||
<result property="combineItemInfo" column="combine_item_info" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,refund_id,dispute_type,
|
||||
shop_id,tid,oid,
|
||||
payment,price,total_fee,
|
||||
refund_fee,split_seller_fee,split_taobao_fee,
|
||||
created,modified,seller_nick,
|
||||
cs_status,status,order_status,
|
||||
address,advance_status,alipay_no,
|
||||
good_return_time,good_status,has_good_return,
|
||||
num_iid,num,outer_id,
|
||||
reason,refund_phase,shipping_type,
|
||||
desc,company_name,sid,
|
||||
send_time,end_time,title,
|
||||
sku,buyer_open_uid,buyer_nick,
|
||||
combine_item_info,create_time,create_by,
|
||||
update_by,update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue