diff --git a/core/common/src/main/java/com/qihang/common/enums/HttpStatus.java b/core/common/src/main/java/com/qihang/common/enums/HttpStatus.java index 79686e4c..a96f7e33 100644 --- a/core/common/src/main/java/com/qihang/common/enums/HttpStatus.java +++ b/core/common/src/main/java/com/qihang/common/enums/HttpStatus.java @@ -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; + } diff --git a/doc/sql/qihang-oms.sql b/doc/sql/qihang-oms.sql index c23bfc02..6c85d1a8 100644 --- a/doc/sql/qihang-oms.sql +++ b/doc/sql/qihang-oms.sql @@ -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发货快递公司', diff --git a/tao-api/libs/taobao-sdk-0.20200820.jar b/tao-api/libs/taobao-sdk-0.20200820.jar new file mode 100644 index 00000000..169e77eb Binary files /dev/null and b/tao-api/libs/taobao-sdk-0.20200820.jar differ diff --git a/tao-api/pom.xml b/tao-api/pom.xml index ad08c1ad..74c6e68a 100644 --- a/tao-api/pom.xml +++ b/tao-api/pom.xml @@ -140,6 +140,13 @@ 1.18.30 provided + + taobao + taobao-sdk + 0.20200820 + system + ${project.basedir}/libs/taobao-sdk-0.20200820.jar + diff --git a/tao-api/src/main/java/com/qihang/tao/common/ApiResult.java b/tao-api/src/main/java/com/qihang/tao/common/ApiResult.java index 4f7c5853..2d820e1a 100644 --- a/tao-api/src/main/java/com/qihang/tao/common/ApiResult.java +++ b/tao-api/src/main/java/com/qihang/tao/common/ApiResult.java @@ -12,4 +12,18 @@ public class ApiResult { private int code; private String msg; + public static ApiResult build(int code ,String msg){ + ApiResult result = new ApiResult<>(); + result.setCode(code); + result.setMsg(msg); + return result; + } + + public static ApiResult build(int code ,String msg,T data){ + ApiResult result = new ApiResult<>(); + result.setCode(code); + result.setMsg(msg); + result.setData(data); + return result; + } } diff --git a/tao-api/src/main/java/com/qihang/tao/common/EnumShopType.java b/tao-api/src/main/java/com/qihang/tao/common/EnumShopType.java new file mode 100644 index 00000000..6a12be44 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/common/EnumShopType.java @@ -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; + } +} diff --git a/tao-api/src/main/java/com/qihang/tao/common/ServerConfig.java b/tao-api/src/main/java/com/qihang/tao/common/ServerConfig.java new file mode 100644 index 00000000..24f590a4 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/common/ServerConfig.java @@ -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(); + } +} diff --git a/tao-api/src/main/java/com/qihang/tao/common/TaoRequest.java b/tao-api/src/main/java/com/qihang/tao/common/TaoRequest.java new file mode 100644 index 00000000..49d9c5c8 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/common/TaoRequest.java @@ -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; + } +} diff --git a/tao-api/src/main/java/com/qihang/tao/controller/GoodsApiController.java b/tao-api/src/main/java/com/qihang/tao/controller/GoodsApiController.java index c5a617ce..b368c6a2 100644 --- a/tao-api/src/main/java/com/qihang/tao/controller/GoodsApiController.java +++ b/tao-api/src/main/java/com/qihang/tao/controller/GoodsApiController.java @@ -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 getOrderList(@RequestBody DataRow reqData, HttpServletRequest request) throws Exception { +// public ApiResult getOrderList(@RequestBody DataRow reqData) throws Exception { // String startDate = reqData.getString("startTime"); // String endDate = reqData.getString("endTime"); // Integer shopId=reqData.getInt("shopId"); diff --git a/tao-api/src/main/java/com/qihang/tao/controller/OAuthTaoCallbackController.java b/tao-api/src/main/java/com/qihang/tao/controller/OAuthTaoCallbackController.java new file mode 100644 index 00000000..4187cbd6 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/controller/OAuthTaoCallbackController.java @@ -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"; + } + } + + +} diff --git a/tao-api/src/main/java/com/qihang/tao/controller/ShopApiParams.java b/tao-api/src/main/java/com/qihang/tao/controller/ShopApiParams.java new file mode 100644 index 00000000..eccc6669 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/controller/ShopApiParams.java @@ -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; + } +} diff --git a/tao-api/src/main/java/com/qihang/tao/controller/TaoBaoOpenOrderUpdHelper.java b/tao-api/src/main/java/com/qihang/tao/controller/TaoBaoOpenOrderUpdHelper.java new file mode 100644 index 00000000..625d445f --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/controller/TaoBaoOpenOrderUpdHelper.java @@ -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 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 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 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 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 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 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 updTmallRefunOrder(Long pageNo, Long pageSize, String url, String appKey, String appSecret, String sessionKey) throws ApiException { + TaobaoClient client = new DefaultTaobaoClient(url, appKey, appSecret); + List 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); + } +} diff --git a/tao-api/src/main/java/com/qihang/tao/controller/TaoBaoOpenOrderUpdResult.java b/tao-api/src/main/java/com/qihang/tao/controller/TaoBaoOpenOrderUpdResult.java new file mode 100644 index 00000000..29a055bf --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/controller/TaoBaoOpenOrderUpdResult.java @@ -0,0 +1,65 @@ +package com.qihang.tao.controller; +import java.util.List; + +/** + * 淘宝开放平台订单更新结果 + */ +public class TaoBaoOpenOrderUpdResult { + private Integer code;//代码 0成功其他错误 + private String msg;//错误信息 + private Integer totalRecords;//总记录数 + private List list;//订单 + + public TaoBaoOpenOrderUpdResult(Integer code, String msg, Integer totalRecords, List 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 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 getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } +} diff --git a/tao-api/src/main/java/com/qihang/tao/controller/TaoOrderPullController.java b/tao-api/src/main/java/com/qihang/tao/controller/TaoOrderPullController.java new file mode 100644 index 00000000..3e94c46e --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/controller/TaoOrderPullController.java @@ -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 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 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 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 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 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 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 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 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 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 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); + } + + +} diff --git a/tao-api/src/main/java/com/qihang/tao/domain/SysPlatform.java b/tao-api/src/main/java/com/qihang/tao/domain/SysPlatform.java new file mode 100644 index 00000000..b578be96 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/domain/SysPlatform.java @@ -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(); + } +} \ No newline at end of file diff --git a/tao-api/src/main/java/com/qihang/tao/domain/SysShop.java b/tao-api/src/main/java/com/qihang/tao/domain/SysShop.java new file mode 100644 index 00000000..ebe33054 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/domain/SysShop.java @@ -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(); + } +} \ No newline at end of file diff --git a/tao-api/src/main/java/com/qihang/tao/domain/TaoGoodsSku.java b/tao-api/src/main/java/com/qihang/tao/domain/TaoGoodsSku.java new file mode 100644 index 00000000..fb82fbbd --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/domain/TaoGoodsSku.java @@ -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(); + } +} \ No newline at end of file diff --git a/tao-api/src/main/java/com/qihang/tao/domain/TaoOrder.java b/tao-api/src/main/java/com/qihang/tao/domain/TaoOrder.java new file mode 100644 index 00000000..aa4b9f3e --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/domain/TaoOrder.java @@ -0,0 +1,1739 @@ +package com.qihang.tao.domain; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 淘宝订单表 + * @TableName tao_order + */ +public class TaoOrder implements Serializable { + /** + * 主键id + */ + private Long id; + + /** + * 店铺id + */ + private Integer shopId; + + /** + * 交易编号 (父订单的交易编号) + */ + private Long tid; + + /** + * 交易标题,以店铺名作为此标题的值。 + */ + private String title; + + /** + * 交易类型列表,同时查询多种交易类型可用逗号分隔。 + */ + private String type; + + /** + * 卖家备注旗帜(与淘宝网上订单的卖家备注旗帜对应,只有卖家才能查看该字段)红、黄、绿、蓝、紫 分别对应 1、2、3、4、5 + */ + private String sellerFlag; + + /** + * 判断订单是否有买家留言,有买家留言返回true,否则返回false + */ + private String hasBuyerMessage; + + /** + * 使用信用卡支付金额数 + */ + private String creditCardFee; + + /** + * 分阶段付款的订单状态(例如万人团订单等),目前有三返回状态FRONT_NOPAID_FINAL_NOPAID(定金未付尾款未付),FRONT_PAID_FINAL_NOPAID(定金已付尾款未付),FRONT_PAID_FINAL_PAID(定金和尾款都付) + */ + private String stepTradeStatus; + + /** + * 分阶段付款的已付金额(万人团订单已付金额) + */ + private String stepPaidFee; + + /** + * 买家OpenUid + */ + private String buyerOpenUid; + + /** + * 订单出现异常问题的时候,给予用户的描述,没有异常的时候,此值为空 + */ + private String markDesc; + + /** + * 买家昵称 + */ + private String buyerNick; + + /** + * 商品数字编号 + */ + private String numIid; + + /** + * 商品购买数量。取值范围:大于零的整数,对于一个trade对应多个order的时候(一笔主订单,对应多笔子订单),num=0,num是一个跟商品关联的属性,一笔订单对应多比子订单的时候,主订单上的num无意义。 + */ + private Integer num; + + /** + * 商品价格。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + private Double price; + + /** + * 商品金额(商品价格乘以数量的总金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + private Double totalFee; + + /** + * 卖家手工调整金额,精确到2位小数,单位:元。如:200.07 + */ + private Double adjustFee; + + /** + * 邮费 + */ + private BigDecimal postFee; + + /** + * 优惠金额 + */ + private BigDecimal discountFee; + + /** + * 实付金额 + */ + private BigDecimal payment; + + /** + * 卖家实际收到的支付宝打款金额(由于子订单可以部分确认收货,这个金额会随着子订单的确认收货而不断增加,交易成功后等于买家实付款减去退款金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + private BigDecimal receivedPayment; + + /** + * 交易中剩余的确认收货金额(这个金额会随着子订单确认收货而不断减少,交易成功后会变为零)。精确到2位小数;单位:元。如:200.07,表示:200 元7分 + */ + private Double availableConfirmFee; + + /** + * 货到付款服务费。 + */ + private Double codFee; + + /** + * 货到付款物流状态。初始状态 NEW_CREATED,接单成功 ACCEPTED_BY_COMPANY,接单失败 REJECTED_BY_COMPANY,接单超时 RECIEVE_TIMEOUT,揽收成功 TAKEN_IN_SUCCESS,揽收失败 TAKEN_IN_FAILED,揽收超时 TAKEN_TIMEOUT,签收成功 SIGN_IN,签收失败 REJECTED_BY_OTHER_SIDE,订单等待发送给物流公司 WAITING_TO_BE_SENT,用户取消物流订单 CANCELED + */ + private String codStatus; + + /** + * 买家货到付款服务费 + */ + private String buyerCodFee; + + /** + * 卖家货到付款服务费 + */ + private String sellerCodFee; + + /** + * 快递代收款。 + */ + private String expressAgencyFee; + + /** + * 交易佣金。 + */ + private Double commissionFee; + + /** + * 创建交易时的物流方式(交易完成前,物流方式有可能改变,但系统里的这个字段一直不变)。可选值:free(卖家包邮),post(平邮),express(快递),ems(EMS),virtual(虚拟发货),25(次日必达),26(预约配送)。 + */ + private String shippingType; + + /** + * 交易创建时间。格式:yyyy-MM-dd HH:mm:ss + */ + private Date created; + + /** + * 交易修改时间(用户对订单的任何修改都会更新此字段)。格式:yyyy-MM-dd HH:mm:ss + */ + private Date modified; + + /** + * 付款时间。格式:yyyy-MM-dd HH:mm:ss。订单的付款时间即为物流订单的创建时间。 + */ + private Date payTime; + + /** + * 卖家发货时间。格式:yyyy-MM-dd HH:mm:ss + */ + private Date consignTime; + + /** + * 交易结束时间。交易成功时间(更新交易状态为成功的同时更新)/确认收货时间或者交易关闭时间 。格式:yyyy-MM-dd HH:mm:ss + */ + private Date endTime; + + /** + * 卖家备忘信息 + */ + private String sellerMemo; + + /** + * 买家备注 + */ + private String buyerMemo; + + /** + * 买家留言 + */ + private String buyerMessage; + + /** + * 买家使用积分,下单时生成,且一直不变。格式:100;单位:个. + */ + private String pointFee; + + /** + * 买家实际使用积分(扣除部分退款使用的积分),交易完成后生成(交易成功或关闭),交易未完成时该字段值为0。格式:100;单位:个 + */ + private String realPointFee; + + /** + * 买家获得积分,返点的积分。格式:100;单位:个。返点的积分要交易成功之后才能获得。 + */ + private String buyerObtainPointFee; + + /** + * 收货时间,这里返回的是完全收货时间 + */ + private Date receivingtime; + + /** + * 交易状态。可选值: * 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(拼团中订单或者发货强管控的订单,已付款但禁止发货) + */ + private String status; + + /** + * 交易备注。 + */ + private String tradeMemo; + + /** + * erp发货快递公司 + */ + private String erpSendCompany; + + /** + * erp发货快递单号 + */ + private String erpSendCode; + + /** + * erp发货状态 + */ + private Integer erpSendStatus; + + /** + * 数据库创建时间 + */ + private Date createTime; + + /** + * 数据库更新时间 + */ + private Date updateTime; + + /** + * 数据库更新人 + */ + private String updateBy; + + /** + * (收货人+手机号+座机+收货地址+create)5个字段组合成oaid,原始订单上座机为空也满足条件,否则生成不了oaid + */ + private String oaid; + + /** + * 地址aid字段 + */ + private String aid; + + /** + * 收货人国籍 + */ + private String receiverCountry; + + /** + * 收货人的所在省份 + */ + private String receiverState; + + /** + * 收货人的所在城市 + */ + private String receiverCity; + + /** + * 收货人的所在地区 + */ + private String receiverDistrict; + + /** + * 收货人街道地址 + */ + private String receiverTown; + + /** + * 收货人的详细地址 + */ + private String receiverAddress; + + /** + * 收货人的邮编 + */ + private String receiverZip; + + /** + * 收货人的姓名 + */ + private String receiverName; + + /** + * 收货人的手机号码 + */ + private String receiverMobile; + + /** + * 收货人的电话号码 + */ + private String receiverPhone; + + /** + * 卖家是否已评价。可选值:true(已评价),false(未评价) + */ + private String sellerRate; + + /** + * 卖家昵称 + */ + private String sellerNick; + + /** + * 买家是否已评价。可选值:true(已评价),false(未评价)。如买家只评价未打分,此字段仍返回false + */ + private String buyerRate; + + /** + * 买家下单的地区 + */ + private String buyerArea; + + /** + * 支付宝交易号,如:2009112081173831 + */ + private String alipayNo; + + /** + * 买家支付宝账号 + */ + private String buyerAlipayNo; + + /** + * 买家邮件地址 + */ + private String buyerEmail; + + /** + * 卖家支付宝账号 + */ + private String sellerAlipayNo; + + /** + * 是否包含邮费。与available_confirm_fee同时使用。可选值:true(包含),false(不包含) + */ + private String hasPostFee; + + /** + * 超时到期时间。格式:yyyy-MM-dd HH:mm:ss。业务规则:前提条件:只有在买家已付款,卖家已发货的情况下才有效如果申请了退款,那么超时会落在子订单上;比如说3笔ABC,A申请了,那么返回的是BC的列表, 主定单不存在如果没有申请过退款,那么超时会挂在主定单上;比如ABC,返回主定单,ABC的超时和主定单相同 + */ + private String timeoutActionTime; + + /** + * 交易快照地址 + */ + private String snapshotUrl; + + /** + * 交易促销详细信息 + */ + private String promotion; + + /** + * 订单的运费险,单位为元 + */ + private Double yfxFee; + + /** + * 订单将在此时间前发出,主要用于预售订单 + */ + private String sendTime; + + /** + * 是否是多次发货的订单如果卖家对订单进行多次发货,则为true否则为false + */ + private String isPartConsign; + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + public Long getId() { + return id; + } + + /** + * 主键id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * 店铺id + */ + public Integer getShopId() { + return shopId; + } + + /** + * 店铺id + */ + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + /** + * 交易编号 (父订单的交易编号) + */ + public Long getTid() { + return tid; + } + + /** + * 交易编号 (父订单的交易编号) + */ + public void setTid(Long tid) { + this.tid = tid; + } + + /** + * 交易标题,以店铺名作为此标题的值。 + */ + public String getTitle() { + return title; + } + + /** + * 交易标题,以店铺名作为此标题的值。 + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * 交易类型列表,同时查询多种交易类型可用逗号分隔。 + */ + public String getType() { + return type; + } + + /** + * 交易类型列表,同时查询多种交易类型可用逗号分隔。 + */ + public void setType(String type) { + this.type = type; + } + + /** + * 卖家备注旗帜(与淘宝网上订单的卖家备注旗帜对应,只有卖家才能查看该字段)红、黄、绿、蓝、紫 分别对应 1、2、3、4、5 + */ + public String getSellerFlag() { + return sellerFlag; + } + + /** + * 卖家备注旗帜(与淘宝网上订单的卖家备注旗帜对应,只有卖家才能查看该字段)红、黄、绿、蓝、紫 分别对应 1、2、3、4、5 + */ + public void setSellerFlag(String sellerFlag) { + this.sellerFlag = sellerFlag; + } + + /** + * 判断订单是否有买家留言,有买家留言返回true,否则返回false + */ + public String getHasBuyerMessage() { + return hasBuyerMessage; + } + + /** + * 判断订单是否有买家留言,有买家留言返回true,否则返回false + */ + public void setHasBuyerMessage(String hasBuyerMessage) { + this.hasBuyerMessage = hasBuyerMessage; + } + + /** + * 使用信用卡支付金额数 + */ + public String getCreditCardFee() { + return creditCardFee; + } + + /** + * 使用信用卡支付金额数 + */ + public void setCreditCardFee(String creditCardFee) { + this.creditCardFee = creditCardFee; + } + + /** + * 分阶段付款的订单状态(例如万人团订单等),目前有三返回状态FRONT_NOPAID_FINAL_NOPAID(定金未付尾款未付),FRONT_PAID_FINAL_NOPAID(定金已付尾款未付),FRONT_PAID_FINAL_PAID(定金和尾款都付) + */ + public String getStepTradeStatus() { + return stepTradeStatus; + } + + /** + * 分阶段付款的订单状态(例如万人团订单等),目前有三返回状态FRONT_NOPAID_FINAL_NOPAID(定金未付尾款未付),FRONT_PAID_FINAL_NOPAID(定金已付尾款未付),FRONT_PAID_FINAL_PAID(定金和尾款都付) + */ + public void setStepTradeStatus(String stepTradeStatus) { + this.stepTradeStatus = stepTradeStatus; + } + + /** + * 分阶段付款的已付金额(万人团订单已付金额) + */ + public String getStepPaidFee() { + return stepPaidFee; + } + + /** + * 分阶段付款的已付金额(万人团订单已付金额) + */ + public void setStepPaidFee(String stepPaidFee) { + this.stepPaidFee = stepPaidFee; + } + + /** + * 买家OpenUid + */ + public String getBuyerOpenUid() { + return buyerOpenUid; + } + + /** + * 买家OpenUid + */ + public void setBuyerOpenUid(String buyerOpenUid) { + this.buyerOpenUid = buyerOpenUid; + } + + /** + * 订单出现异常问题的时候,给予用户的描述,没有异常的时候,此值为空 + */ + public String getMarkDesc() { + return markDesc; + } + + /** + * 订单出现异常问题的时候,给予用户的描述,没有异常的时候,此值为空 + */ + public void setMarkDesc(String markDesc) { + this.markDesc = markDesc; + } + + /** + * 买家昵称 + */ + public String getBuyerNick() { + return buyerNick; + } + + /** + * 买家昵称 + */ + public void setBuyerNick(String buyerNick) { + this.buyerNick = buyerNick; + } + + /** + * 商品数字编号 + */ + public String getNumIid() { + return numIid; + } + + /** + * 商品数字编号 + */ + public void setNumIid(String numIid) { + this.numIid = numIid; + } + + /** + * 商品购买数量。取值范围:大于零的整数,对于一个trade对应多个order的时候(一笔主订单,对应多笔子订单),num=0,num是一个跟商品关联的属性,一笔订单对应多比子订单的时候,主订单上的num无意义。 + */ + public Integer getNum() { + return num; + } + + /** + * 商品购买数量。取值范围:大于零的整数,对于一个trade对应多个order的时候(一笔主订单,对应多笔子订单),num=0,num是一个跟商品关联的属性,一笔订单对应多比子订单的时候,主订单上的num无意义。 + */ + public void setNum(Integer num) { + this.num = num; + } + + /** + * 商品价格。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public Double getPrice() { + return price; + } + + /** + * 商品价格。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public void setPrice(Double price) { + this.price = price; + } + + /** + * 商品金额(商品价格乘以数量的总金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public Double getTotalFee() { + return totalFee; + } + + /** + * 商品金额(商品价格乘以数量的总金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public void setTotalFee(Double totalFee) { + this.totalFee = totalFee; + } + + /** + * 卖家手工调整金额,精确到2位小数,单位:元。如:200.07 + */ + public Double getAdjustFee() { + return adjustFee; + } + + /** + * 卖家手工调整金额,精确到2位小数,单位:元。如:200.07 + */ + public void setAdjustFee(Double adjustFee) { + this.adjustFee = adjustFee; + } + + /** + * 邮费 + */ + public BigDecimal getPostFee() { + return postFee; + } + + /** + * 邮费 + */ + public void setPostFee(BigDecimal postFee) { + this.postFee = postFee; + } + + /** + * 优惠金额 + */ + public BigDecimal getDiscountFee() { + return discountFee; + } + + /** + * 优惠金额 + */ + public void setDiscountFee(BigDecimal discountFee) { + this.discountFee = discountFee; + } + + /** + * 实付金额 + */ + public BigDecimal getPayment() { + return payment; + } + + /** + * 实付金额 + */ + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + /** + * 卖家实际收到的支付宝打款金额(由于子订单可以部分确认收货,这个金额会随着子订单的确认收货而不断增加,交易成功后等于买家实付款减去退款金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public BigDecimal getReceivedPayment() { + return receivedPayment; + } + + /** + * 卖家实际收到的支付宝打款金额(由于子订单可以部分确认收货,这个金额会随着子订单的确认收货而不断增加,交易成功后等于买家实付款减去退款金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public void setReceivedPayment(BigDecimal receivedPayment) { + this.receivedPayment = receivedPayment; + } + + /** + * 交易中剩余的确认收货金额(这个金额会随着子订单确认收货而不断减少,交易成功后会变为零)。精确到2位小数;单位:元。如:200.07,表示:200 元7分 + */ + public Double getAvailableConfirmFee() { + return availableConfirmFee; + } + + /** + * 交易中剩余的确认收货金额(这个金额会随着子订单确认收货而不断减少,交易成功后会变为零)。精确到2位小数;单位:元。如:200.07,表示:200 元7分 + */ + public void setAvailableConfirmFee(Double availableConfirmFee) { + this.availableConfirmFee = availableConfirmFee; + } + + /** + * 货到付款服务费。 + */ + public Double getCodFee() { + return codFee; + } + + /** + * 货到付款服务费。 + */ + public void setCodFee(Double codFee) { + this.codFee = codFee; + } + + /** + * 货到付款物流状态。初始状态 NEW_CREATED,接单成功 ACCEPTED_BY_COMPANY,接单失败 REJECTED_BY_COMPANY,接单超时 RECIEVE_TIMEOUT,揽收成功 TAKEN_IN_SUCCESS,揽收失败 TAKEN_IN_FAILED,揽收超时 TAKEN_TIMEOUT,签收成功 SIGN_IN,签收失败 REJECTED_BY_OTHER_SIDE,订单等待发送给物流公司 WAITING_TO_BE_SENT,用户取消物流订单 CANCELED + */ + public String getCodStatus() { + return codStatus; + } + + /** + * 货到付款物流状态。初始状态 NEW_CREATED,接单成功 ACCEPTED_BY_COMPANY,接单失败 REJECTED_BY_COMPANY,接单超时 RECIEVE_TIMEOUT,揽收成功 TAKEN_IN_SUCCESS,揽收失败 TAKEN_IN_FAILED,揽收超时 TAKEN_TIMEOUT,签收成功 SIGN_IN,签收失败 REJECTED_BY_OTHER_SIDE,订单等待发送给物流公司 WAITING_TO_BE_SENT,用户取消物流订单 CANCELED + */ + public void setCodStatus(String codStatus) { + this.codStatus = codStatus; + } + + /** + * 买家货到付款服务费 + */ + public String getBuyerCodFee() { + return buyerCodFee; + } + + /** + * 买家货到付款服务费 + */ + public void setBuyerCodFee(String buyerCodFee) { + this.buyerCodFee = buyerCodFee; + } + + /** + * 卖家货到付款服务费 + */ + public String getSellerCodFee() { + return sellerCodFee; + } + + /** + * 卖家货到付款服务费 + */ + public void setSellerCodFee(String sellerCodFee) { + this.sellerCodFee = sellerCodFee; + } + + /** + * 快递代收款。 + */ + public String getExpressAgencyFee() { + return expressAgencyFee; + } + + /** + * 快递代收款。 + */ + public void setExpressAgencyFee(String expressAgencyFee) { + this.expressAgencyFee = expressAgencyFee; + } + + /** + * 交易佣金。 + */ + public Double getCommissionFee() { + return commissionFee; + } + + /** + * 交易佣金。 + */ + public void setCommissionFee(Double commissionFee) { + this.commissionFee = commissionFee; + } + + /** + * 创建交易时的物流方式(交易完成前,物流方式有可能改变,但系统里的这个字段一直不变)。可选值:free(卖家包邮),post(平邮),express(快递),ems(EMS),virtual(虚拟发货),25(次日必达),26(预约配送)。 + */ + public String getShippingType() { + return shippingType; + } + + /** + * 创建交易时的物流方式(交易完成前,物流方式有可能改变,但系统里的这个字段一直不变)。可选值:free(卖家包邮),post(平邮),express(快递),ems(EMS),virtual(虚拟发货),25(次日必达),26(预约配送)。 + */ + public void setShippingType(String shippingType) { + this.shippingType = shippingType; + } + + /** + * 交易创建时间。格式:yyyy-MM-dd HH:mm:ss + */ + public Date getCreated() { + return created; + } + + /** + * 交易创建时间。格式:yyyy-MM-dd HH:mm:ss + */ + public void setCreated(Date created) { + this.created = created; + } + + /** + * 交易修改时间(用户对订单的任何修改都会更新此字段)。格式:yyyy-MM-dd HH:mm:ss + */ + public Date getModified() { + return modified; + } + + /** + * 交易修改时间(用户对订单的任何修改都会更新此字段)。格式:yyyy-MM-dd HH:mm:ss + */ + public void setModified(Date modified) { + this.modified = modified; + } + + /** + * 付款时间。格式:yyyy-MM-dd HH:mm:ss。订单的付款时间即为物流订单的创建时间。 + */ + public Date getPayTime() { + return payTime; + } + + /** + * 付款时间。格式:yyyy-MM-dd HH:mm:ss。订单的付款时间即为物流订单的创建时间。 + */ + public void setPayTime(Date payTime) { + this.payTime = payTime; + } + + /** + * 卖家发货时间。格式:yyyy-MM-dd HH:mm:ss + */ + public Date getConsignTime() { + return consignTime; + } + + /** + * 卖家发货时间。格式:yyyy-MM-dd HH:mm:ss + */ + public void setConsignTime(Date consignTime) { + this.consignTime = consignTime; + } + + /** + * 交易结束时间。交易成功时间(更新交易状态为成功的同时更新)/确认收货时间或者交易关闭时间 。格式:yyyy-MM-dd HH:mm:ss + */ + public Date getEndTime() { + return endTime; + } + + /** + * 交易结束时间。交易成功时间(更新交易状态为成功的同时更新)/确认收货时间或者交易关闭时间 。格式:yyyy-MM-dd HH:mm:ss + */ + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + /** + * 卖家备忘信息 + */ + public String getSellerMemo() { + return sellerMemo; + } + + /** + * 卖家备忘信息 + */ + public void setSellerMemo(String sellerMemo) { + this.sellerMemo = sellerMemo; + } + + /** + * 买家备注 + */ + public String getBuyerMemo() { + return buyerMemo; + } + + /** + * 买家备注 + */ + public void setBuyerMemo(String buyerMemo) { + this.buyerMemo = buyerMemo; + } + + /** + * 买家留言 + */ + public String getBuyerMessage() { + return buyerMessage; + } + + /** + * 买家留言 + */ + public void setBuyerMessage(String buyerMessage) { + this.buyerMessage = buyerMessage; + } + + /** + * 买家使用积分,下单时生成,且一直不变。格式:100;单位:个. + */ + public String getPointFee() { + return pointFee; + } + + /** + * 买家使用积分,下单时生成,且一直不变。格式:100;单位:个. + */ + public void setPointFee(String pointFee) { + this.pointFee = pointFee; + } + + /** + * 买家实际使用积分(扣除部分退款使用的积分),交易完成后生成(交易成功或关闭),交易未完成时该字段值为0。格式:100;单位:个 + */ + public String getRealPointFee() { + return realPointFee; + } + + /** + * 买家实际使用积分(扣除部分退款使用的积分),交易完成后生成(交易成功或关闭),交易未完成时该字段值为0。格式:100;单位:个 + */ + public void setRealPointFee(String realPointFee) { + this.realPointFee = realPointFee; + } + + /** + * 买家获得积分,返点的积分。格式:100;单位:个。返点的积分要交易成功之后才能获得。 + */ + public String getBuyerObtainPointFee() { + return buyerObtainPointFee; + } + + /** + * 买家获得积分,返点的积分。格式:100;单位:个。返点的积分要交易成功之后才能获得。 + */ + public void setBuyerObtainPointFee(String buyerObtainPointFee) { + this.buyerObtainPointFee = buyerObtainPointFee; + } + + /** + * 收货时间,这里返回的是完全收货时间 + */ + public Date getReceivingtime() { + return receivingtime; + } + + /** + * 收货时间,这里返回的是完全收货时间 + */ + public void setReceivingtime(Date receivingtime) { + this.receivingtime = receivingtime; + } + + /** + * 交易状态。可选值: * 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(拼团中订单或者发货强管控的订单,已付款但禁止发货) + */ + public String getStatus() { + return status; + } + + /** + * 交易状态。可选值: * 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(拼团中订单或者发货强管控的订单,已付款但禁止发货) + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * 交易备注。 + */ + public String getTradeMemo() { + return tradeMemo; + } + + /** + * 交易备注。 + */ + public void setTradeMemo(String tradeMemo) { + this.tradeMemo = tradeMemo; + } + + /** + * erp发货快递公司 + */ + public String getErpSendCompany() { + return erpSendCompany; + } + + /** + * erp发货快递公司 + */ + public void setErpSendCompany(String erpSendCompany) { + this.erpSendCompany = erpSendCompany; + } + + /** + * erp发货快递单号 + */ + public String getErpSendCode() { + return erpSendCode; + } + + /** + * erp发货快递单号 + */ + public void setErpSendCode(String erpSendCode) { + this.erpSendCode = erpSendCode; + } + + /** + * erp发货状态 + */ + public Integer getErpSendStatus() { + return erpSendStatus; + } + + /** + * erp发货状态 + */ + public void setErpSendStatus(Integer erpSendStatus) { + this.erpSendStatus = erpSendStatus; + } + + /** + * 数据库创建时间 + */ + public Date getCreateTime() { + return createTime; + } + + /** + * 数据库创建时间 + */ + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + /** + * 数据库更新时间 + */ + public Date getUpdateTime() { + return updateTime; + } + + /** + * 数据库更新时间 + */ + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 数据库更新人 + */ + public String getUpdateBy() { + return updateBy; + } + + /** + * 数据库更新人 + */ + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + /** + * (收货人+手机号+座机+收货地址+create)5个字段组合成oaid,原始订单上座机为空也满足条件,否则生成不了oaid + */ + public String getOaid() { + return oaid; + } + + /** + * (收货人+手机号+座机+收货地址+create)5个字段组合成oaid,原始订单上座机为空也满足条件,否则生成不了oaid + */ + public void setOaid(String oaid) { + this.oaid = oaid; + } + + /** + * 地址aid字段 + */ + public String getAid() { + return aid; + } + + /** + * 地址aid字段 + */ + public void setAid(String aid) { + this.aid = aid; + } + + /** + * 收货人国籍 + */ + public String getReceiverCountry() { + return receiverCountry; + } + + /** + * 收货人国籍 + */ + public void setReceiverCountry(String receiverCountry) { + this.receiverCountry = receiverCountry; + } + + /** + * 收货人的所在省份 + */ + public String getReceiverState() { + return receiverState; + } + + /** + * 收货人的所在省份 + */ + public void setReceiverState(String receiverState) { + this.receiverState = receiverState; + } + + /** + * 收货人的所在城市 + */ + public String getReceiverCity() { + return receiverCity; + } + + /** + * 收货人的所在城市 + */ + public void setReceiverCity(String receiverCity) { + this.receiverCity = receiverCity; + } + + /** + * 收货人的所在地区 + */ + public String getReceiverDistrict() { + return receiverDistrict; + } + + /** + * 收货人的所在地区 + */ + public void setReceiverDistrict(String receiverDistrict) { + this.receiverDistrict = receiverDistrict; + } + + /** + * 收货人街道地址 + */ + public String getReceiverTown() { + return receiverTown; + } + + /** + * 收货人街道地址 + */ + public void setReceiverTown(String receiverTown) { + this.receiverTown = receiverTown; + } + + /** + * 收货人的详细地址 + */ + public String getReceiverAddress() { + return receiverAddress; + } + + /** + * 收货人的详细地址 + */ + public void setReceiverAddress(String receiverAddress) { + this.receiverAddress = receiverAddress; + } + + /** + * 收货人的邮编 + */ + public String getReceiverZip() { + return receiverZip; + } + + /** + * 收货人的邮编 + */ + public void setReceiverZip(String receiverZip) { + this.receiverZip = receiverZip; + } + + /** + * 收货人的姓名 + */ + public String getReceiverName() { + return receiverName; + } + + /** + * 收货人的姓名 + */ + public void setReceiverName(String receiverName) { + this.receiverName = receiverName; + } + + /** + * 收货人的手机号码 + */ + public String getReceiverMobile() { + return receiverMobile; + } + + /** + * 收货人的手机号码 + */ + public void setReceiverMobile(String receiverMobile) { + this.receiverMobile = receiverMobile; + } + + /** + * 收货人的电话号码 + */ + public String getReceiverPhone() { + return receiverPhone; + } + + /** + * 收货人的电话号码 + */ + public void setReceiverPhone(String receiverPhone) { + this.receiverPhone = receiverPhone; + } + + /** + * 卖家是否已评价。可选值:true(已评价),false(未评价) + */ + public String getSellerRate() { + return sellerRate; + } + + /** + * 卖家是否已评价。可选值:true(已评价),false(未评价) + */ + public void setSellerRate(String sellerRate) { + this.sellerRate = sellerRate; + } + + /** + * 卖家昵称 + */ + public String getSellerNick() { + return sellerNick; + } + + /** + * 卖家昵称 + */ + public void setSellerNick(String sellerNick) { + this.sellerNick = sellerNick; + } + + /** + * 买家是否已评价。可选值:true(已评价),false(未评价)。如买家只评价未打分,此字段仍返回false + */ + public String getBuyerRate() { + return buyerRate; + } + + /** + * 买家是否已评价。可选值:true(已评价),false(未评价)。如买家只评价未打分,此字段仍返回false + */ + public void setBuyerRate(String buyerRate) { + this.buyerRate = buyerRate; + } + + /** + * 买家下单的地区 + */ + public String getBuyerArea() { + return buyerArea; + } + + /** + * 买家下单的地区 + */ + public void setBuyerArea(String buyerArea) { + this.buyerArea = buyerArea; + } + + /** + * 支付宝交易号,如:2009112081173831 + */ + public String getAlipayNo() { + return alipayNo; + } + + /** + * 支付宝交易号,如:2009112081173831 + */ + public void setAlipayNo(String alipayNo) { + this.alipayNo = alipayNo; + } + + /** + * 买家支付宝账号 + */ + public String getBuyerAlipayNo() { + return buyerAlipayNo; + } + + /** + * 买家支付宝账号 + */ + public void setBuyerAlipayNo(String buyerAlipayNo) { + this.buyerAlipayNo = buyerAlipayNo; + } + + /** + * 买家邮件地址 + */ + public String getBuyerEmail() { + return buyerEmail; + } + + /** + * 买家邮件地址 + */ + public void setBuyerEmail(String buyerEmail) { + this.buyerEmail = buyerEmail; + } + + /** + * 卖家支付宝账号 + */ + public String getSellerAlipayNo() { + return sellerAlipayNo; + } + + /** + * 卖家支付宝账号 + */ + public void setSellerAlipayNo(String sellerAlipayNo) { + this.sellerAlipayNo = sellerAlipayNo; + } + + /** + * 是否包含邮费。与available_confirm_fee同时使用。可选值:true(包含),false(不包含) + */ + public String getHasPostFee() { + return hasPostFee; + } + + /** + * 是否包含邮费。与available_confirm_fee同时使用。可选值:true(包含),false(不包含) + */ + public void setHasPostFee(String hasPostFee) { + this.hasPostFee = hasPostFee; + } + + /** + * 超时到期时间。格式:yyyy-MM-dd HH:mm:ss。业务规则:前提条件:只有在买家已付款,卖家已发货的情况下才有效如果申请了退款,那么超时会落在子订单上;比如说3笔ABC,A申请了,那么返回的是BC的列表, 主定单不存在如果没有申请过退款,那么超时会挂在主定单上;比如ABC,返回主定单,ABC的超时和主定单相同 + */ + public String getTimeoutActionTime() { + return timeoutActionTime; + } + + /** + * 超时到期时间。格式:yyyy-MM-dd HH:mm:ss。业务规则:前提条件:只有在买家已付款,卖家已发货的情况下才有效如果申请了退款,那么超时会落在子订单上;比如说3笔ABC,A申请了,那么返回的是BC的列表, 主定单不存在如果没有申请过退款,那么超时会挂在主定单上;比如ABC,返回主定单,ABC的超时和主定单相同 + */ + public void setTimeoutActionTime(String timeoutActionTime) { + this.timeoutActionTime = timeoutActionTime; + } + + /** + * 交易快照地址 + */ + public String getSnapshotUrl() { + return snapshotUrl; + } + + /** + * 交易快照地址 + */ + public void setSnapshotUrl(String snapshotUrl) { + this.snapshotUrl = snapshotUrl; + } + + /** + * 交易促销详细信息 + */ + public String getPromotion() { + return promotion; + } + + /** + * 交易促销详细信息 + */ + public void setPromotion(String promotion) { + this.promotion = promotion; + } + + /** + * 订单的运费险,单位为元 + */ + public Double getYfxFee() { + return yfxFee; + } + + /** + * 订单的运费险,单位为元 + */ + public void setYfxFee(Double yfxFee) { + this.yfxFee = yfxFee; + } + + /** + * 订单将在此时间前发出,主要用于预售订单 + */ + public String getSendTime() { + return sendTime; + } + + /** + * 订单将在此时间前发出,主要用于预售订单 + */ + public void setSendTime(String sendTime) { + this.sendTime = sendTime; + } + + /** + * 是否是多次发货的订单如果卖家对订单进行多次发货,则为true否则为false + */ + public String getIsPartConsign() { + return isPartConsign; + } + + /** + * 是否是多次发货的订单如果卖家对订单进行多次发货,则为true否则为false + */ + public void setIsPartConsign(String isPartConsign) { + this.isPartConsign = isPartConsign; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TaoOrder other = (TaoOrder) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId())) + && (this.getTid() == null ? other.getTid() == null : this.getTid().equals(other.getTid())) + && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getSellerFlag() == null ? other.getSellerFlag() == null : this.getSellerFlag().equals(other.getSellerFlag())) + && (this.getHasBuyerMessage() == null ? other.getHasBuyerMessage() == null : this.getHasBuyerMessage().equals(other.getHasBuyerMessage())) + && (this.getCreditCardFee() == null ? other.getCreditCardFee() == null : this.getCreditCardFee().equals(other.getCreditCardFee())) + && (this.getStepTradeStatus() == null ? other.getStepTradeStatus() == null : this.getStepTradeStatus().equals(other.getStepTradeStatus())) + && (this.getStepPaidFee() == null ? other.getStepPaidFee() == null : this.getStepPaidFee().equals(other.getStepPaidFee())) + && (this.getBuyerOpenUid() == null ? other.getBuyerOpenUid() == null : this.getBuyerOpenUid().equals(other.getBuyerOpenUid())) + && (this.getMarkDesc() == null ? other.getMarkDesc() == null : this.getMarkDesc().equals(other.getMarkDesc())) + && (this.getBuyerNick() == null ? other.getBuyerNick() == null : this.getBuyerNick().equals(other.getBuyerNick())) + && (this.getNumIid() == null ? other.getNumIid() == null : this.getNumIid().equals(other.getNumIid())) + && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) + && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) + && (this.getTotalFee() == null ? other.getTotalFee() == null : this.getTotalFee().equals(other.getTotalFee())) + && (this.getAdjustFee() == null ? other.getAdjustFee() == null : this.getAdjustFee().equals(other.getAdjustFee())) + && (this.getPostFee() == null ? other.getPostFee() == null : this.getPostFee().equals(other.getPostFee())) + && (this.getDiscountFee() == null ? other.getDiscountFee() == null : this.getDiscountFee().equals(other.getDiscountFee())) + && (this.getPayment() == null ? other.getPayment() == null : this.getPayment().equals(other.getPayment())) + && (this.getReceivedPayment() == null ? other.getReceivedPayment() == null : this.getReceivedPayment().equals(other.getReceivedPayment())) + && (this.getAvailableConfirmFee() == null ? other.getAvailableConfirmFee() == null : this.getAvailableConfirmFee().equals(other.getAvailableConfirmFee())) + && (this.getCodFee() == null ? other.getCodFee() == null : this.getCodFee().equals(other.getCodFee())) + && (this.getCodStatus() == null ? other.getCodStatus() == null : this.getCodStatus().equals(other.getCodStatus())) + && (this.getBuyerCodFee() == null ? other.getBuyerCodFee() == null : this.getBuyerCodFee().equals(other.getBuyerCodFee())) + && (this.getSellerCodFee() == null ? other.getSellerCodFee() == null : this.getSellerCodFee().equals(other.getSellerCodFee())) + && (this.getExpressAgencyFee() == null ? other.getExpressAgencyFee() == null : this.getExpressAgencyFee().equals(other.getExpressAgencyFee())) + && (this.getCommissionFee() == null ? other.getCommissionFee() == null : this.getCommissionFee().equals(other.getCommissionFee())) + && (this.getShippingType() == null ? other.getShippingType() == null : this.getShippingType().equals(other.getShippingType())) + && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated())) + && (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified())) + && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime())) + && (this.getConsignTime() == null ? other.getConsignTime() == null : this.getConsignTime().equals(other.getConsignTime())) + && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) + && (this.getSellerMemo() == null ? other.getSellerMemo() == null : this.getSellerMemo().equals(other.getSellerMemo())) + && (this.getBuyerMemo() == null ? other.getBuyerMemo() == null : this.getBuyerMemo().equals(other.getBuyerMemo())) + && (this.getBuyerMessage() == null ? other.getBuyerMessage() == null : this.getBuyerMessage().equals(other.getBuyerMessage())) + && (this.getPointFee() == null ? other.getPointFee() == null : this.getPointFee().equals(other.getPointFee())) + && (this.getRealPointFee() == null ? other.getRealPointFee() == null : this.getRealPointFee().equals(other.getRealPointFee())) + && (this.getBuyerObtainPointFee() == null ? other.getBuyerObtainPointFee() == null : this.getBuyerObtainPointFee().equals(other.getBuyerObtainPointFee())) + && (this.getReceivingtime() == null ? other.getReceivingtime() == null : this.getReceivingtime().equals(other.getReceivingtime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getTradeMemo() == null ? other.getTradeMemo() == null : this.getTradeMemo().equals(other.getTradeMemo())) + && (this.getErpSendCompany() == null ? other.getErpSendCompany() == null : this.getErpSendCompany().equals(other.getErpSendCompany())) + && (this.getErpSendCode() == null ? other.getErpSendCode() == null : this.getErpSendCode().equals(other.getErpSendCode())) + && (this.getErpSendStatus() == null ? other.getErpSendStatus() == null : this.getErpSendStatus().equals(other.getErpSendStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy())) + && (this.getOaid() == null ? other.getOaid() == null : this.getOaid().equals(other.getOaid())) + && (this.getAid() == null ? other.getAid() == null : this.getAid().equals(other.getAid())) + && (this.getReceiverCountry() == null ? other.getReceiverCountry() == null : this.getReceiverCountry().equals(other.getReceiverCountry())) + && (this.getReceiverState() == null ? other.getReceiverState() == null : this.getReceiverState().equals(other.getReceiverState())) + && (this.getReceiverCity() == null ? other.getReceiverCity() == null : this.getReceiverCity().equals(other.getReceiverCity())) + && (this.getReceiverDistrict() == null ? other.getReceiverDistrict() == null : this.getReceiverDistrict().equals(other.getReceiverDistrict())) + && (this.getReceiverTown() == null ? other.getReceiverTown() == null : this.getReceiverTown().equals(other.getReceiverTown())) + && (this.getReceiverAddress() == null ? other.getReceiverAddress() == null : this.getReceiverAddress().equals(other.getReceiverAddress())) + && (this.getReceiverZip() == null ? other.getReceiverZip() == null : this.getReceiverZip().equals(other.getReceiverZip())) + && (this.getReceiverName() == null ? other.getReceiverName() == null : this.getReceiverName().equals(other.getReceiverName())) + && (this.getReceiverMobile() == null ? other.getReceiverMobile() == null : this.getReceiverMobile().equals(other.getReceiverMobile())) + && (this.getReceiverPhone() == null ? other.getReceiverPhone() == null : this.getReceiverPhone().equals(other.getReceiverPhone())) + && (this.getSellerRate() == null ? other.getSellerRate() == null : this.getSellerRate().equals(other.getSellerRate())) + && (this.getSellerNick() == null ? other.getSellerNick() == null : this.getSellerNick().equals(other.getSellerNick())) + && (this.getBuyerRate() == null ? other.getBuyerRate() == null : this.getBuyerRate().equals(other.getBuyerRate())) + && (this.getBuyerArea() == null ? other.getBuyerArea() == null : this.getBuyerArea().equals(other.getBuyerArea())) + && (this.getAlipayNo() == null ? other.getAlipayNo() == null : this.getAlipayNo().equals(other.getAlipayNo())) + && (this.getBuyerAlipayNo() == null ? other.getBuyerAlipayNo() == null : this.getBuyerAlipayNo().equals(other.getBuyerAlipayNo())) + && (this.getBuyerEmail() == null ? other.getBuyerEmail() == null : this.getBuyerEmail().equals(other.getBuyerEmail())) + && (this.getSellerAlipayNo() == null ? other.getSellerAlipayNo() == null : this.getSellerAlipayNo().equals(other.getSellerAlipayNo())) + && (this.getHasPostFee() == null ? other.getHasPostFee() == null : this.getHasPostFee().equals(other.getHasPostFee())) + && (this.getTimeoutActionTime() == null ? other.getTimeoutActionTime() == null : this.getTimeoutActionTime().equals(other.getTimeoutActionTime())) + && (this.getSnapshotUrl() == null ? other.getSnapshotUrl() == null : this.getSnapshotUrl().equals(other.getSnapshotUrl())) + && (this.getPromotion() == null ? other.getPromotion() == null : this.getPromotion().equals(other.getPromotion())) + && (this.getYfxFee() == null ? other.getYfxFee() == null : this.getYfxFee().equals(other.getYfxFee())) + && (this.getSendTime() == null ? other.getSendTime() == null : this.getSendTime().equals(other.getSendTime())) + && (this.getIsPartConsign() == null ? other.getIsPartConsign() == null : this.getIsPartConsign().equals(other.getIsPartConsign())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode()); + result = prime * result + ((getTid() == null) ? 0 : getTid().hashCode()); + result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getSellerFlag() == null) ? 0 : getSellerFlag().hashCode()); + result = prime * result + ((getHasBuyerMessage() == null) ? 0 : getHasBuyerMessage().hashCode()); + result = prime * result + ((getCreditCardFee() == null) ? 0 : getCreditCardFee().hashCode()); + result = prime * result + ((getStepTradeStatus() == null) ? 0 : getStepTradeStatus().hashCode()); + result = prime * result + ((getStepPaidFee() == null) ? 0 : getStepPaidFee().hashCode()); + result = prime * result + ((getBuyerOpenUid() == null) ? 0 : getBuyerOpenUid().hashCode()); + result = prime * result + ((getMarkDesc() == null) ? 0 : getMarkDesc().hashCode()); + result = prime * result + ((getBuyerNick() == null) ? 0 : getBuyerNick().hashCode()); + result = prime * result + ((getNumIid() == null) ? 0 : getNumIid().hashCode()); + result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); + result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); + result = prime * result + ((getTotalFee() == null) ? 0 : getTotalFee().hashCode()); + result = prime * result + ((getAdjustFee() == null) ? 0 : getAdjustFee().hashCode()); + result = prime * result + ((getPostFee() == null) ? 0 : getPostFee().hashCode()); + result = prime * result + ((getDiscountFee() == null) ? 0 : getDiscountFee().hashCode()); + result = prime * result + ((getPayment() == null) ? 0 : getPayment().hashCode()); + result = prime * result + ((getReceivedPayment() == null) ? 0 : getReceivedPayment().hashCode()); + result = prime * result + ((getAvailableConfirmFee() == null) ? 0 : getAvailableConfirmFee().hashCode()); + result = prime * result + ((getCodFee() == null) ? 0 : getCodFee().hashCode()); + result = prime * result + ((getCodStatus() == null) ? 0 : getCodStatus().hashCode()); + result = prime * result + ((getBuyerCodFee() == null) ? 0 : getBuyerCodFee().hashCode()); + result = prime * result + ((getSellerCodFee() == null) ? 0 : getSellerCodFee().hashCode()); + result = prime * result + ((getExpressAgencyFee() == null) ? 0 : getExpressAgencyFee().hashCode()); + result = prime * result + ((getCommissionFee() == null) ? 0 : getCommissionFee().hashCode()); + result = prime * result + ((getShippingType() == null) ? 0 : getShippingType().hashCode()); + result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode()); + result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode()); + result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode()); + result = prime * result + ((getConsignTime() == null) ? 0 : getConsignTime().hashCode()); + result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + result = prime * result + ((getSellerMemo() == null) ? 0 : getSellerMemo().hashCode()); + result = prime * result + ((getBuyerMemo() == null) ? 0 : getBuyerMemo().hashCode()); + result = prime * result + ((getBuyerMessage() == null) ? 0 : getBuyerMessage().hashCode()); + result = prime * result + ((getPointFee() == null) ? 0 : getPointFee().hashCode()); + result = prime * result + ((getRealPointFee() == null) ? 0 : getRealPointFee().hashCode()); + result = prime * result + ((getBuyerObtainPointFee() == null) ? 0 : getBuyerObtainPointFee().hashCode()); + result = prime * result + ((getReceivingtime() == null) ? 0 : getReceivingtime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getTradeMemo() == null) ? 0 : getTradeMemo().hashCode()); + result = prime * result + ((getErpSendCompany() == null) ? 0 : getErpSendCompany().hashCode()); + result = prime * result + ((getErpSendCode() == null) ? 0 : getErpSendCode().hashCode()); + result = prime * result + ((getErpSendStatus() == null) ? 0 : getErpSendStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode()); + result = prime * result + ((getOaid() == null) ? 0 : getOaid().hashCode()); + result = prime * result + ((getAid() == null) ? 0 : getAid().hashCode()); + result = prime * result + ((getReceiverCountry() == null) ? 0 : getReceiverCountry().hashCode()); + result = prime * result + ((getReceiverState() == null) ? 0 : getReceiverState().hashCode()); + result = prime * result + ((getReceiverCity() == null) ? 0 : getReceiverCity().hashCode()); + result = prime * result + ((getReceiverDistrict() == null) ? 0 : getReceiverDistrict().hashCode()); + result = prime * result + ((getReceiverTown() == null) ? 0 : getReceiverTown().hashCode()); + result = prime * result + ((getReceiverAddress() == null) ? 0 : getReceiverAddress().hashCode()); + result = prime * result + ((getReceiverZip() == null) ? 0 : getReceiverZip().hashCode()); + result = prime * result + ((getReceiverName() == null) ? 0 : getReceiverName().hashCode()); + result = prime * result + ((getReceiverMobile() == null) ? 0 : getReceiverMobile().hashCode()); + result = prime * result + ((getReceiverPhone() == null) ? 0 : getReceiverPhone().hashCode()); + result = prime * result + ((getSellerRate() == null) ? 0 : getSellerRate().hashCode()); + result = prime * result + ((getSellerNick() == null) ? 0 : getSellerNick().hashCode()); + result = prime * result + ((getBuyerRate() == null) ? 0 : getBuyerRate().hashCode()); + result = prime * result + ((getBuyerArea() == null) ? 0 : getBuyerArea().hashCode()); + result = prime * result + ((getAlipayNo() == null) ? 0 : getAlipayNo().hashCode()); + result = prime * result + ((getBuyerAlipayNo() == null) ? 0 : getBuyerAlipayNo().hashCode()); + result = prime * result + ((getBuyerEmail() == null) ? 0 : getBuyerEmail().hashCode()); + result = prime * result + ((getSellerAlipayNo() == null) ? 0 : getSellerAlipayNo().hashCode()); + result = prime * result + ((getHasPostFee() == null) ? 0 : getHasPostFee().hashCode()); + result = prime * result + ((getTimeoutActionTime() == null) ? 0 : getTimeoutActionTime().hashCode()); + result = prime * result + ((getSnapshotUrl() == null) ? 0 : getSnapshotUrl().hashCode()); + result = prime * result + ((getPromotion() == null) ? 0 : getPromotion().hashCode()); + result = prime * result + ((getYfxFee() == null) ? 0 : getYfxFee().hashCode()); + result = prime * result + ((getSendTime() == null) ? 0 : getSendTime().hashCode()); + result = prime * result + ((getIsPartConsign() == null) ? 0 : getIsPartConsign().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", shopId=").append(shopId); + sb.append(", tid=").append(tid); + sb.append(", title=").append(title); + sb.append(", type=").append(type); + sb.append(", sellerFlag=").append(sellerFlag); + sb.append(", hasBuyerMessage=").append(hasBuyerMessage); + sb.append(", creditCardFee=").append(creditCardFee); + sb.append(", stepTradeStatus=").append(stepTradeStatus); + sb.append(", stepPaidFee=").append(stepPaidFee); + sb.append(", buyerOpenUid=").append(buyerOpenUid); + sb.append(", markDesc=").append(markDesc); + sb.append(", buyerNick=").append(buyerNick); + sb.append(", numIid=").append(numIid); + sb.append(", num=").append(num); + sb.append(", price=").append(price); + sb.append(", totalFee=").append(totalFee); + sb.append(", adjustFee=").append(adjustFee); + sb.append(", postFee=").append(postFee); + sb.append(", discountFee=").append(discountFee); + sb.append(", payment=").append(payment); + sb.append(", receivedPayment=").append(receivedPayment); + sb.append(", availableConfirmFee=").append(availableConfirmFee); + sb.append(", codFee=").append(codFee); + sb.append(", codStatus=").append(codStatus); + sb.append(", buyerCodFee=").append(buyerCodFee); + sb.append(", sellerCodFee=").append(sellerCodFee); + sb.append(", expressAgencyFee=").append(expressAgencyFee); + sb.append(", commissionFee=").append(commissionFee); + sb.append(", shippingType=").append(shippingType); + sb.append(", created=").append(created); + sb.append(", modified=").append(modified); + sb.append(", payTime=").append(payTime); + sb.append(", consignTime=").append(consignTime); + sb.append(", endTime=").append(endTime); + sb.append(", sellerMemo=").append(sellerMemo); + sb.append(", buyerMemo=").append(buyerMemo); + sb.append(", buyerMessage=").append(buyerMessage); + sb.append(", pointFee=").append(pointFee); + sb.append(", realPointFee=").append(realPointFee); + sb.append(", buyerObtainPointFee=").append(buyerObtainPointFee); + sb.append(", receivingtime=").append(receivingtime); + sb.append(", status=").append(status); + sb.append(", tradeMemo=").append(tradeMemo); + sb.append(", erpSendCompany=").append(erpSendCompany); + sb.append(", erpSendCode=").append(erpSendCode); + sb.append(", erpSendStatus=").append(erpSendStatus); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", updateBy=").append(updateBy); + sb.append(", oaid=").append(oaid); + sb.append(", aid=").append(aid); + sb.append(", receiverCountry=").append(receiverCountry); + sb.append(", receiverState=").append(receiverState); + sb.append(", receiverCity=").append(receiverCity); + sb.append(", receiverDistrict=").append(receiverDistrict); + sb.append(", receiverTown=").append(receiverTown); + sb.append(", receiverAddress=").append(receiverAddress); + sb.append(", receiverZip=").append(receiverZip); + sb.append(", receiverName=").append(receiverName); + sb.append(", receiverMobile=").append(receiverMobile); + sb.append(", receiverPhone=").append(receiverPhone); + sb.append(", sellerRate=").append(sellerRate); + sb.append(", sellerNick=").append(sellerNick); + sb.append(", buyerRate=").append(buyerRate); + sb.append(", buyerArea=").append(buyerArea); + sb.append(", alipayNo=").append(alipayNo); + sb.append(", buyerAlipayNo=").append(buyerAlipayNo); + sb.append(", buyerEmail=").append(buyerEmail); + sb.append(", sellerAlipayNo=").append(sellerAlipayNo); + sb.append(", hasPostFee=").append(hasPostFee); + sb.append(", timeoutActionTime=").append(timeoutActionTime); + sb.append(", snapshotUrl=").append(snapshotUrl); + sb.append(", promotion=").append(promotion); + sb.append(", yfxFee=").append(yfxFee); + sb.append(", sendTime=").append(sendTime); + sb.append(", isPartConsign=").append(isPartConsign); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tao-api/src/main/java/com/qihang/tao/domain/TaoOrderItem.java b/tao-api/src/main/java/com/qihang/tao/domain/TaoOrderItem.java new file mode 100644 index 00000000..74e14796 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/domain/TaoOrderItem.java @@ -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(); + } +} \ No newline at end of file diff --git a/tao-api/src/main/java/com/qihang/tao/domain/TaoRefund.java b/tao-api/src/main/java/com/qihang/tao/domain/TaoRefund.java new file mode 100644 index 00000000..c33f750c --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/domain/TaoRefund.java @@ -0,0 +1,1030 @@ +package com.qihang.tao.domain; + +import java.io.Serializable; +import java.util.Date; + +/** + * 淘宝退款订单表 + * @TableName tao_refund + */ +public class TaoRefund implements Serializable { + /** + * + */ + private Long id; + + /** + * 退款id + */ + private String refundId; + + /** + * 退款类型,可选值REFUND(仅退款),REFUND_AND_RETURN(退货退款),TMALL_EXCHANGE(天猫换货),TAOBAO_EXCHANGE(淘宝换货),REPAIR(维修),RESHIPPING(补寄),OTHERS(其他) + */ + private String disputeType; + + /** + * 店铺id + */ + private Integer shopId; + + /** + * 淘宝交易单号(订单号) + */ + private Long tid; + + /** + * 子订单号。如果是单笔交易oid会等于tid + */ + private Long oid; + + /** + * 支付给卖家的金额(交易总金额-退还给买家的金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + private Double payment; + + /** + * 商品价格。 + */ + private Double price; + + /** + * 交易总金额。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + private Double totalFee; + + /** + * 退还金额(退还给买家的金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + private Double refundFee; + + /** + * 分账给卖家的钱 + */ + private Double splitSellerFee; + + /** + * 分账给淘宝的钱 + */ + private Double splitTaobaoFee; + + /** + * 退款申请时间。格式:yyyy-MM-dd HH:mm:ss + */ + private Date created; + + /** + * 更新时间。格式:yyyy-MM-dd HH:mm:ss + */ + private Date modified; + + /** + * 卖家昵称 + */ + private String sellerNick; + + /** + * 不需客服介入1;需要客服介入2;客服已经介入3;客服初审完成4;客服主管复审失败5;客服处理完成6;系统撤销(B2B使用),维权撤销(集市使用) 7;支持买家 8;支持卖家 9;举证中 10;开放申诉 11; + */ + private String csStatus; + + /** + * 退款状态。可选值WAIT_SELLER_AGREE(买家已经申请退款,等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款,等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货,等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功) + */ + private String status; + + /** + * 退款对应的订单交易状态。可选值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(交易被淘宝关闭) ALL_WAIT_PAY(包含:WAIT_BUYER_PAY、TRADE_NO_CREATE_PAY) ALL_CLOSED(包含:TRADE_CLOSED、TRADE_CLOSED_BY_TAOBAO) 取自"http://open.taobao.com/dev/index.php/%E4%BA%A4%E6%98%93%E7%8A%B6%E6%80%81" + */ + private String orderStatus; + + /** + * 卖家收货地址 + */ + private String address; + + /** + * 退款先行垫付默认的未申请状态 0;退款先行垫付申请中 1;退款先行垫付,垫付完成 2;退款先行垫付,卖家拒绝收货 3;退款先行垫付,垫付关闭 4;退款先行垫付,垫付分账成功 5; + */ + private String advanceStatus; + + /** + * 支付宝交易号 + */ + private String alipayNo; + + /** + * 退货时间。格式:yyyy-MM-dd HH:mm:ss + */ + private Date goodReturnTime; + + /** + * 货物状态。可选值BUYER_NOT_RECEIVED (买家未收到货) BUYER_RECEIVED (买家已收到货) BUYER_RETURNED_GOODS (买家已退货) + */ + private String goodStatus; + + /** + * 买家是否需要退货。可选值:true(是),false(否) + */ + private Integer hasGoodReturn; + + /** + * 申请退款的商品数字编号 + */ + private Long numIid; + + /** + * 退货数量 + */ + private Long num; + + /** + * 商品外部商家编码 + */ + private String outerId; + + /** + * 退款原因 + */ + private String reason; + + /** + * 退款阶段,可选值:onsale/aftersale + */ + private String refundPhase; + + /** + * 物流方式.可选值:free(卖家包邮),post(平邮),express(快递),ems(EMS). + */ + private String shippingType; + + /** + * 退款说明 + */ + private String desc; + + /** + * 物流公司 + */ + private String companyName; + + /** + * 退货运单号 + */ + private String sid; + + /** + * 买家发货时间 + */ + private String sendTime; + + /** + * 完结时间。格式:yyyy-MM-dd HH:mm:ss + */ + private Date endTime; + + /** + * 商品标题 + */ + private String title; + + /** + * 商品SKU信息 + */ + private String sku; + + /** + * 买家openUid + */ + private String buyerOpenUid; + + /** + * 买家昵称 + */ + private String buyerNick; + + /** + * 组合品信息 +num_iid String 2342344 商品数字编号 +item_name String 测试商品 商品标题 +quantity Number 123 数量 +sku_id String 123 sku_id +outer_iid String 123 商家外部编码(可与商家外部系统对接) +outer_sku_id String 123 123 + */ + private String combineItemInfo; + + /** + * 订单创建时间 + */ + private Date createTime; + + /** + * 创建人 + */ + private String createBy; + + /** + * 更新人 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateTime; + + private static final long serialVersionUID = 1L; + + /** + * + */ + public Long getId() { + return id; + } + + /** + * + */ + public void setId(Long id) { + this.id = id; + } + + /** + * 退款id + */ + public String getRefundId() { + return refundId; + } + + /** + * 退款id + */ + public void setRefundId(String refundId) { + this.refundId = refundId; + } + + /** + * 退款类型,可选值REFUND(仅退款),REFUND_AND_RETURN(退货退款),TMALL_EXCHANGE(天猫换货),TAOBAO_EXCHANGE(淘宝换货),REPAIR(维修),RESHIPPING(补寄),OTHERS(其他) + */ + public String getDisputeType() { + return disputeType; + } + + /** + * 退款类型,可选值REFUND(仅退款),REFUND_AND_RETURN(退货退款),TMALL_EXCHANGE(天猫换货),TAOBAO_EXCHANGE(淘宝换货),REPAIR(维修),RESHIPPING(补寄),OTHERS(其他) + */ + public void setDisputeType(String disputeType) { + this.disputeType = disputeType; + } + + /** + * 店铺id + */ + public Integer getShopId() { + return shopId; + } + + /** + * 店铺id + */ + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + /** + * 淘宝交易单号(订单号) + */ + public Long getTid() { + return tid; + } + + /** + * 淘宝交易单号(订单号) + */ + public void setTid(Long tid) { + this.tid = tid; + } + + /** + * 子订单号。如果是单笔交易oid会等于tid + */ + public Long getOid() { + return oid; + } + + /** + * 子订单号。如果是单笔交易oid会等于tid + */ + public void setOid(Long oid) { + this.oid = oid; + } + + /** + * 支付给卖家的金额(交易总金额-退还给买家的金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public Double getPayment() { + return payment; + } + + /** + * 支付给卖家的金额(交易总金额-退还给买家的金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public void setPayment(Double payment) { + this.payment = payment; + } + + /** + * 商品价格。 + */ + public Double getPrice() { + return price; + } + + /** + * 商品价格。 + */ + public void setPrice(Double price) { + this.price = price; + } + + /** + * 交易总金额。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public Double getTotalFee() { + return totalFee; + } + + /** + * 交易总金额。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public void setTotalFee(Double totalFee) { + this.totalFee = totalFee; + } + + /** + * 退还金额(退还给买家的金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public Double getRefundFee() { + return refundFee; + } + + /** + * 退还金额(退还给买家的金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分 + */ + public void setRefundFee(Double refundFee) { + this.refundFee = refundFee; + } + + /** + * 分账给卖家的钱 + */ + public Double getSplitSellerFee() { + return splitSellerFee; + } + + /** + * 分账给卖家的钱 + */ + public void setSplitSellerFee(Double splitSellerFee) { + this.splitSellerFee = splitSellerFee; + } + + /** + * 分账给淘宝的钱 + */ + public Double getSplitTaobaoFee() { + return splitTaobaoFee; + } + + /** + * 分账给淘宝的钱 + */ + public void setSplitTaobaoFee(Double splitTaobaoFee) { + this.splitTaobaoFee = splitTaobaoFee; + } + + /** + * 退款申请时间。格式:yyyy-MM-dd HH:mm:ss + */ + public Date getCreated() { + return created; + } + + /** + * 退款申请时间。格式:yyyy-MM-dd HH:mm:ss + */ + public void setCreated(Date created) { + this.created = created; + } + + /** + * 更新时间。格式:yyyy-MM-dd HH:mm:ss + */ + public Date getModified() { + return modified; + } + + /** + * 更新时间。格式:yyyy-MM-dd HH:mm:ss + */ + public void setModified(Date modified) { + this.modified = modified; + } + + /** + * 卖家昵称 + */ + public String getSellerNick() { + return sellerNick; + } + + /** + * 卖家昵称 + */ + public void setSellerNick(String sellerNick) { + this.sellerNick = sellerNick; + } + + /** + * 不需客服介入1;需要客服介入2;客服已经介入3;客服初审完成4;客服主管复审失败5;客服处理完成6;系统撤销(B2B使用),维权撤销(集市使用) 7;支持买家 8;支持卖家 9;举证中 10;开放申诉 11; + */ + public String getCsStatus() { + return csStatus; + } + + /** + * 不需客服介入1;需要客服介入2;客服已经介入3;客服初审完成4;客服主管复审失败5;客服处理完成6;系统撤销(B2B使用),维权撤销(集市使用) 7;支持买家 8;支持卖家 9;举证中 10;开放申诉 11; + */ + public void setCsStatus(String csStatus) { + this.csStatus = csStatus; + } + + /** + * 退款状态。可选值WAIT_SELLER_AGREE(买家已经申请退款,等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款,等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货,等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功) + */ + public String getStatus() { + return status; + } + + /** + * 退款状态。可选值WAIT_SELLER_AGREE(买家已经申请退款,等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款,等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货,等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功) + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * 退款对应的订单交易状态。可选值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(交易被淘宝关闭) ALL_WAIT_PAY(包含:WAIT_BUYER_PAY、TRADE_NO_CREATE_PAY) ALL_CLOSED(包含:TRADE_CLOSED、TRADE_CLOSED_BY_TAOBAO) 取自"http://open.taobao.com/dev/index.php/%E4%BA%A4%E6%98%93%E7%8A%B6%E6%80%81" + */ + public String getOrderStatus() { + return orderStatus; + } + + /** + * 退款对应的订单交易状态。可选值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(交易被淘宝关闭) ALL_WAIT_PAY(包含:WAIT_BUYER_PAY、TRADE_NO_CREATE_PAY) ALL_CLOSED(包含:TRADE_CLOSED、TRADE_CLOSED_BY_TAOBAO) 取自"http://open.taobao.com/dev/index.php/%E4%BA%A4%E6%98%93%E7%8A%B6%E6%80%81" + */ + public void setOrderStatus(String orderStatus) { + this.orderStatus = orderStatus; + } + + /** + * 卖家收货地址 + */ + public String getAddress() { + return address; + } + + /** + * 卖家收货地址 + */ + public void setAddress(String address) { + this.address = address; + } + + /** + * 退款先行垫付默认的未申请状态 0;退款先行垫付申请中 1;退款先行垫付,垫付完成 2;退款先行垫付,卖家拒绝收货 3;退款先行垫付,垫付关闭 4;退款先行垫付,垫付分账成功 5; + */ + public String getAdvanceStatus() { + return advanceStatus; + } + + /** + * 退款先行垫付默认的未申请状态 0;退款先行垫付申请中 1;退款先行垫付,垫付完成 2;退款先行垫付,卖家拒绝收货 3;退款先行垫付,垫付关闭 4;退款先行垫付,垫付分账成功 5; + */ + public void setAdvanceStatus(String advanceStatus) { + this.advanceStatus = advanceStatus; + } + + /** + * 支付宝交易号 + */ + public String getAlipayNo() { + return alipayNo; + } + + /** + * 支付宝交易号 + */ + public void setAlipayNo(String alipayNo) { + this.alipayNo = alipayNo; + } + + /** + * 退货时间。格式:yyyy-MM-dd HH:mm:ss + */ + public Date getGoodReturnTime() { + return goodReturnTime; + } + + /** + * 退货时间。格式:yyyy-MM-dd HH:mm:ss + */ + public void setGoodReturnTime(Date goodReturnTime) { + this.goodReturnTime = goodReturnTime; + } + + /** + * 货物状态。可选值BUYER_NOT_RECEIVED (买家未收到货) BUYER_RECEIVED (买家已收到货) BUYER_RETURNED_GOODS (买家已退货) + */ + public String getGoodStatus() { + return goodStatus; + } + + /** + * 货物状态。可选值BUYER_NOT_RECEIVED (买家未收到货) BUYER_RECEIVED (买家已收到货) BUYER_RETURNED_GOODS (买家已退货) + */ + public void setGoodStatus(String goodStatus) { + this.goodStatus = goodStatus; + } + + /** + * 买家是否需要退货。可选值:true(是),false(否) + */ + public Integer getHasGoodReturn() { + return hasGoodReturn; + } + + /** + * 买家是否需要退货。可选值:true(是),false(否) + */ + public void setHasGoodReturn(Integer hasGoodReturn) { + this.hasGoodReturn = hasGoodReturn; + } + + /** + * 申请退款的商品数字编号 + */ + public Long getNumIid() { + return numIid; + } + + /** + * 申请退款的商品数字编号 + */ + public void setNumIid(Long numIid) { + this.numIid = numIid; + } + + /** + * 退货数量 + */ + public Long getNum() { + return num; + } + + /** + * 退货数量 + */ + public void setNum(Long num) { + this.num = num; + } + + /** + * 商品外部商家编码 + */ + public String getOuterId() { + return outerId; + } + + /** + * 商品外部商家编码 + */ + public void setOuterId(String outerId) { + this.outerId = outerId; + } + + /** + * 退款原因 + */ + public String getReason() { + return reason; + } + + /** + * 退款原因 + */ + public void setReason(String reason) { + this.reason = reason; + } + + /** + * 退款阶段,可选值:onsale/aftersale + */ + public String getRefundPhase() { + return refundPhase; + } + + /** + * 退款阶段,可选值:onsale/aftersale + */ + public void setRefundPhase(String refundPhase) { + this.refundPhase = refundPhase; + } + + /** + * 物流方式.可选值:free(卖家包邮),post(平邮),express(快递),ems(EMS). + */ + public String getShippingType() { + return shippingType; + } + + /** + * 物流方式.可选值:free(卖家包邮),post(平邮),express(快递),ems(EMS). + */ + public void setShippingType(String shippingType) { + this.shippingType = shippingType; + } + + /** + * 退款说明 + */ + public String getDesc() { + return desc; + } + + /** + * 退款说明 + */ + public void setDesc(String desc) { + this.desc = desc; + } + + /** + * 物流公司 + */ + public String getCompanyName() { + return companyName; + } + + /** + * 物流公司 + */ + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + /** + * 退货运单号 + */ + public String getSid() { + return sid; + } + + /** + * 退货运单号 + */ + public void setSid(String sid) { + this.sid = sid; + } + + /** + * 买家发货时间 + */ + public String getSendTime() { + return sendTime; + } + + /** + * 买家发货时间 + */ + public void setSendTime(String sendTime) { + this.sendTime = sendTime; + } + + /** + * 完结时间。格式:yyyy-MM-dd HH:mm:ss + */ + public Date getEndTime() { + return endTime; + } + + /** + * 完结时间。格式:yyyy-MM-dd HH:mm:ss + */ + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + /** + * 商品标题 + */ + public String getTitle() { + return title; + } + + /** + * 商品标题 + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * 商品SKU信息 + */ + public String getSku() { + return sku; + } + + /** + * 商品SKU信息 + */ + public void setSku(String sku) { + this.sku = sku; + } + + /** + * 买家openUid + */ + public String getBuyerOpenUid() { + return buyerOpenUid; + } + + /** + * 买家openUid + */ + public void setBuyerOpenUid(String buyerOpenUid) { + this.buyerOpenUid = buyerOpenUid; + } + + /** + * 买家昵称 + */ + public String getBuyerNick() { + return buyerNick; + } + + /** + * 买家昵称 + */ + public void setBuyerNick(String buyerNick) { + this.buyerNick = buyerNick; + } + + /** + * 组合品信息 +num_iid String 2342344 商品数字编号 +item_name String 测试商品 商品标题 +quantity Number 123 数量 +sku_id String 123 sku_id +outer_iid String 123 商家外部编码(可与商家外部系统对接) +outer_sku_id String 123 123 + */ + public String getCombineItemInfo() { + return combineItemInfo; + } + + /** + * 组合品信息 +num_iid String 2342344 商品数字编号 +item_name String 测试商品 商品标题 +quantity Number 123 数量 +sku_id String 123 sku_id +outer_iid String 123 商家外部编码(可与商家外部系统对接) +outer_sku_id String 123 123 + */ + public void setCombineItemInfo(String combineItemInfo) { + this.combineItemInfo = combineItemInfo; + } + + /** + * 订单创建时间 + */ + public Date getCreateTime() { + return createTime; + } + + /** + * 订单创建时间 + */ + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + /** + * 创建人 + */ + public String getCreateBy() { + return createBy; + } + + /** + * 创建人 + */ + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + /** + * 更新人 + */ + public String getUpdateBy() { + return updateBy; + } + + /** + * 更新人 + */ + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + /** + * 更新时间 + */ + public Date getUpdateTime() { + return updateTime; + } + + /** + * 更新时间 + */ + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TaoRefund other = (TaoRefund) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRefundId() == null ? other.getRefundId() == null : this.getRefundId().equals(other.getRefundId())) + && (this.getDisputeType() == null ? other.getDisputeType() == null : this.getDisputeType().equals(other.getDisputeType())) + && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId())) + && (this.getTid() == null ? other.getTid() == null : this.getTid().equals(other.getTid())) + && (this.getOid() == null ? other.getOid() == null : this.getOid().equals(other.getOid())) + && (this.getPayment() == null ? other.getPayment() == null : this.getPayment().equals(other.getPayment())) + && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) + && (this.getTotalFee() == null ? other.getTotalFee() == null : this.getTotalFee().equals(other.getTotalFee())) + && (this.getRefundFee() == null ? other.getRefundFee() == null : this.getRefundFee().equals(other.getRefundFee())) + && (this.getSplitSellerFee() == null ? other.getSplitSellerFee() == null : this.getSplitSellerFee().equals(other.getSplitSellerFee())) + && (this.getSplitTaobaoFee() == null ? other.getSplitTaobaoFee() == null : this.getSplitTaobaoFee().equals(other.getSplitTaobaoFee())) + && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated())) + && (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified())) + && (this.getSellerNick() == null ? other.getSellerNick() == null : this.getSellerNick().equals(other.getSellerNick())) + && (this.getCsStatus() == null ? other.getCsStatus() == null : this.getCsStatus().equals(other.getCsStatus())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus())) + && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress())) + && (this.getAdvanceStatus() == null ? other.getAdvanceStatus() == null : this.getAdvanceStatus().equals(other.getAdvanceStatus())) + && (this.getAlipayNo() == null ? other.getAlipayNo() == null : this.getAlipayNo().equals(other.getAlipayNo())) + && (this.getGoodReturnTime() == null ? other.getGoodReturnTime() == null : this.getGoodReturnTime().equals(other.getGoodReturnTime())) + && (this.getGoodStatus() == null ? other.getGoodStatus() == null : this.getGoodStatus().equals(other.getGoodStatus())) + && (this.getHasGoodReturn() == null ? other.getHasGoodReturn() == null : this.getHasGoodReturn().equals(other.getHasGoodReturn())) + && (this.getNumIid() == null ? other.getNumIid() == null : this.getNumIid().equals(other.getNumIid())) + && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) + && (this.getOuterId() == null ? other.getOuterId() == null : this.getOuterId().equals(other.getOuterId())) + && (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason())) + && (this.getRefundPhase() == null ? other.getRefundPhase() == null : this.getRefundPhase().equals(other.getRefundPhase())) + && (this.getShippingType() == null ? other.getShippingType() == null : this.getShippingType().equals(other.getShippingType())) + && (this.getDesc() == null ? other.getDesc() == null : this.getDesc().equals(other.getDesc())) + && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName())) + && (this.getSid() == null ? other.getSid() == null : this.getSid().equals(other.getSid())) + && (this.getSendTime() == null ? other.getSendTime() == null : this.getSendTime().equals(other.getSendTime())) + && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) + && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) + && (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku())) + && (this.getBuyerOpenUid() == null ? other.getBuyerOpenUid() == null : this.getBuyerOpenUid().equals(other.getBuyerOpenUid())) + && (this.getBuyerNick() == null ? other.getBuyerNick() == null : this.getBuyerNick().equals(other.getBuyerNick())) + && (this.getCombineItemInfo() == null ? other.getCombineItemInfo() == null : this.getCombineItemInfo().equals(other.getCombineItemInfo())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy())) + && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRefundId() == null) ? 0 : getRefundId().hashCode()); + result = prime * result + ((getDisputeType() == null) ? 0 : getDisputeType().hashCode()); + result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode()); + result = prime * result + ((getTid() == null) ? 0 : getTid().hashCode()); + result = prime * result + ((getOid() == null) ? 0 : getOid().hashCode()); + result = prime * result + ((getPayment() == null) ? 0 : getPayment().hashCode()); + result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); + result = prime * result + ((getTotalFee() == null) ? 0 : getTotalFee().hashCode()); + result = prime * result + ((getRefundFee() == null) ? 0 : getRefundFee().hashCode()); + result = prime * result + ((getSplitSellerFee() == null) ? 0 : getSplitSellerFee().hashCode()); + result = prime * result + ((getSplitTaobaoFee() == null) ? 0 : getSplitTaobaoFee().hashCode()); + result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode()); + result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode()); + result = prime * result + ((getSellerNick() == null) ? 0 : getSellerNick().hashCode()); + result = prime * result + ((getCsStatus() == null) ? 0 : getCsStatus().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode()); + result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode()); + result = prime * result + ((getAdvanceStatus() == null) ? 0 : getAdvanceStatus().hashCode()); + result = prime * result + ((getAlipayNo() == null) ? 0 : getAlipayNo().hashCode()); + result = prime * result + ((getGoodReturnTime() == null) ? 0 : getGoodReturnTime().hashCode()); + result = prime * result + ((getGoodStatus() == null) ? 0 : getGoodStatus().hashCode()); + result = prime * result + ((getHasGoodReturn() == null) ? 0 : getHasGoodReturn().hashCode()); + result = prime * result + ((getNumIid() == null) ? 0 : getNumIid().hashCode()); + result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); + result = prime * result + ((getOuterId() == null) ? 0 : getOuterId().hashCode()); + result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode()); + result = prime * result + ((getRefundPhase() == null) ? 0 : getRefundPhase().hashCode()); + result = prime * result + ((getShippingType() == null) ? 0 : getShippingType().hashCode()); + result = prime * result + ((getDesc() == null) ? 0 : getDesc().hashCode()); + result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); + result = prime * result + ((getSid() == null) ? 0 : getSid().hashCode()); + result = prime * result + ((getSendTime() == null) ? 0 : getSendTime().hashCode()); + result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); + result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode()); + result = prime * result + ((getBuyerOpenUid() == null) ? 0 : getBuyerOpenUid().hashCode()); + result = prime * result + ((getBuyerNick() == null) ? 0 : getBuyerNick().hashCode()); + result = prime * result + ((getCombineItemInfo() == null) ? 0 : getCombineItemInfo().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode()); + result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", refundId=").append(refundId); + sb.append(", disputeType=").append(disputeType); + sb.append(", shopId=").append(shopId); + sb.append(", tid=").append(tid); + sb.append(", oid=").append(oid); + sb.append(", payment=").append(payment); + sb.append(", price=").append(price); + sb.append(", totalFee=").append(totalFee); + sb.append(", refundFee=").append(refundFee); + sb.append(", splitSellerFee=").append(splitSellerFee); + sb.append(", splitTaobaoFee=").append(splitTaobaoFee); + sb.append(", created=").append(created); + sb.append(", modified=").append(modified); + sb.append(", sellerNick=").append(sellerNick); + sb.append(", csStatus=").append(csStatus); + sb.append(", status=").append(status); + sb.append(", orderStatus=").append(orderStatus); + sb.append(", address=").append(address); + sb.append(", advanceStatus=").append(advanceStatus); + sb.append(", alipayNo=").append(alipayNo); + sb.append(", goodReturnTime=").append(goodReturnTime); + sb.append(", goodStatus=").append(goodStatus); + sb.append(", hasGoodReturn=").append(hasGoodReturn); + sb.append(", numIid=").append(numIid); + sb.append(", num=").append(num); + sb.append(", outerId=").append(outerId); + sb.append(", reason=").append(reason); + sb.append(", refundPhase=").append(refundPhase); + sb.append(", shippingType=").append(shippingType); + sb.append(", desc=").append(desc); + sb.append(", companyName=").append(companyName); + sb.append(", sid=").append(sid); + sb.append(", sendTime=").append(sendTime); + sb.append(", endTime=").append(endTime); + sb.append(", title=").append(title); + sb.append(", sku=").append(sku); + sb.append(", buyerOpenUid=").append(buyerOpenUid); + sb.append(", buyerNick=").append(buyerNick); + sb.append(", combineItemInfo=").append(combineItemInfo); + sb.append(", createTime=").append(createTime); + sb.append(", createBy=").append(createBy); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tao-api/src/main/java/com/qihang/tao/mapper/SysPlatformMapper.java b/tao-api/src/main/java/com/qihang/tao/mapper/SysPlatformMapper.java new file mode 100644 index 00000000..4521f3d6 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/mapper/SysPlatformMapper.java @@ -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 { + +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/mapper/SysShopMapper.java b/tao-api/src/main/java/com/qihang/tao/mapper/SysShopMapper.java new file mode 100644 index 00000000..080d36b1 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/mapper/SysShopMapper.java @@ -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 { + +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/mapper/TaoGoodsSkuMapper.java b/tao-api/src/main/java/com/qihang/tao/mapper/TaoGoodsSkuMapper.java new file mode 100644 index 00000000..e3d03f57 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/mapper/TaoGoodsSkuMapper.java @@ -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 { + +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/mapper/TaoOrderItemMapper.java b/tao-api/src/main/java/com/qihang/tao/mapper/TaoOrderItemMapper.java new file mode 100644 index 00000000..e251a0e2 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/mapper/TaoOrderItemMapper.java @@ -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 { + +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/mapper/TaoOrderMapper.java b/tao-api/src/main/java/com/qihang/tao/mapper/TaoOrderMapper.java new file mode 100644 index 00000000..0e4b91b6 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/mapper/TaoOrderMapper.java @@ -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 { + +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/mapper/TaoRefundMapper.java b/tao-api/src/main/java/com/qihang/tao/mapper/TaoRefundMapper.java new file mode 100644 index 00000000..163a13d3 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/mapper/TaoRefundMapper.java @@ -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 { + +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/service/SysPlatformService.java b/tao-api/src/main/java/com/qihang/tao/service/SysPlatformService.java new file mode 100644 index 00000000..fb0e3593 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/SysPlatformService.java @@ -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 selectById(Integer id); +} diff --git a/tao-api/src/main/java/com/qihang/tao/service/SysShopService.java b/tao-api/src/main/java/com/qihang/tao/service/SysShopService.java new file mode 100644 index 00000000..2c2c7dbb --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/SysShopService.java @@ -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 selectShopById(Integer shopId); + + void updateSessionKey(Integer shopId,String sessionKey); +} diff --git a/tao-api/src/main/java/com/qihang/tao/service/TaoGoodsSkuService.java b/tao-api/src/main/java/com/qihang/tao/service/TaoGoodsSkuService.java new file mode 100644 index 00000000..a7de8674 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/TaoGoodsSkuService.java @@ -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 { + +} diff --git a/tao-api/src/main/java/com/qihang/tao/service/TaoOrderItemService.java b/tao-api/src/main/java/com/qihang/tao/service/TaoOrderItemService.java new file mode 100644 index 00000000..999cd4b2 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/TaoOrderItemService.java @@ -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 { + +} diff --git a/tao-api/src/main/java/com/qihang/tao/service/TaoOrderService.java b/tao-api/src/main/java/com/qihang/tao/service/TaoOrderService.java new file mode 100644 index 00000000..04d7c168 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/TaoOrderService.java @@ -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 { + +} diff --git a/tao-api/src/main/java/com/qihang/tao/service/TaoRefundService.java b/tao-api/src/main/java/com/qihang/tao/service/TaoRefundService.java new file mode 100644 index 00000000..b64fcf41 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/TaoRefundService.java @@ -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 { + +} diff --git a/tao-api/src/main/java/com/qihang/tao/service/impl/SysPlatformServiceImpl.java b/tao-api/src/main/java/com/qihang/tao/service/impl/SysPlatformServiceImpl.java new file mode 100644 index 00000000..76b57292 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/impl/SysPlatformServiceImpl.java @@ -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 + implements SysPlatformService{ + + private final SysPlatformMapper mapper; + @Override + public SysPlatform selectById(Integer id) { + return mapper.selectById(id); + } +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/service/impl/SysShopServiceImpl.java b/tao-api/src/main/java/com/qihang/tao/service/impl/SysShopServiceImpl.java new file mode 100644 index 00000000..415c9e4c --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/impl/SysShopServiceImpl.java @@ -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 + 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); + } +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/service/impl/TaoGoodsSkuServiceImpl.java b/tao-api/src/main/java/com/qihang/tao/service/impl/TaoGoodsSkuServiceImpl.java new file mode 100644 index 00000000..e3ce01ff --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/impl/TaoGoodsSkuServiceImpl.java @@ -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 + implements TaoGoodsSkuService{ + +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/service/impl/TaoOrderItemServiceImpl.java b/tao-api/src/main/java/com/qihang/tao/service/impl/TaoOrderItemServiceImpl.java new file mode 100644 index 00000000..41c20227 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/impl/TaoOrderItemServiceImpl.java @@ -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 + implements TaoOrderItemService{ + +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/service/impl/TaoOrderServiceImpl.java b/tao-api/src/main/java/com/qihang/tao/service/impl/TaoOrderServiceImpl.java new file mode 100644 index 00000000..60d90966 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/impl/TaoOrderServiceImpl.java @@ -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 + implements TaoOrderService{ + +} + + + + diff --git a/tao-api/src/main/java/com/qihang/tao/service/impl/TaoRefundServiceImpl.java b/tao-api/src/main/java/com/qihang/tao/service/impl/TaoRefundServiceImpl.java new file mode 100644 index 00000000..7e383f96 --- /dev/null +++ b/tao-api/src/main/java/com/qihang/tao/service/impl/TaoRefundServiceImpl.java @@ -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 + implements TaoRefundService{ + +} + + + + diff --git a/tao-api/src/main/resources/mapper/SysPlatformMapper.xml b/tao-api/src/main/resources/mapper/SysPlatformMapper.xml new file mode 100644 index 00000000..e2487440 --- /dev/null +++ b/tao-api/src/main/resources/mapper/SysPlatformMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + id,name,code, + app_key,app_secret + + diff --git a/tao-api/src/main/resources/mapper/SysShopMapper.xml b/tao-api/src/main/resources/mapper/SysShopMapper.xml new file mode 100644 index 00000000..10b2ebf0 --- /dev/null +++ b/tao-api/src/main/resources/mapper/SysShopMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + diff --git a/tao-api/src/main/resources/mapper/TaoGoodsSkuMapper.xml b/tao-api/src/main/resources/mapper/TaoGoodsSkuMapper.xml new file mode 100644 index 00000000..b871913e --- /dev/null +++ b/tao-api/src/main/resources/mapper/TaoGoodsSkuMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + diff --git a/tao-api/src/main/resources/mapper/TaoOrderItemMapper.xml b/tao-api/src/main/resources/mapper/TaoOrderItemMapper.xml new file mode 100644 index 00000000..e17b7fcc --- /dev/null +++ b/tao-api/src/main/resources/mapper/TaoOrderItemMapper.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + diff --git a/tao-api/src/main/resources/mapper/TaoOrderMapper.xml b/tao-api/src/main/resources/mapper/TaoOrderMapper.xml new file mode 100644 index 00000000..66f47f6b --- /dev/null +++ b/tao-api/src/main/resources/mapper/TaoOrderMapper.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + diff --git a/tao-api/src/main/resources/mapper/TaoRefundMapper.xml b/tao-api/src/main/resources/mapper/TaoRefundMapper.xml new file mode 100644 index 00000000..33242a21 --- /dev/null +++ b/tao-api/src/main/resources/mapper/TaoRefundMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + +