完善pdd订单拉取、消息
This commit is contained in:
parent
8b0e857630
commit
220bfc71b6
|
|
@ -0,0 +1,161 @@
|
|||
package com.qihang.oms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 抖店商品Sku表
|
||||
* @TableName oms_dou_goods_sku
|
||||
*/
|
||||
@Data
|
||||
public class OmsDouGoodsSku implements Serializable {
|
||||
/**
|
||||
* 商品sku_id;抖店系统生成。
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 商品ID;抖店系统生成。
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 规格ID
|
||||
*/
|
||||
private Long specId;
|
||||
|
||||
/**
|
||||
* sku外部编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 库存类型;0-普通;1-区域库存;10-阶梯库存;
|
||||
*/
|
||||
private Integer skuType;
|
||||
|
||||
/**
|
||||
* sku状态 true上架 false下架
|
||||
*/
|
||||
private String skuStatus;
|
||||
|
||||
/**
|
||||
* 外部的skuId;商家自定义;未设置返回为0。
|
||||
*/
|
||||
private Long outSkuId;
|
||||
|
||||
/**
|
||||
* 第一级子规格
|
||||
*/
|
||||
private Long specDetailId1;
|
||||
|
||||
/**
|
||||
* 第二级子规格
|
||||
*/
|
||||
private Long specDetailId2;
|
||||
|
||||
/**
|
||||
*
|
||||
第三级子规格
|
||||
*/
|
||||
private Long specDetailId3;
|
||||
|
||||
/**
|
||||
* 第一级子规格名
|
||||
*/
|
||||
private String specDetailName1;
|
||||
|
||||
/**
|
||||
* 第二级子规格名
|
||||
*/
|
||||
private String specDetailName2;
|
||||
|
||||
/**
|
||||
*
|
||||
第三级子规格名
|
||||
*/
|
||||
private String specDetailName3;
|
||||
|
||||
/**
|
||||
* 商品价格,单位:分
|
||||
*/
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 创建时间,时间戳:单位秒;
|
||||
*/
|
||||
private Integer createTime;
|
||||
|
||||
/**
|
||||
* ku_type=0时,表示普通库存数量 ;sku_type=1时,使用stock_map,表示区域库存数量
|
||||
*/
|
||||
private Integer stockNum;
|
||||
|
||||
/**
|
||||
* sku_type=0时,表示预占库存数量; sku_type=1时,表示区域库存数量,使用prehold_stock_map
|
||||
*/
|
||||
private Integer preholdStockNum;
|
||||
|
||||
/**
|
||||
* 活动库存
|
||||
*/
|
||||
private Integer promStockNum;
|
||||
|
||||
/**
|
||||
*
|
||||
阶梯库存
|
||||
*/
|
||||
private Integer stepStockNum;
|
||||
|
||||
/**
|
||||
* 预占阶梯库存
|
||||
*/
|
||||
private Integer preholdStepStockNum;
|
||||
|
||||
/**
|
||||
* 活动阶梯库存
|
||||
*/
|
||||
private Integer promStepStockNum;
|
||||
|
||||
/**
|
||||
* 库存模型V2新增 普通库存 非活动可售
|
||||
*/
|
||||
private Integer normalStockNum;
|
||||
|
||||
/**
|
||||
* 库存模型V2新增 渠道库存
|
||||
*/
|
||||
private Integer channelStockNum;
|
||||
|
||||
/**
|
||||
* 销售属性,代替spec_detail_id123、spec_detail_name123
|
||||
*/
|
||||
private String sellProperties;
|
||||
|
||||
/**
|
||||
* 商品id(o_goods外键)
|
||||
*/
|
||||
private Long erpGoodsId;
|
||||
|
||||
/**
|
||||
* 商品skuid(o_goods_sku外键)
|
||||
*/
|
||||
private Long erpGoodsSkuId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer shopId;
|
||||
|
||||
/**
|
||||
* 商品标题。
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 商品主图的第一张图
|
||||
*/
|
||||
private String img;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,420 @@
|
|||
package com.qihang.oms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 抖店订单表
|
||||
* @TableName oms_dou_order
|
||||
*/
|
||||
@Data
|
||||
public class OmsDouOrder implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 店铺父订单号,抖店平台生成,平台下唯一;
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 订单层级,主订单是2级
|
||||
*/
|
||||
private Integer orderLevel;
|
||||
|
||||
/**
|
||||
* 定金预售阶段单json
|
||||
*/
|
||||
private String orderPhaseList;
|
||||
|
||||
/**
|
||||
* 订单状态1 待确认/待支付(订单创建完毕)105 已支付 2 备货中 101 部分发货 3 已发货(全部发货)4 已取消5 已完成(已收货)
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
|
||||
/**
|
||||
* 订单状态描述
|
||||
*/
|
||||
private String orderStatusDesc;
|
||||
|
||||
/**
|
||||
*
|
||||
订单的一些c端标签json
|
||||
*/
|
||||
private String orderTag;
|
||||
|
||||
/**
|
||||
* 【订单类型】 0、普通订单 2、虚拟商品订单 4、电子券(poi核销) 5、三方核销
|
||||
*/
|
||||
private Integer orderType;
|
||||
|
||||
/**
|
||||
* 订单类型描述
|
||||
*/
|
||||
private String orderTypeDesc;
|
||||
|
||||
/**
|
||||
* 具体某个小程序的ID
|
||||
*/
|
||||
private Integer appId;
|
||||
|
||||
/**
|
||||
* 抖音小程序ID
|
||||
*/
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 小时达订单的接单状态 0-未接单;1-已接单;2-超时取消,或商家取消
|
||||
*/
|
||||
private Integer acceptOrderStatus;
|
||||
|
||||
/**
|
||||
* 预约发货时间
|
||||
*/
|
||||
private Integer appointmentShipTime;
|
||||
|
||||
/**
|
||||
* 作者(达人)承担金额(单位:分),订单参与活动和优惠中作者(达人)承担部分的总金额
|
||||
*/
|
||||
private Integer authorCostAmount;
|
||||
|
||||
/**
|
||||
* 达人抖音号,样品订单场景下才会返回的申样达人信息;
|
||||
*/
|
||||
private String awemeId;
|
||||
|
||||
/**
|
||||
* 【下单端】 0、站外 1、火山 2、抖音 3、头条 4、西瓜 5、微信 6、值点app 7、头条lite 8、懂车帝 9、皮皮虾 11、抖音极速版 12、TikTok 13、musically 14、穿山甲 15、火山极速版 16、服务市场 26、番茄小说 27、UG教育营销电商平台 28、Jumanji 29、电商SDK
|
||||
*/
|
||||
private Integer bType;
|
||||
|
||||
/**
|
||||
* 下单端描述
|
||||
*/
|
||||
private String bTypeDesc;
|
||||
|
||||
/**
|
||||
* 【下单场景】 0、未知 1、app内-原生 2、app内-小程序 3、H5 13、电商SDK-头条 35、电商SDK-头条lite
|
||||
*/
|
||||
private Integer subBType;
|
||||
|
||||
/**
|
||||
* 下单场景描述
|
||||
*/
|
||||
private String subBTypeDesc;
|
||||
|
||||
/**
|
||||
* 【业务来源】 1 -鲁班 2 -小店 3 -好好学习 4 -ev 5 -虚拟 6 -建站 7 -核销 8 -玉石 9 -ez 10 -ep 11 -虚拟卡券 12 -服务市场 13 - EP 视频课 14 - EP 直播课 21 -跨境BBC 22 -跨境BC 23 -跨境CC|UPU 24 -手机充值 25 -拍卖保证金 26 -懂车帝抵扣券 27 -懂车帝返现券 28 -离岛免税 29 -海南会员购 30 -抽奖 31 -清北-企业代付 32 -抖+券 33 -联盟寄样 49 -刀剑 53 -通信卡 66 -加油包 76 -大闸蟹 99 -保险 102-小店海外 108-上门取件收款
|
||||
*/
|
||||
private Integer biz;
|
||||
|
||||
/**
|
||||
* 业务来源描述
|
||||
*/
|
||||
private String bizDesc;
|
||||
|
||||
/**
|
||||
* 买家留言
|
||||
*/
|
||||
private String buyerWords;
|
||||
|
||||
/**
|
||||
* 商家备注
|
||||
*/
|
||||
private String sellerWords;
|
||||
|
||||
/**
|
||||
* 插旗信息:0-灰 1-紫 2-青 3-绿 4-橙 5-红
|
||||
*/
|
||||
private Integer sellerRemarkStars;
|
||||
|
||||
/**
|
||||
* 取消原因
|
||||
*/
|
||||
private String cancelReason;
|
||||
|
||||
/**
|
||||
* 支付渠道的流水号
|
||||
*/
|
||||
private String channelPaymentNo;
|
||||
|
||||
/**
|
||||
* 下单时间,时间戳,秒
|
||||
*/
|
||||
private Integer createTime;
|
||||
|
||||
/**
|
||||
* 支付时间,时间戳,秒
|
||||
*/
|
||||
private Integer payTime;
|
||||
|
||||
/**
|
||||
* 订单更新时间,时间戳,秒
|
||||
*/
|
||||
private Integer updateTime;
|
||||
|
||||
/**
|
||||
* 订单完成时间,时间戳,秒
|
||||
*/
|
||||
private Integer finishTime;
|
||||
|
||||
/**
|
||||
* 订单过期时间,时间戳,秒
|
||||
*/
|
||||
private Integer orderExpireTime;
|
||||
|
||||
/**
|
||||
* 用户唯一id
|
||||
*/
|
||||
private String doudianOpenId;
|
||||
|
||||
/**
|
||||
* 收件人姓名
|
||||
*/
|
||||
private String encryptPostReceiver;
|
||||
|
||||
/**
|
||||
* 收件人电话
|
||||
*/
|
||||
private String encryptPostTel;
|
||||
|
||||
/**
|
||||
* 收件地址
|
||||
*/
|
||||
private String encryptPostAddress;
|
||||
|
||||
/**
|
||||
* 预计发货时间,时间戳,秒
|
||||
*/
|
||||
private Integer expShipTime;
|
||||
|
||||
/**
|
||||
* 物流信息JSON
|
||||
*/
|
||||
private String logisticsInfo;
|
||||
|
||||
/**
|
||||
* 主流程状态,1 待确认/待支付(订单创建完毕)103 部分支付105 已支付2 备货中101 部分发货3 已发货(全部发货)4 已取消5 已完成(已收货)21 发货前退款完结22 发货后退款完结39 收货后退款完结
|
||||
*/
|
||||
private Integer mainStatus;
|
||||
|
||||
/**
|
||||
* 主流程状态描述
|
||||
*/
|
||||
private String mainStatusDesc;
|
||||
|
||||
/**
|
||||
* 收件人姓名(脱敏后)
|
||||
*/
|
||||
private String maskPostReceiver;
|
||||
|
||||
/**
|
||||
* 收件人电话(脱敏后)
|
||||
*/
|
||||
private String maskPostTel;
|
||||
|
||||
/**
|
||||
* 收件人地址(脱敏后)
|
||||
*/
|
||||
private String maskPostAddress;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private String provinceName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer provinceId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String cityName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer cityId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String townName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer townId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String streetName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer streetId;
|
||||
|
||||
/**
|
||||
* 标识收件人地址的id,可用于合单
|
||||
*/
|
||||
private String openAddressId;
|
||||
|
||||
/**
|
||||
* 改价金额变化量(单位:分)
|
||||
*/
|
||||
private Integer modifyAmount;
|
||||
|
||||
/**
|
||||
* 改价运费金额变化量(单位:分)
|
||||
*/
|
||||
private Integer modifyPostAmount;
|
||||
|
||||
/**
|
||||
* 仅平台承担金额(单位:分),订单参与活动和优惠中平台承担部分的总金额
|
||||
*/
|
||||
private Integer onlyPlatformCostAmount;
|
||||
|
||||
/**
|
||||
* 订单金额(单位:分)
|
||||
*/
|
||||
private Integer orderAmount;
|
||||
|
||||
/**
|
||||
* 支付金额(单位:分)
|
||||
*/
|
||||
private Integer payAmount;
|
||||
|
||||
/**
|
||||
* 7=无需支付(0元单);8=DOU分期(信用支付);9=新卡支付;12=先用后付;16=收银台支付
|
||||
*/
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 快递费(单位:分)
|
||||
*/
|
||||
private Integer postAmount;
|
||||
|
||||
/**
|
||||
* 运费险金额(单位:分)
|
||||
*/
|
||||
private Integer postInsuranceAmount;
|
||||
|
||||
/**
|
||||
* 运费原价(单位:分),post_origin_amount = post_amount + post_promotion_amount
|
||||
*/
|
||||
private Integer postOriginAmount;
|
||||
|
||||
/**
|
||||
* 运费优惠金额(单位:分)
|
||||
*/
|
||||
private Integer postPromotionAmount;
|
||||
|
||||
/**
|
||||
* 订单优惠总金额(单位:分) = 店铺优惠金额 + 平台优惠金额 + 达人优惠金额
|
||||
*/
|
||||
private Integer promotionAmount;
|
||||
|
||||
/**
|
||||
* 支付优惠金额(单位:分),支付渠道上的优惠金额
|
||||
*/
|
||||
private Integer promotionPayAmount;
|
||||
|
||||
/**
|
||||
* 平台优惠金额(单位:分),属于平台的优惠活动、优惠券、红包的总优惠金额
|
||||
*/
|
||||
private Integer promotionPlatformAmount;
|
||||
|
||||
/**
|
||||
* 红包优惠金额(单位:分)
|
||||
*/
|
||||
private Integer promotionRedpackAmount;
|
||||
|
||||
/**
|
||||
* 平台红包优惠金额(单位:分),属于平台的红包的优惠金额
|
||||
*/
|
||||
private Integer promotionRedpackPlatformAmount;
|
||||
|
||||
/**
|
||||
* 达人红包优惠金额(单位:分),属于达人的红包的优惠金额
|
||||
*/
|
||||
private Integer promotionRedpackTalentAmount;
|
||||
|
||||
/**
|
||||
* 店铺优惠金额(单位:分),属于店铺的优惠活动、优惠券、红包的总优惠金额
|
||||
*/
|
||||
private Integer promotionShopAmount;
|
||||
|
||||
/**
|
||||
* 达人优惠金额(单位:分),属于达人的优惠活动、优惠券、红包的总优惠金额
|
||||
*/
|
||||
private Integer promotionTalentAmount;
|
||||
|
||||
/**
|
||||
* 发货时间,时间戳,秒
|
||||
*/
|
||||
private Integer shipTime;
|
||||
|
||||
/**
|
||||
* 商家承担金额(单位:分),订单参与活动和优惠中商家承担部分的总金额
|
||||
*/
|
||||
private Integer shopCostAmount;
|
||||
|
||||
/**
|
||||
* 平台承担金额(单位:分),订单参与活动和优惠中平台+作者(达人)承担部分的总金额,包含作者(达人)承担金额:platform_cost_amount = only_platform_cost_amount + author_cost_amount
|
||||
*/
|
||||
private Integer platformCostAmount;
|
||||
|
||||
/**
|
||||
* 店铺id,抖店平台生成,平台下唯一;
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 商户名称
|
||||
*/
|
||||
private String shopName;
|
||||
|
||||
/**
|
||||
* 总优惠金额(单位:分),total_promotion_amount = promotion_amount + post_promotion_amount
|
||||
*/
|
||||
private Integer totalPromotionAmount;
|
||||
|
||||
/**
|
||||
* 用户特征标签;JSON
|
||||
*/
|
||||
private String userTagUi;
|
||||
|
||||
/**
|
||||
* 系统店铺id
|
||||
*/
|
||||
private Integer sShopId;
|
||||
|
||||
/**
|
||||
* 第一次拉取时间
|
||||
*/
|
||||
private Date pullTime;
|
||||
|
||||
/**
|
||||
* 最后一次拉取时间
|
||||
*/
|
||||
private Date lastPullTime;
|
||||
|
||||
/**
|
||||
* 0待确认,1已确认2已拦截-9未拉取
|
||||
*/
|
||||
private Integer auditStatus;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date auditTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,283 @@
|
|||
package com.qihang.oms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 抖店订单明细表
|
||||
* @TableName oms_dou_order_item
|
||||
*/
|
||||
@Data
|
||||
public class OmsDouOrderItem implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 店铺子订单号,抖店平台生成,平台下唯一;注意:一笔订单下有一个子订单和父订单单号相同。
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 店铺父订单号,抖店平台生成,平台下唯一;
|
||||
*/
|
||||
private String parentOrderId;
|
||||
|
||||
/**
|
||||
* 订单层级
|
||||
*/
|
||||
private Integer orderLevel;
|
||||
|
||||
/**
|
||||
* 广告来源,video-短视频 live-直播
|
||||
*/
|
||||
private String adEnvType;
|
||||
|
||||
/**
|
||||
* 售后状态;6-售后申请;27-拒绝售后申请;12-售后成功;7-售后退货中;11-售后已发货;29-售后退货拒绝;13-【换货返回:换货售后换货商家发货】,【补寄返回:补寄待用户收货】; 14-【换货返回:(换货)售后换货用户收货】,【补寄返回:(补寄)用户已收货】 ;28-售后失败;51-订单取消成功;53-逆向交易已完成;
|
||||
*/
|
||||
private Integer afterSaleStatus;
|
||||
|
||||
/**
|
||||
* 售后类型 ;0-退货退款;1-已发货仅退款;2-未发货仅退款;3-换货;4-系统取消;5-用户取消;6-价保;7-补寄;
|
||||
*/
|
||||
private Integer afterSaleType;
|
||||
|
||||
/**
|
||||
* 退款状态:1-待退款;3-退款成功; 4-退款失败;当买家发起售后后又主动取消售后,此时after_sale_status=28并且refund_status=1的状态不变,不会流转至4状态;
|
||||
*/
|
||||
private Integer refundStatus;
|
||||
|
||||
/**
|
||||
* 作者(达人)承担金额(单位:分),订单参与活动和优惠中作者(达人)承担部分的总金额
|
||||
*/
|
||||
private Integer authorCostAmount;
|
||||
|
||||
/**
|
||||
* 直播主播id(达人);仅直播间和橱窗产生的订单会有值返回;
|
||||
*/
|
||||
private Integer authorId;
|
||||
|
||||
/**
|
||||
* 直播主播名称;仅直播间和橱窗产生的订单会有值返回
|
||||
*/
|
||||
private String authorName;
|
||||
|
||||
/**
|
||||
* 【C端流量来源】 0-unknown 2-精选联盟 8-小店自卖
|
||||
*/
|
||||
private Integer cBiz;
|
||||
|
||||
/**
|
||||
* C端流量来源业务类型描述
|
||||
*/
|
||||
private String cBizDesc;
|
||||
|
||||
/**
|
||||
*
|
||||
取消原因
|
||||
*/
|
||||
private String cancelReason;
|
||||
|
||||
/**
|
||||
* 支付渠道的流水号
|
||||
*/
|
||||
private String channelPaymentNo;
|
||||
|
||||
/**
|
||||
* 商家后台商品编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 用户确认收货时间
|
||||
*/
|
||||
private Integer confirmReceiptTime;
|
||||
|
||||
/**
|
||||
* 订单完成时间,时间戳,秒
|
||||
*/
|
||||
private Integer finishTime;
|
||||
|
||||
/**
|
||||
*
|
||||
商品原价(单位:分)
|
||||
*/
|
||||
private Integer goodsPrice;
|
||||
|
||||
/**
|
||||
* 【商品类型】 0-实体 1-虚拟
|
||||
*/
|
||||
private Integer goodsType;
|
||||
|
||||
/**
|
||||
*
|
||||
是否评价 :1-已评价,0-未评价,2 -追评
|
||||
*/
|
||||
private Integer isComment;
|
||||
|
||||
/**
|
||||
* 订单商品数量
|
||||
*/
|
||||
private Integer itemNum;
|
||||
|
||||
/**
|
||||
* 物流收货时间
|
||||
*/
|
||||
private Integer logisticsReceiptTime;
|
||||
|
||||
/**
|
||||
*
|
||||
改价金额变化量(单位:分)
|
||||
*/
|
||||
private Integer modifyAmount;
|
||||
|
||||
/**
|
||||
* 改价运费金额变化量(单位:分)
|
||||
*/
|
||||
private Integer modifyPostAmount;
|
||||
|
||||
/**
|
||||
* 仅平台承担金额(单位:分),订单参与活动和优惠中平台承担部分的总金额
|
||||
*/
|
||||
private Integer onlyPlatformCostAmount;
|
||||
|
||||
/**
|
||||
* 订单金额(单位:分)
|
||||
*/
|
||||
private Integer orderAmount;
|
||||
|
||||
/**
|
||||
* 支付金额(单位:分)
|
||||
*/
|
||||
private Integer payAmount;
|
||||
|
||||
/**
|
||||
* 运费险金额(单位:分)
|
||||
*/
|
||||
private Integer postInsuranceAmount;
|
||||
|
||||
/**
|
||||
* 订单优惠总金额(单位:分) = 店铺优惠金额 + 平台优惠金额 + 达人优惠金额
|
||||
*/
|
||||
private Integer promotionAmount;
|
||||
|
||||
/**
|
||||
* 店铺优惠金额(单位:分),属于店铺的优惠活动、优惠券、红包的总优惠金额
|
||||
*/
|
||||
private Integer promotionShopAmount;
|
||||
|
||||
/**
|
||||
* 平台优惠金额(单位:分),属于平台的优惠活动、优惠券、红包的总优惠金额
|
||||
*/
|
||||
private Integer promotionPlatformAmount;
|
||||
|
||||
/**
|
||||
* 商家承担金额(单位:分),订单参与活动和优惠中商家承担部分的总金额
|
||||
*/
|
||||
private Integer shopCostAmount;
|
||||
|
||||
/**
|
||||
* 平台承担金额(单位:分),订单参与活动和优惠中平台+作者(达人)承担部分的总金额,包含作者(达人)承担金额:platform_cost_amount = only_platform_cost_amount + author_cost_amount
|
||||
*/
|
||||
private Integer platformCostAmount;
|
||||
|
||||
/**
|
||||
* 达人优惠金额(单位:分),属于达人的优惠活动、优惠券、红包的总优惠金额
|
||||
*/
|
||||
private Integer promotionTalentAmount;
|
||||
|
||||
/**
|
||||
* 支付优惠金额(单位:分),支付渠道上的优惠金额
|
||||
*/
|
||||
private Integer promotionPayAmount;
|
||||
|
||||
/**
|
||||
* 商品现价(单位:分)
|
||||
*/
|
||||
private Integer originAmount;
|
||||
|
||||
/**
|
||||
* 商品外部编码
|
||||
*/
|
||||
private String outProductId;
|
||||
|
||||
/**
|
||||
* 外部Skuid
|
||||
*/
|
||||
private String outSkuId;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 商品skuId
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 商品图片
|
||||
*/
|
||||
private String productPic;
|
||||
|
||||
/**
|
||||
* 平台优惠金额(单位:分),属于平台的优惠活动、优惠券、红包的总优惠金额
|
||||
*/
|
||||
private Integer promotionRedpackAmount;
|
||||
|
||||
/**
|
||||
* 平台红包优惠金额(单位:分),属于平台的红包的优惠金额
|
||||
*/
|
||||
private Integer promotionRedpackPlatformAmount;
|
||||
|
||||
/**
|
||||
* 达人红包优惠金额(单位:分),属于达人的红包的优惠金额
|
||||
*/
|
||||
private Integer promotionRedpackTalentAmount;
|
||||
|
||||
/**
|
||||
* 直播间id,有值则代表订单来自直播间
|
||||
*/
|
||||
private Integer roomId;
|
||||
|
||||
/**
|
||||
*
|
||||
发货时间
|
||||
*/
|
||||
private Integer shipTime;
|
||||
|
||||
/**
|
||||
* 规格信息JSON
|
||||
*/
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 下单来源描述(废弃)
|
||||
*/
|
||||
private String themeTypeDesc;
|
||||
|
||||
/**
|
||||
* 订单更新时间,时间戳,秒
|
||||
*/
|
||||
private Integer updateTime;
|
||||
|
||||
/**
|
||||
* 下单时间,时间戳,秒
|
||||
*/
|
||||
private Integer createTime;
|
||||
|
||||
/**
|
||||
* 视频id,有值则代表订单来自短视频video_id
|
||||
*/
|
||||
private String videoId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.qihang.oms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* pdd商品SKU表
|
||||
* @TableName oms_pdd_goods_sku
|
||||
*/
|
||||
@Data
|
||||
public class OmsPddGoodsSku implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* sku编码
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* pdd商品编码
|
||||
*/
|
||||
private Long goodsId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 商品缩略图
|
||||
*/
|
||||
private String thumbUrl;
|
||||
|
||||
/**
|
||||
* 商家外部编码(sku)
|
||||
*/
|
||||
private String outerId;
|
||||
|
||||
/**
|
||||
* sku库存
|
||||
*/
|
||||
private Long skuQuantity;
|
||||
|
||||
/**
|
||||
* 规格名称
|
||||
*/
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* sku是否在架上,0-下架中,1-架上
|
||||
*/
|
||||
private Integer isSkuOnsale;
|
||||
|
||||
/**
|
||||
* 商品id(o_goods外键)
|
||||
*/
|
||||
private Long erpGoodsId;
|
||||
|
||||
/**
|
||||
* 商品skuid(o_goods_sku外键)
|
||||
*/
|
||||
private Long erpGoodsSkuId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer shopId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,354 @@
|
|||
package com.qihang.oms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 拼多多订单表
|
||||
* @TableName oms_pdd_order
|
||||
*/
|
||||
@Data
|
||||
public class OmsPddOrder implements Serializable {
|
||||
/**
|
||||
* 订单id,自增
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 内部店铺ID
|
||||
*/
|
||||
private Integer shopId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderSn;
|
||||
|
||||
/**
|
||||
* 订单类型 0-普通订单 ,1- 定金订单
|
||||
*/
|
||||
private Integer tradeType;
|
||||
|
||||
/**
|
||||
* 是否顺丰包邮,1-是 0-否
|
||||
*/
|
||||
private Integer freeSf;
|
||||
|
||||
/**
|
||||
* 是否是抽奖订单,1-非抽奖订单,2-抽奖订单
|
||||
*/
|
||||
private Integer isLuckyFlag;
|
||||
|
||||
/**
|
||||
* 成团状态:0:拼团中、1:已成团、2:团失败
|
||||
*/
|
||||
private Integer groupStatus;
|
||||
|
||||
/**
|
||||
* 成交状态:0:未成交、1:已成交、2:已取消、
|
||||
*/
|
||||
private Integer confirmStatus;
|
||||
|
||||
/**
|
||||
* 订单状态1:待发货,2:已发货待签收,3:已签收
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
|
||||
/**
|
||||
* 售后状态 1:无售后或售后关闭,2:售后处理中,3:退款中,4: 退款成功 5:全部
|
||||
*/
|
||||
private Integer refundStatus;
|
||||
|
||||
/**
|
||||
* 团长免单金额,单位:元
|
||||
*/
|
||||
private Double capitalFreeDiscount;
|
||||
|
||||
/**
|
||||
* 商家优惠金额,单位:元
|
||||
*/
|
||||
private Double sellerDiscount;
|
||||
|
||||
/**
|
||||
* 平台优惠金额,单位:元
|
||||
*/
|
||||
private Double platformDiscount;
|
||||
|
||||
/**
|
||||
* 商品金额,单位:元,商品金额=商品销售价格*商品数量-改价金额(接口暂无该字段)
|
||||
*/
|
||||
private Double goodsAmount;
|
||||
|
||||
/**
|
||||
* 折扣金额,单位:元,折扣金额=平台优惠+商家优惠+团长免单优惠金额
|
||||
*/
|
||||
private Double discountAmount;
|
||||
|
||||
/**
|
||||
* 支付金额,单位:元,支付金额=商品金额-折扣金额+邮费
|
||||
*/
|
||||
private Double payAmount;
|
||||
|
||||
/**
|
||||
* 邮费,单位:元
|
||||
*/
|
||||
private Double postage;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单备注标记,1-红色,2-黄色,3-绿色,4-蓝色,5-紫色
|
||||
*/
|
||||
private Integer remarkTag;
|
||||
|
||||
/**
|
||||
* 订单备注标记名称
|
||||
*/
|
||||
private String remarkTagName;
|
||||
|
||||
/**
|
||||
* 买家留言信息
|
||||
*/
|
||||
private String buyerMemo;
|
||||
|
||||
/**
|
||||
* 订单的更新时间
|
||||
*/
|
||||
private String updatedAt;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private String shippingTime;
|
||||
|
||||
/**
|
||||
* 快递单号
|
||||
*/
|
||||
private String trackingNumber;
|
||||
|
||||
/**
|
||||
* 物流公司
|
||||
*/
|
||||
private String trackingCompany;
|
||||
|
||||
/**
|
||||
* 支付方式,枚举值:QQ,WEIXIN,ALIPAY,LIANLIANPAY
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 支付单号
|
||||
*/
|
||||
private String payNo;
|
||||
|
||||
/**
|
||||
* 收件人地址,不拼接省市区
|
||||
*/
|
||||
private String receiverAddress;
|
||||
|
||||
/**
|
||||
* 收件人地址(打码)
|
||||
*/
|
||||
private String receiverAddressMask;
|
||||
|
||||
/**
|
||||
* 收件人姓名
|
||||
*/
|
||||
private String receiverName;
|
||||
|
||||
/**
|
||||
* 收件人电话
|
||||
*/
|
||||
private String receiverPhone;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String receiverPhoneMask;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String receiverNameMask;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String addressMask;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
private String town;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer townId;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 城市编码
|
||||
*/
|
||||
private Integer cityId;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer provinceId;
|
||||
|
||||
/**
|
||||
* 国家地区
|
||||
*/
|
||||
private String country;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer countryId;
|
||||
|
||||
/**
|
||||
* 订单创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private String payTime;
|
||||
|
||||
/**
|
||||
* 成交时间
|
||||
*/
|
||||
private String confirmTime;
|
||||
|
||||
/**
|
||||
* 确认收货时间
|
||||
*/
|
||||
private String receiveTime;
|
||||
|
||||
/**
|
||||
* 售后状态 0:无售后 2:买家申请退款,待商家处理 3:退货退款,待商家处理 4:商家同意退款,退款中 5:平台同意退款,退款中 6:驳回退款, 待买家处理 7:已同意退货退款,待用户发货 8:平台处理中 9:平台拒 绝退款,退款关闭 10:退款成功 11:买家撤销 12:买家逾期未处 理,退款失败 13:买家逾期,超过有效期 14 : 换货补寄待商家处理 15:换货补寄待用户处理 16:换货补寄成功 17:换货补寄失败 18:换货补寄待用户确认完成
|
||||
*/
|
||||
private Integer afterSalesStatus;
|
||||
|
||||
/**
|
||||
* 订单承诺发货时间
|
||||
*/
|
||||
private String lastShipTime;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* 是否当日发货,1-是,0-否
|
||||
*/
|
||||
private Integer deliveryOneDay;
|
||||
|
||||
/**
|
||||
* 是否多多批发,1-是,0-否
|
||||
*/
|
||||
private Integer duoduoWholesale;
|
||||
|
||||
/**
|
||||
* 送货入户并安装服务 0-不支持送货,1-送货入户不安装,2-送货入户并安装
|
||||
*/
|
||||
private Integer homeDeliveryType;
|
||||
|
||||
/**
|
||||
* 发票申请,1代表有 0代表无
|
||||
*/
|
||||
private Integer invoiceStatus;
|
||||
|
||||
/**
|
||||
* 是否为预售商品 1表示是 0表示否
|
||||
*/
|
||||
private Integer isPreSale;
|
||||
|
||||
/**
|
||||
* 是否缺货 0-无缺货处理 1: 有缺货处理
|
||||
*/
|
||||
private Integer isStockOut;
|
||||
|
||||
/**
|
||||
* 快递公司在拼多多的代码
|
||||
*/
|
||||
private Long logisticsId;
|
||||
|
||||
/**
|
||||
* 市场业务类型,0-普通订单,1-拼内购订单
|
||||
*/
|
||||
private Integer mktBizType;
|
||||
|
||||
/**
|
||||
* 只换不修,1:是,0:否
|
||||
*/
|
||||
private Integer onlySupportReplace;
|
||||
|
||||
/**
|
||||
* 订单改价折扣金额,单位元
|
||||
*/
|
||||
private Double orderChangeAmount;
|
||||
|
||||
/**
|
||||
* 预售时间
|
||||
*/
|
||||
private String preSaleTime;
|
||||
|
||||
/**
|
||||
* 退货包运费,1:是,0:否
|
||||
*/
|
||||
private Integer returnFreightPayer;
|
||||
|
||||
/**
|
||||
* 订单审核状态(0-正常订单, 1-审核中订单)
|
||||
*/
|
||||
private Integer riskControlStatus;
|
||||
|
||||
/**
|
||||
* 催发货时间
|
||||
*/
|
||||
private String urgeShippingTime;
|
||||
|
||||
/**
|
||||
* 0待确认,1已确认2已拦截-9未拉取
|
||||
*/
|
||||
private Integer auditStatus;
|
||||
|
||||
/**
|
||||
* 发货时间(仓库真实发货时间)
|
||||
*/
|
||||
private Date auditTime;
|
||||
|
||||
/**
|
||||
* 系统创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 系统更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
package com.qihang.oms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 拼多多订单明细表
|
||||
* @TableName oms_pdd_order_item
|
||||
*/
|
||||
@Data
|
||||
public class OmsPddOrderItem implements Serializable {
|
||||
/**
|
||||
* id,自增
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderSn;
|
||||
|
||||
/**
|
||||
* erp系统商品id
|
||||
*/
|
||||
private Integer erpGoodsId;
|
||||
|
||||
/**
|
||||
* erp系统商品规格id
|
||||
*/
|
||||
private Integer erpSpecId;
|
||||
|
||||
/**
|
||||
* 拼多多商品id
|
||||
*/
|
||||
private Long goodId;
|
||||
|
||||
/**
|
||||
* 拼多多商品skuid
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 商品图片
|
||||
*/
|
||||
private String goodsImg;
|
||||
|
||||
/**
|
||||
* 商品规格
|
||||
*/
|
||||
private String goodsSpec;
|
||||
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private Double goodsPrice;
|
||||
|
||||
/**
|
||||
* 商家外部编码(商品)
|
||||
*/
|
||||
private String outerGoodsId;
|
||||
|
||||
/**
|
||||
* 商家外部编码(sku)
|
||||
*/
|
||||
private String outerId;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private Integer goodsCount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 子订单金额
|
||||
*/
|
||||
private Double itemAmount;
|
||||
|
||||
/**
|
||||
* 是否礼品0否1是
|
||||
*/
|
||||
private Integer isGift;
|
||||
|
||||
/**
|
||||
* 已退货数量
|
||||
*/
|
||||
private Integer refundCount;
|
||||
|
||||
/**
|
||||
* 售后状态 1:无售后或售后关闭,2:售后处理中,3:退款中,4: 退款成功
|
||||
*/
|
||||
private Integer refundStatus;
|
||||
|
||||
/**
|
||||
* 内部店铺ID
|
||||
*/
|
||||
private Integer shopId;
|
||||
|
||||
/**
|
||||
* 系统创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 系统更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.oms.mapper;
|
||||
|
||||
import com.qihang.oms.domain.OmsDouGoodsSku;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_dou_goods_sku(抖店商品Sku表)】的数据库操作Mapper
|
||||
* @createDate 2024-06-13 17:52:03
|
||||
* @Entity com.qihang.oms.domain.OmsDouGoodsSku
|
||||
*/
|
||||
public interface OmsDouGoodsSkuMapper extends BaseMapper<OmsDouGoodsSku> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.oms.mapper;
|
||||
|
||||
import com.qihang.oms.domain.OmsDouOrderItem;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_dou_order_item(抖店订单明细表)】的数据库操作Mapper
|
||||
* @createDate 2024-06-13 17:52:03
|
||||
* @Entity com.qihang.oms.domain.OmsDouOrderItem
|
||||
*/
|
||||
public interface OmsDouOrderItemMapper extends BaseMapper<OmsDouOrderItem> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.oms.mapper;
|
||||
|
||||
import com.qihang.oms.domain.OmsDouOrder;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_dou_order(抖店订单表)】的数据库操作Mapper
|
||||
* @createDate 2024-06-13 17:52:03
|
||||
* @Entity com.qihang.oms.domain.OmsDouOrder
|
||||
*/
|
||||
public interface OmsDouOrderMapper extends BaseMapper<OmsDouOrder> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.oms.mapper;
|
||||
|
||||
import com.qihang.oms.domain.OmsPddGoodsSku;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_goods_sku(pdd商品SKU表)】的数据库操作Mapper
|
||||
* @createDate 2024-06-13 17:34:46
|
||||
* @Entity com.qihang.oms.domain.OmsPddGoodsSku
|
||||
*/
|
||||
public interface OmsPddGoodsSkuMapper extends BaseMapper<OmsPddGoodsSku> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.oms.mapper;
|
||||
|
||||
import com.qihang.oms.domain.OmsPddOrderItem;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order_item(拼多多订单明细表)】的数据库操作Mapper
|
||||
* @createDate 2024-06-13 17:34:46
|
||||
* @Entity com.qihang.oms.domain.OmsPddOrderItem
|
||||
*/
|
||||
public interface OmsPddOrderItemMapper extends BaseMapper<OmsPddOrderItem> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.oms.mapper;
|
||||
|
||||
import com.qihang.oms.domain.OmsPddOrder;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order(拼多多订单表)】的数据库操作Mapper
|
||||
* @createDate 2024-06-13 17:34:46
|
||||
* @Entity com.qihang.oms.domain.OmsPddOrder
|
||||
*/
|
||||
public interface OmsPddOrderMapper extends BaseMapper<OmsPddOrder> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -37,6 +37,15 @@ public class KafkaMQConsumer {
|
|||
}else if(vo.getShopType().getIndex() == EnumShopType.TAO.getIndex()) {
|
||||
logger.info("Kafka订单消息TAO"+vo.getKeyId());
|
||||
orderService.taoOrderMessage(vo.getKeyId());
|
||||
}else if(vo.getShopType().getIndex() == EnumShopType.PDD.getIndex()) {
|
||||
logger.info("Kafka订单消息PDD"+vo.getKeyId());
|
||||
orderService.pddOrderMessage(vo.getKeyId());
|
||||
} else if(vo.getShopType().getIndex() == EnumShopType.DOU.getIndex()) {
|
||||
logger.info("Kafka订单消息DOU"+vo.getKeyId());
|
||||
orderService.douOrderMessage(vo.getKeyId());
|
||||
} else if(vo.getShopType().getIndex() == EnumShopType.WEI.getIndex()) {
|
||||
logger.info("Kafka订单消息WEI"+vo.getKeyId());
|
||||
// orderService.weiOrderMessage(vo.getKeyId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ import java.util.List;
|
|||
public interface ErpSaleOrderService extends IService<ErpSaleOrder> {
|
||||
ResultVo<Integer> jdOrderMessage(String orderId);
|
||||
ResultVo<Integer> taoOrderMessage(String orderId);
|
||||
ResultVo<Integer> pddOrderMessage(String orderId);
|
||||
ResultVo<Integer> douOrderMessage(String orderId);
|
||||
|
||||
List<ErpSaleOrder> getList(ErpSaleOrder order);
|
||||
PageResult<ErpSaleOrder> queryPageList(ErpSaleOrder bo, PageQuery pageQuery);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.oms.service;
|
||||
|
||||
import com.qihang.oms.domain.OmsDouGoodsSku;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_dou_goods_sku(抖店商品Sku表)】的数据库操作Service
|
||||
* @createDate 2024-06-13 17:52:03
|
||||
*/
|
||||
public interface OmsDouGoodsSkuService extends IService<OmsDouGoodsSku> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.oms.service;
|
||||
|
||||
import com.qihang.oms.domain.OmsDouOrderItem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_dou_order_item(抖店订单明细表)】的数据库操作Service
|
||||
* @createDate 2024-06-13 17:52:03
|
||||
*/
|
||||
public interface OmsDouOrderItemService extends IService<OmsDouOrderItem> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.oms.service;
|
||||
|
||||
import com.qihang.oms.domain.OmsDouOrder;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_dou_order(抖店订单表)】的数据库操作Service
|
||||
* @createDate 2024-06-13 17:52:03
|
||||
*/
|
||||
public interface OmsDouOrderService extends IService<OmsDouOrder> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.oms.service;
|
||||
|
||||
import com.qihang.oms.domain.OmsPddGoodsSku;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_goods_sku(pdd商品SKU表)】的数据库操作Service
|
||||
* @createDate 2024-06-13 17:34:46
|
||||
*/
|
||||
public interface OmsPddGoodsSkuService extends IService<OmsPddGoodsSku> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.oms.service;
|
||||
|
||||
import com.qihang.oms.domain.OmsPddOrderItem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order_item(拼多多订单明细表)】的数据库操作Service
|
||||
* @createDate 2024-06-13 17:34:46
|
||||
*/
|
||||
public interface OmsPddOrderItemService extends IService<OmsPddOrderItem> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.oms.service;
|
||||
|
||||
import com.qihang.oms.domain.OmsPddOrder;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order(拼多多订单表)】的数据库操作Service
|
||||
* @createDate 2024-06-13 17:34:46
|
||||
*/
|
||||
public interface OmsPddOrderService extends IService<OmsPddOrder> {
|
||||
|
||||
}
|
||||
|
|
@ -42,6 +42,12 @@ public class ErpSaleOrderServiceImpl extends ServiceImpl<ErpSaleOrderMapper, Erp
|
|||
private final OmsTaoOrderMapper taoOrderMapper;
|
||||
private final OmsTaoOrderItemMapper taoOrderItemMapper;
|
||||
private final OmsTaoGoodsSkuMapper taoGoodsSkuMapper;
|
||||
private final OmsPddOrderMapper pddOrderMapper;
|
||||
private final OmsPddOrderItemMapper pddOrderItemMapper;
|
||||
private final OmsPddGoodsSkuMapper pddGoodsSkuMapper;
|
||||
private final OmsDouOrderMapper douOrderMapper;
|
||||
private final OmsDouOrderItemMapper douOrderItemMapper;
|
||||
private final OmsDouGoodsSkuMapper douGoodsSkuMapper;
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
|
|
@ -290,6 +296,353 @@ public class ErpSaleOrderServiceImpl extends ServiceImpl<ErpSaleOrderMapper, Erp
|
|||
return ResultVo.success();
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public ResultVo<Integer> pddOrderMessage(String orderId) {
|
||||
log.info("PDD订单消息处理"+orderId);
|
||||
List<OmsPddOrder> originOrders = pddOrderMapper.selectList(new LambdaQueryWrapper<OmsPddOrder>().eq(OmsPddOrder::getOrderSn, orderId));
|
||||
|
||||
if(originOrders == null || originOrders.size() == 0) {
|
||||
// 没有找到订单信息
|
||||
return ResultVo.error(ResultVoEnum.NotFound,"没有找到PDD原始订单:"+orderId);
|
||||
}
|
||||
OmsPddOrder originOrder = originOrders.get(0);
|
||||
List<ErpSaleOrder> oOrders = orderMapper.selectList(new LambdaQueryWrapper<ErpSaleOrder>().eq(ErpSaleOrder::getOrderNum, orderId));
|
||||
// List<OOrder> oOrders = orderMapper.selectList(new LambdaQueryWrapper<OOrder>().eq(OOrder::getOrderNum, orderId));
|
||||
if(oOrders == null || oOrders.isEmpty()) {
|
||||
// 新增订单
|
||||
ErpSaleOrder insert = new ErpSaleOrder();
|
||||
insert.setOrderNum(originOrder.getOrderSn());
|
||||
insert.setShopType(EnumShopType.PDD.getIndex());
|
||||
insert.setShopId(originOrder.getShopId());
|
||||
insert.setBuyerMemo(originOrder.getBuyerMemo());
|
||||
insert.setSellerMemo(originOrder.getRemark());
|
||||
// 状态 订单状态0:新订单,1:待发货,2:已发货,3:已完成,11已取消;12退款中;21待付款;22锁定,29删除
|
||||
int orderStatus = -1;
|
||||
int refundStatus = -1;
|
||||
if(originOrder.getRefundStatus()==1){
|
||||
// 没有售后
|
||||
orderStatus = originOrder.getOrderStatus();
|
||||
refundStatus = 1;
|
||||
}else{
|
||||
if(originOrder.getRefundStatus()==4){
|
||||
refundStatus=4;
|
||||
orderStatus = 11;
|
||||
}else{
|
||||
refundStatus=originOrder.getRefundStatus();
|
||||
orderStatus = 12;
|
||||
}
|
||||
}
|
||||
insert.setRefundStatus(refundStatus);
|
||||
insert.setOrderStatus(orderStatus);
|
||||
insert.setGoodsAmount(originOrder.getGoodsAmount());
|
||||
insert.setDiscountAmount(originOrder.getSellerDiscount());
|
||||
insert.setPostage(originOrder.getPostage());
|
||||
Double orderAmount =originOrder.getPayAmount();
|
||||
if(originOrder.getPlatformDiscount()!=null){
|
||||
orderAmount += originOrder.getPlatformDiscount();
|
||||
}
|
||||
insert.setAmount(orderAmount);
|
||||
|
||||
// insert.setPayment(originOrder.getPayAmount());
|
||||
insert.setReceiverName(originOrder.getReceiverNameMask());
|
||||
insert.setReceiverPhone(originOrder.getReceiverPhoneMask());
|
||||
insert.setAddress(originOrder.getReceiverAddressMask());
|
||||
insert.setProvince(originOrder.getProvince());
|
||||
insert.setCity(originOrder.getCity());
|
||||
insert.setTown(originOrder.getTown());
|
||||
insert.setOrderTime(DateUtils.parseDate(originOrder.getCreatedTime()));
|
||||
insert.setShipType(0);
|
||||
insert.setShipStatus(0);
|
||||
insert.setCreateTime(new Date());
|
||||
insert.setCreateBy("ORDER_MESSAGE");
|
||||
|
||||
orderMapper.insert(insert);
|
||||
// 插入orderItem
|
||||
addPddOrderItem(insert.getId(),originOrder.getOrderSn(), insert.getShopId(), orderStatus,refundStatus);
|
||||
|
||||
}else{
|
||||
// 修改订单 (修改:)
|
||||
ErpSaleOrder update = new ErpSaleOrder();
|
||||
update.setId(oOrders.get(0).getId());
|
||||
// 状态 订单状态0:新订单,1:待发货,2:已发货,3:已完成,11已取消;12退款中;21待付款;22锁定,29删除
|
||||
int orderStatus = -1;
|
||||
int refundStatus = -1;
|
||||
if(originOrder.getRefundStatus()==1){
|
||||
// 没有售后
|
||||
orderStatus = originOrder.getOrderStatus();
|
||||
refundStatus = 1;
|
||||
}else{
|
||||
if(originOrder.getRefundStatus()==4){
|
||||
refundStatus=4;
|
||||
orderStatus = 11;
|
||||
}else{
|
||||
refundStatus=originOrder.getRefundStatus();
|
||||
orderStatus = 12;
|
||||
}
|
||||
}
|
||||
update.setRefundStatus(refundStatus);
|
||||
update.setOrderStatus(orderStatus);
|
||||
// update.setGoodsAmount(originOrder.getGoodsAmount());
|
||||
// update.setPostFee(originOrder.getPostage());
|
||||
// update.setAmount(originOrder.getPayAmount());
|
||||
// update.setPayment(originOrder.getPayAmount());
|
||||
update.setReceiverName(originOrder.getReceiverNameMask());
|
||||
update.setReceiverPhone(originOrder.getReceiverPhoneMask());
|
||||
update.setAddress(originOrder.getReceiverAddressMask());
|
||||
|
||||
update.setUpdateTime(new Date());
|
||||
update.setUpdateBy("ORDER_MESSAGE");
|
||||
orderMapper.updateById(update);
|
||||
|
||||
// 删除orderItem
|
||||
orderItemMapper.delete(new LambdaQueryWrapper<ErpSaleOrderItem>().eq(ErpSaleOrderItem::getOrderId,update.getId()));
|
||||
// 插入orderItem
|
||||
addPddOrderItem(update.getId(),originOrder.getOrderSn(), oOrders.get(0).getShopId(), orderStatus,refundStatus);
|
||||
}
|
||||
return ResultVo.success();
|
||||
}
|
||||
|
||||
private void addPddOrderItem(String oOrderId,String orderSn,Integer shopId,Integer orderStatus,Integer refundStatus){
|
||||
List<OmsPddOrderItem> originOrderItems = pddOrderItemMapper.selectList(new LambdaQueryWrapper<OmsPddOrderItem>().eq(OmsPddOrderItem::getOrderSn, orderSn));
|
||||
if(originOrderItems!=null && originOrderItems.size()>0) {
|
||||
for (var item : originOrderItems) {
|
||||
ErpSaleOrderItem orderItem = new ErpSaleOrderItem();
|
||||
orderItem.setOrderId(Long.parseLong(oOrderId));
|
||||
orderItem.setOriginalOrderId(orderSn);
|
||||
orderItem.setOriginalOrderItemId(item.getId().toString());
|
||||
orderItem.setOriginalSkuId(item.getSkuId().toString());
|
||||
orderItem.setShopId(shopId);
|
||||
orderItem.setShipStatus(0);
|
||||
// 这里将订单商品skuid转换成erp系统的skuid
|
||||
Long erpGoodsId = 0L;
|
||||
Long erpSkuId = 0L;
|
||||
|
||||
List<OmsPddGoodsSku> pddGoodsSku = pddGoodsSkuMapper.selectList(new LambdaQueryWrapper<OmsPddGoodsSku>().eq(OmsPddGoodsSku::getSkuId, item.getSkuId()));
|
||||
if (pddGoodsSku != null && !pddGoodsSku.isEmpty()) {
|
||||
erpGoodsId = pddGoodsSku.get(0).getErpGoodsId();
|
||||
erpSkuId = pddGoodsSku.get(0).getErpGoodsSkuId();
|
||||
// orderItem.setGoodsImg(taoGoodsSku.get(0).getLogo());
|
||||
// orderItem.setGoodsSpec(jdGoodsSkus.get(0).getSkuName());
|
||||
// orderItem.setSkuNum(taoGoodsSku.get(0).getOuterId());
|
||||
}
|
||||
orderItem.setGoodsId(erpGoodsId);
|
||||
orderItem.setSpecId(erpSkuId);
|
||||
orderItem.setGoodsImg(item.getGoodsImg());
|
||||
orderItem.setGoodsSpec(item.getGoodsSpec());
|
||||
orderItem.setGoodsTitle(item.getGoodsName());
|
||||
orderItem.setGoodsPrice(item.getGoodsPrice());
|
||||
orderItem.setItemAmount(item.getGoodsPrice());
|
||||
orderItem.setQuantity(item.getGoodsCount());
|
||||
orderItem.setOrderStatus(orderStatus);
|
||||
orderItem.setRefundStatus(refundStatus);
|
||||
orderItem.setRefundCount(0);
|
||||
orderItem.setCreateTime(new Date());
|
||||
orderItem.setCreateBy("ORDER_MESSAGE");
|
||||
orderItemMapper.insert(orderItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public ResultVo<Integer> douOrderMessage(String orderId) {
|
||||
log.info("Dou订单消息处理"+orderId);
|
||||
List<OmsDouOrder> originOrders = douOrderMapper.selectList(new LambdaQueryWrapper<OmsDouOrder>().eq(OmsDouOrder::getOrderId, orderId));
|
||||
|
||||
if(originOrders == null || originOrders.size() == 0) {
|
||||
// 没有找到订单信息
|
||||
return ResultVo.error(ResultVoEnum.NotFound,"没有找到DOU原始订单:"+orderId);
|
||||
}
|
||||
OmsDouOrder originOrder = originOrders.get(0);
|
||||
|
||||
List<ErpSaleOrder> oOrders = orderMapper.selectList(new LambdaQueryWrapper<ErpSaleOrder>().eq(ErpSaleOrder::getOrderNum, orderId));
|
||||
// List<OOrder> oOrders = orderMapper.selectList(new LambdaQueryWrapper<OOrder>().eq(OOrder::getOrderNum, orderId));
|
||||
if(oOrders == null || oOrders.isEmpty()) {
|
||||
// 新增订单
|
||||
ErpSaleOrder insert = new ErpSaleOrder();
|
||||
insert.setOrderNum(originOrder.getOrderId());
|
||||
insert.setShopType(EnumShopType.DOU.getIndex());
|
||||
insert.setShopId(originOrder.getShopId().intValue());
|
||||
insert.setBuyerMemo(originOrder.getBuyerWords());
|
||||
insert.setSellerMemo(originOrder.getSellerWords());
|
||||
// 状态 订单状态0:新订单,1:待发货,2:已发货,3:已完成,11已取消;12退款中;21待付款;22锁定,29删除,101部分发货
|
||||
// 抖店订单状态 1 待确认/待支付(订单创建完毕)105 已支付 2 备货中 101 部分发货 3 已发货(全部发货)4 已取消 5 已完成(已收货)
|
||||
int orderStatus = -1;
|
||||
int refundStatus = -1;
|
||||
if(originOrder.getOrderStatus()==1){
|
||||
// 1待确认/待支付(订单创建完毕)
|
||||
orderStatus = 21;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==105){
|
||||
// 105 已支付
|
||||
orderStatus = 0;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==2){
|
||||
// 105 已支付
|
||||
orderStatus = 1;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==101){
|
||||
// 101 部分发货
|
||||
orderStatus = 101;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==3){
|
||||
// 3 已发货(全部发货)
|
||||
orderStatus = 2;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==4){
|
||||
// 4 已取消
|
||||
orderStatus = 11;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==5){
|
||||
// 5 已完成(已收货)
|
||||
orderStatus = 3;
|
||||
refundStatus = 1;
|
||||
}
|
||||
|
||||
insert.setRefundStatus(refundStatus);
|
||||
insert.setOrderStatus(orderStatus);
|
||||
|
||||
insert.setGoodsAmount(originOrder.getOrderAmount().doubleValue()/100);
|
||||
insert.setPostage(originOrder.getPostAmount().doubleValue()/100);
|
||||
insert.setAmount(originOrder.getOrderAmount().doubleValue()/100);
|
||||
// insert.setPayment(originOrder.getPayAmount().doubleValue()/100);
|
||||
insert.setReceiverName(originOrder.getMaskPostReceiver());
|
||||
insert.setReceiverPhone(originOrder.getMaskPostTel());
|
||||
insert.setAddress(originOrder.getMaskPostAddress());
|
||||
insert.setProvince(originOrder.getProvinceName());
|
||||
insert.setCity(originOrder.getCityName());
|
||||
insert.setTown(originOrder.getTownName());
|
||||
long time = originOrder.getCreateTime().longValue() * 1000;
|
||||
insert.setOrderTime(new Date(time));
|
||||
insert.setShipType(0);
|
||||
insert.setShipStatus(0);
|
||||
insert.setCreateTime(new Date());
|
||||
insert.setCreateBy("ORDER_MESSAGE");
|
||||
|
||||
orderMapper.insert(insert);
|
||||
// 插入orderItem
|
||||
addDouOrderItem(insert.getId(),originOrder.getOrderId(),insert.getShopId(),orderStatus,refundStatus);
|
||||
|
||||
}else{
|
||||
// 修改订单 (修改:)
|
||||
ErpSaleOrder update = new ErpSaleOrder();
|
||||
update.setId(oOrders.get(0).getId());
|
||||
// 状态 订单状态0:新订单,1:待发货,2:已发货,3:已完成,11已取消;12退款中;21待付款;22锁定,29删除,101部分发货
|
||||
// 抖店订单状态 1 待确认/待支付(订单创建完毕)105 已支付 2 备货中 101 部分发货 3 已发货(全部发货)4 已取消 5 已完成(已收货)
|
||||
int orderStatus = -1;
|
||||
int refundStatus = -1;
|
||||
if(originOrder.getOrderStatus()==1){
|
||||
// 1待确认/待支付(订单创建完毕)
|
||||
orderStatus = 21;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==105){
|
||||
// 105 已支付
|
||||
orderStatus = 0;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==2){
|
||||
// 105 已支付
|
||||
orderStatus = 1;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==101){
|
||||
// 101 部分发货
|
||||
orderStatus = 101;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==3){
|
||||
// 3 已发货(全部发货)
|
||||
orderStatus = 2;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==4){
|
||||
// 4 已取消
|
||||
orderStatus = 11;
|
||||
refundStatus = 1;
|
||||
}else if(originOrder.getOrderStatus()==5){
|
||||
// 5 已完成(已收货)
|
||||
orderStatus = 3;
|
||||
refundStatus = 1;
|
||||
}
|
||||
update.setRefundStatus(refundStatus);
|
||||
update.setOrderStatus(orderStatus);
|
||||
// long time = originOrder.getCreateTime().longValue() * 1000;
|
||||
// update.setOrderTime(new Date(time));
|
||||
// update.setGoodsAmount(originOrder.getOrderAmount().doubleValue()/100);
|
||||
// update.setPostFee(originOrder.getPostAmount().doubleValue()/100);
|
||||
// update.setAmount(originOrder.getOrderAmount().doubleValue()/100);
|
||||
// update.setPayment(originOrder.getPayAmount().doubleValue()/100);
|
||||
update.setReceiverName(originOrder.getMaskPostReceiver());
|
||||
update.setReceiverPhone(originOrder.getMaskPostTel());
|
||||
update.setAddress(originOrder.getMaskPostAddress());
|
||||
|
||||
|
||||
update.setUpdateTime(new Date());
|
||||
update.setUpdateBy("ORDER_MESSAGE");
|
||||
orderMapper.updateById(update);
|
||||
|
||||
// 删除orderItem
|
||||
orderItemMapper.delete(new LambdaQueryWrapper<ErpSaleOrderItem>().eq(ErpSaleOrderItem::getOrderId,update.getId()));
|
||||
// 插入orderItem
|
||||
addDouOrderItem(update.getId(),originOrder.getOrderId(),update.getShopId(),orderStatus,refundStatus);
|
||||
}
|
||||
return ResultVo.success();
|
||||
}
|
||||
private void addDouOrderItem(String oOrderId,String originOrderId,Integer shopId,Integer orderStatus,Integer refundStatus){
|
||||
List<OmsDouOrderItem> originOrderItems = douOrderItemMapper.selectList(new LambdaQueryWrapper<OmsDouOrderItem>().eq(OmsDouOrderItem::getParentOrderId, originOrderId));
|
||||
if(originOrderItems!=null && originOrderItems.size()>0) {
|
||||
for (var item : originOrderItems) {
|
||||
// OOrderItem orderItem = new OOrderItem();
|
||||
// orderItem.setOrderId(oOrderId);
|
||||
// orderItem.setOrderNum(item.getParentOrderId());
|
||||
// orderItem.setSubOrderNum(item.getOrderId());
|
||||
ErpSaleOrderItem orderItem = new ErpSaleOrderItem();
|
||||
orderItem.setOrderId(Long.parseLong(oOrderId));
|
||||
orderItem.setOriginalOrderId(item.getParentOrderId());
|
||||
orderItem.setOriginalOrderItemId(item.getOrderId());
|
||||
orderItem.setOriginalSkuId(item.getSkuId().toString());
|
||||
orderItem.setShopId(shopId);
|
||||
orderItem.setShipStatus(0);
|
||||
// 这里将订单商品skuid转换成erp系统的skuid
|
||||
Long erpGoodsId = 0L;
|
||||
Long erpSkuId = 0L;
|
||||
|
||||
OmsDouGoodsSku douGoodsSku = douGoodsSkuMapper.selectById(item.getSkuId());
|
||||
if (douGoodsSku != null ) {
|
||||
erpGoodsId = douGoodsSku.getErpGoodsId();
|
||||
erpSkuId = douGoodsSku.getErpGoodsSkuId();
|
||||
// orderItem.setGoodsImg(taoGoodsSku.get(0).getLogo());
|
||||
// orderItem.setGoodsSpec(jdGoodsSkus.get(0).getSkuName());
|
||||
// orderItem.setSkuNum(taoGoodsSku.get(0).getOuterId());
|
||||
}
|
||||
// List<DouGoodsSku> douGoodsSku = douGoodsSkuMapper.selectList(new LambdaQueryWrapper<DouGoodsSku>().eq(DouGoodsSku::getId, item.getSkuId()));
|
||||
// if (douGoodsSku != null && !douGoodsSku.isEmpty()) {
|
||||
// erpGoodsId = douGoodsSku.get(0).getOGoodsId();
|
||||
// erpSkuId = douGoodsSku.get(0).getOGoodsSkuId();
|
||||
//// orderItem.setGoodsImg(taoGoodsSku.get(0).getLogo());
|
||||
//// orderItem.setGoodsSpec(jdGoodsSkus.get(0).getSkuName());
|
||||
//// orderItem.setSkuNum(taoGoodsSku.get(0).getOuterId());
|
||||
// }
|
||||
|
||||
orderItem.setGoodsId(erpGoodsId);
|
||||
orderItem.setSpecId(erpSkuId);
|
||||
orderItem.setGoodsImg(item.getProductPic());
|
||||
if(org.springframework.util.StringUtils.hasText(item.getSpec())) {
|
||||
orderItem.setGoodsSpec(item.getSpec().length()>500?item.getSpec().substring(0,499):item.getSpec());
|
||||
}
|
||||
orderItem.setGoodsTitle(item.getProductName());
|
||||
orderItem.setGoodsPrice(item.getOriginAmount().doubleValue()/100);
|
||||
orderItem.setItemAmount(item.getOrderAmount().doubleValue()/100);
|
||||
orderItem.setQuantity(item.getItemNum());
|
||||
orderItem.setOrderStatus(orderStatus);
|
||||
orderItem.setRefundStatus(refundStatus);
|
||||
orderItem.setRefundCount(0);
|
||||
orderItem.setCreateTime(new Date());
|
||||
orderItem.setCreateBy("ORDER_MESSAGE");
|
||||
orderItemMapper.insert(orderItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ErpSaleOrder> getList(ErpSaleOrder order) {
|
||||
return orderMapper.selectList(new LambdaQueryWrapper<>());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.oms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.oms.domain.OmsDouGoodsSku;
|
||||
import com.qihang.oms.service.OmsDouGoodsSkuService;
|
||||
import com.qihang.oms.mapper.OmsDouGoodsSkuMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_dou_goods_sku(抖店商品Sku表)】的数据库操作Service实现
|
||||
* @createDate 2024-06-13 17:52:03
|
||||
*/
|
||||
@Service
|
||||
public class OmsDouGoodsSkuServiceImpl extends ServiceImpl<OmsDouGoodsSkuMapper, OmsDouGoodsSku>
|
||||
implements OmsDouGoodsSkuService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.oms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.oms.domain.OmsDouOrderItem;
|
||||
import com.qihang.oms.service.OmsDouOrderItemService;
|
||||
import com.qihang.oms.mapper.OmsDouOrderItemMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_dou_order_item(抖店订单明细表)】的数据库操作Service实现
|
||||
* @createDate 2024-06-13 17:52:03
|
||||
*/
|
||||
@Service
|
||||
public class OmsDouOrderItemServiceImpl extends ServiceImpl<OmsDouOrderItemMapper, OmsDouOrderItem>
|
||||
implements OmsDouOrderItemService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.oms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.oms.domain.OmsDouOrder;
|
||||
import com.qihang.oms.service.OmsDouOrderService;
|
||||
import com.qihang.oms.mapper.OmsDouOrderMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_dou_order(抖店订单表)】的数据库操作Service实现
|
||||
* @createDate 2024-06-13 17:52:03
|
||||
*/
|
||||
@Service
|
||||
public class OmsDouOrderServiceImpl extends ServiceImpl<OmsDouOrderMapper, OmsDouOrder>
|
||||
implements OmsDouOrderService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.oms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.oms.domain.OmsPddGoodsSku;
|
||||
import com.qihang.oms.service.OmsPddGoodsSkuService;
|
||||
import com.qihang.oms.mapper.OmsPddGoodsSkuMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_goods_sku(pdd商品SKU表)】的数据库操作Service实现
|
||||
* @createDate 2024-06-13 17:34:46
|
||||
*/
|
||||
@Service
|
||||
public class OmsPddGoodsSkuServiceImpl extends ServiceImpl<OmsPddGoodsSkuMapper, OmsPddGoodsSku>
|
||||
implements OmsPddGoodsSkuService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.oms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.oms.domain.OmsPddOrderItem;
|
||||
import com.qihang.oms.service.OmsPddOrderItemService;
|
||||
import com.qihang.oms.mapper.OmsPddOrderItemMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order_item(拼多多订单明细表)】的数据库操作Service实现
|
||||
* @createDate 2024-06-13 17:34:46
|
||||
*/
|
||||
@Service
|
||||
public class OmsPddOrderItemServiceImpl extends ServiceImpl<OmsPddOrderItemMapper, OmsPddOrderItem>
|
||||
implements OmsPddOrderItemService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.oms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.oms.domain.OmsPddOrder;
|
||||
import com.qihang.oms.service.OmsPddOrderService;
|
||||
import com.qihang.oms.mapper.OmsPddOrderMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order(拼多多订单表)】的数据库操作Service实现
|
||||
* @createDate 2024-06-13 17:34:46
|
||||
*/
|
||||
@Service
|
||||
public class OmsPddOrderServiceImpl extends ServiceImpl<OmsPddOrderMapper, OmsPddOrder>
|
||||
implements OmsPddOrderService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.qihang.oms.mapper.OmsDouGoodsSkuMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.oms.domain.OmsDouGoodsSku">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="productId" column="product_id" jdbcType="BIGINT"/>
|
||||
<result property="specId" column="spec_id" jdbcType="BIGINT"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="skuType" column="sku_type" jdbcType="INTEGER"/>
|
||||
<result property="skuStatus" column="sku_status" jdbcType="VARCHAR"/>
|
||||
<result property="outSkuId" column="out_sku_id" jdbcType="BIGINT"/>
|
||||
<result property="specDetailId1" column="spec_detail_id1" jdbcType="BIGINT"/>
|
||||
<result property="specDetailId2" column="spec_detail_id2" jdbcType="BIGINT"/>
|
||||
<result property="specDetailId3" column="spec_detail_id3" jdbcType="BIGINT"/>
|
||||
<result property="specDetailName1" column="spec_detail_name1" jdbcType="VARCHAR"/>
|
||||
<result property="specDetailName2" column="spec_detail_name2" jdbcType="VARCHAR"/>
|
||||
<result property="specDetailName3" column="spec_detail_name3" jdbcType="VARCHAR"/>
|
||||
<result property="price" column="price" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="INTEGER"/>
|
||||
<result property="stockNum" column="stock_num" jdbcType="INTEGER"/>
|
||||
<result property="preholdStockNum" column="prehold_stock_num" jdbcType="INTEGER"/>
|
||||
<result property="promStockNum" column="prom_stock_num" jdbcType="INTEGER"/>
|
||||
<result property="stepStockNum" column="step_stock_num" jdbcType="INTEGER"/>
|
||||
<result property="preholdStepStockNum" column="prehold_step_stock_num" jdbcType="INTEGER"/>
|
||||
<result property="promStepStockNum" column="prom_step_stock_num" jdbcType="INTEGER"/>
|
||||
<result property="normalStockNum" column="normal_stock_num" jdbcType="INTEGER"/>
|
||||
<result property="channelStockNum" column="channel_stock_num" jdbcType="INTEGER"/>
|
||||
<result property="sellProperties" column="sell_properties" jdbcType="VARCHAR"/>
|
||||
<result property="erpGoodsId" column="erp_goods_id" jdbcType="BIGINT"/>
|
||||
<result property="erpGoodsSkuId" column="erp_goods_sku_id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="img" column="img" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,product_id,spec_id,
|
||||
code,sku_type,sku_status,
|
||||
out_sku_id,spec_detail_id1,spec_detail_id2,
|
||||
spec_detail_id3,spec_detail_name1,spec_detail_name2,
|
||||
spec_detail_name3,price,create_time,
|
||||
stock_num,prehold_stock_num,prom_stock_num,
|
||||
step_stock_num,prehold_step_stock_num,prom_step_stock_num,
|
||||
normal_stock_num,channel_stock_num,sell_properties,
|
||||
erp_goods_id,erp_goods_sku_id,shop_id,
|
||||
name,img
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.qihang.oms.mapper.OmsDouOrderItemMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.oms.domain.OmsDouOrderItem">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="orderId" column="order_id" jdbcType="VARCHAR"/>
|
||||
<result property="parentOrderId" column="parent_order_id" jdbcType="VARCHAR"/>
|
||||
<result property="orderLevel" column="order_level" jdbcType="INTEGER"/>
|
||||
<result property="adEnvType" column="ad_env_type" jdbcType="VARCHAR"/>
|
||||
<result property="afterSaleStatus" column="after_sale_status" jdbcType="INTEGER"/>
|
||||
<result property="afterSaleType" column="after_sale_type" jdbcType="INTEGER"/>
|
||||
<result property="refundStatus" column="refund_status" jdbcType="INTEGER"/>
|
||||
<result property="authorCostAmount" column="author_cost_amount" jdbcType="INTEGER"/>
|
||||
<result property="authorId" column="author_id" jdbcType="INTEGER"/>
|
||||
<result property="authorName" column="author_name" jdbcType="VARCHAR"/>
|
||||
<result property="cBiz" column="c_biz" jdbcType="INTEGER"/>
|
||||
<result property="cBizDesc" column="c_biz_desc" jdbcType="VARCHAR"/>
|
||||
<result property="cancelReason" column="cancel_reason" jdbcType="VARCHAR"/>
|
||||
<result property="channelPaymentNo" column="channel_payment_no" jdbcType="VARCHAR"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="confirmReceiptTime" column="confirm_receipt_time" jdbcType="INTEGER"/>
|
||||
<result property="finishTime" column="finish_time" jdbcType="INTEGER"/>
|
||||
<result property="goodsPrice" column="goods_price" jdbcType="INTEGER"/>
|
||||
<result property="goodsType" column="goods_type" jdbcType="INTEGER"/>
|
||||
<result property="isComment" column="is_comment" jdbcType="INTEGER"/>
|
||||
<result property="itemNum" column="item_num" jdbcType="INTEGER"/>
|
||||
<result property="logisticsReceiptTime" column="logistics_receipt_time" jdbcType="INTEGER"/>
|
||||
<result property="modifyAmount" column="modify_amount" jdbcType="INTEGER"/>
|
||||
<result property="modifyPostAmount" column="modify_post_amount" jdbcType="INTEGER"/>
|
||||
<result property="onlyPlatformCostAmount" column="only_platform_cost_amount" jdbcType="INTEGER"/>
|
||||
<result property="orderAmount" column="order_amount" jdbcType="INTEGER"/>
|
||||
<result property="payAmount" column="pay_amount" jdbcType="INTEGER"/>
|
||||
<result property="postInsuranceAmount" column="post_insurance_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionAmount" column="promotion_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionShopAmount" column="promotion_shop_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionPlatformAmount" column="promotion_platform_amount" jdbcType="INTEGER"/>
|
||||
<result property="shopCostAmount" column="shop_cost_amount" jdbcType="INTEGER"/>
|
||||
<result property="platformCostAmount" column="platform_cost_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionTalentAmount" column="promotion_talent_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionPayAmount" column="promotion_pay_amount" jdbcType="INTEGER"/>
|
||||
<result property="originAmount" column="origin_amount" jdbcType="INTEGER"/>
|
||||
<result property="outProductId" column="out_product_id" jdbcType="VARCHAR"/>
|
||||
<result property="outSkuId" column="out_sku_id" jdbcType="VARCHAR"/>
|
||||
<result property="productId" column="product_id" jdbcType="BIGINT"/>
|
||||
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
||||
<result property="productName" column="product_name" jdbcType="VARCHAR"/>
|
||||
<result property="productPic" column="product_pic" jdbcType="VARCHAR"/>
|
||||
<result property="promotionRedpackAmount" column="promotion_redpack_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionRedpackPlatformAmount" column="promotion_redpack_platform_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionRedpackTalentAmount" column="promotion_redpack_talent_amount" jdbcType="INTEGER"/>
|
||||
<result property="roomId" column="room_id" jdbcType="INTEGER"/>
|
||||
<result property="shipTime" column="ship_time" jdbcType="INTEGER"/>
|
||||
<result property="spec" column="spec" jdbcType="VARCHAR"/>
|
||||
<result property="themeTypeDesc" column="theme_type_desc" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="INTEGER"/>
|
||||
<result property="videoId" column="video_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,order_id,parent_order_id,
|
||||
order_level,ad_env_type,after_sale_status,
|
||||
after_sale_type,refund_status,author_cost_amount,
|
||||
author_id,author_name,c_biz,
|
||||
c_biz_desc,cancel_reason,channel_payment_no,
|
||||
code,confirm_receipt_time,finish_time,
|
||||
goods_price,goods_type,is_comment,
|
||||
item_num,logistics_receipt_time,modify_amount,
|
||||
modify_post_amount,only_platform_cost_amount,order_amount,
|
||||
pay_amount,post_insurance_amount,promotion_amount,
|
||||
promotion_shop_amount,promotion_platform_amount,shop_cost_amount,
|
||||
platform_cost_amount,promotion_talent_amount,promotion_pay_amount,
|
||||
origin_amount,out_product_id,out_sku_id,
|
||||
product_id,sku_id,product_name,
|
||||
product_pic,promotion_redpack_amount,promotion_redpack_platform_amount,
|
||||
promotion_redpack_talent_amount,room_id,ship_time,
|
||||
spec,theme_type_desc,update_time,
|
||||
create_time,video_id
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.qihang.oms.mapper.OmsDouOrderMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.oms.domain.OmsDouOrder">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="orderId" column="order_id" jdbcType="VARCHAR"/>
|
||||
<result property="orderLevel" column="order_level" jdbcType="INTEGER"/>
|
||||
<result property="orderPhaseList" column="order_phase_list" jdbcType="VARCHAR"/>
|
||||
<result property="orderStatus" column="order_status" jdbcType="INTEGER"/>
|
||||
<result property="orderStatusDesc" column="order_status_desc" jdbcType="VARCHAR"/>
|
||||
<result property="orderTag" column="order_tag" jdbcType="VARCHAR"/>
|
||||
<result property="orderType" column="order_type" jdbcType="INTEGER"/>
|
||||
<result property="orderTypeDesc" column="order_type_desc" jdbcType="VARCHAR"/>
|
||||
<result property="appId" column="app_id" jdbcType="INTEGER"/>
|
||||
<result property="openId" column="open_id" jdbcType="VARCHAR"/>
|
||||
<result property="acceptOrderStatus" column="accept_order_status" jdbcType="INTEGER"/>
|
||||
<result property="appointmentShipTime" column="appointment_ship_time" jdbcType="INTEGER"/>
|
||||
<result property="authorCostAmount" column="author_cost_amount" jdbcType="INTEGER"/>
|
||||
<result property="awemeId" column="aweme_id" jdbcType="VARCHAR"/>
|
||||
<result property="bType" column="b_type" jdbcType="INTEGER"/>
|
||||
<result property="bTypeDesc" column="b_type_desc" jdbcType="VARCHAR"/>
|
||||
<result property="subBType" column="sub_b_type" jdbcType="INTEGER"/>
|
||||
<result property="subBTypeDesc" column="sub_b_type_desc" jdbcType="VARCHAR"/>
|
||||
<result property="biz" column="biz" jdbcType="INTEGER"/>
|
||||
<result property="bizDesc" column="biz_desc" jdbcType="VARCHAR"/>
|
||||
<result property="buyerWords" column="buyer_words" jdbcType="VARCHAR"/>
|
||||
<result property="sellerWords" column="seller_words" jdbcType="VARCHAR"/>
|
||||
<result property="sellerRemarkStars" column="seller_remark_stars" jdbcType="INTEGER"/>
|
||||
<result property="cancelReason" column="cancel_reason" jdbcType="VARCHAR"/>
|
||||
<result property="channelPaymentNo" column="channel_payment_no" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="INTEGER"/>
|
||||
<result property="payTime" column="pay_time" jdbcType="INTEGER"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="INTEGER"/>
|
||||
<result property="finishTime" column="finish_time" jdbcType="INTEGER"/>
|
||||
<result property="orderExpireTime" column="order_expire_time" jdbcType="INTEGER"/>
|
||||
<result property="doudianOpenId" column="doudian_open_id" jdbcType="VARCHAR"/>
|
||||
<result property="encryptPostReceiver" column="encrypt_post_receiver" jdbcType="VARCHAR"/>
|
||||
<result property="encryptPostTel" column="encrypt_post_tel" jdbcType="VARCHAR"/>
|
||||
<result property="encryptPostAddress" column="encrypt_post_address" jdbcType="VARCHAR"/>
|
||||
<result property="expShipTime" column="exp_ship_time" jdbcType="INTEGER"/>
|
||||
<result property="logisticsInfo" column="logistics_info" jdbcType="VARCHAR"/>
|
||||
<result property="mainStatus" column="main_status" jdbcType="INTEGER"/>
|
||||
<result property="mainStatusDesc" column="main_status_desc" jdbcType="VARCHAR"/>
|
||||
<result property="maskPostReceiver" column="mask_post_receiver" jdbcType="VARCHAR"/>
|
||||
<result property="maskPostTel" column="mask_post_tel" jdbcType="VARCHAR"/>
|
||||
<result property="maskPostAddress" column="mask_post_address" jdbcType="VARCHAR"/>
|
||||
<result property="provinceName" column="province_name" jdbcType="VARCHAR"/>
|
||||
<result property="provinceId" column="province_id" jdbcType="INTEGER"/>
|
||||
<result property="cityName" column="city_name" jdbcType="VARCHAR"/>
|
||||
<result property="cityId" column="city_id" jdbcType="INTEGER"/>
|
||||
<result property="townName" column="town_name" jdbcType="VARCHAR"/>
|
||||
<result property="townId" column="town_id" jdbcType="INTEGER"/>
|
||||
<result property="streetName" column="street_name" jdbcType="VARCHAR"/>
|
||||
<result property="streetId" column="street_id" jdbcType="INTEGER"/>
|
||||
<result property="openAddressId" column="open_address_id" jdbcType="VARCHAR"/>
|
||||
<result property="modifyAmount" column="modify_amount" jdbcType="INTEGER"/>
|
||||
<result property="modifyPostAmount" column="modify_post_amount" jdbcType="INTEGER"/>
|
||||
<result property="onlyPlatformCostAmount" column="only_platform_cost_amount" jdbcType="INTEGER"/>
|
||||
<result property="orderAmount" column="order_amount" jdbcType="INTEGER"/>
|
||||
<result property="payAmount" column="pay_amount" jdbcType="INTEGER"/>
|
||||
<result property="payType" column="pay_type" jdbcType="INTEGER"/>
|
||||
<result property="postAmount" column="post_amount" jdbcType="INTEGER"/>
|
||||
<result property="postInsuranceAmount" column="post_insurance_amount" jdbcType="INTEGER"/>
|
||||
<result property="postOriginAmount" column="post_origin_amount" jdbcType="INTEGER"/>
|
||||
<result property="postPromotionAmount" column="post_promotion_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionAmount" column="promotion_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionPayAmount" column="promotion_pay_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionPlatformAmount" column="promotion_platform_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionRedpackAmount" column="promotion_redpack_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionRedpackPlatformAmount" column="promotion_redpack_platform_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionRedpackTalentAmount" column="promotion_redpack_talent_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionShopAmount" column="promotion_shop_amount" jdbcType="INTEGER"/>
|
||||
<result property="promotionTalentAmount" column="promotion_talent_amount" jdbcType="INTEGER"/>
|
||||
<result property="shipTime" column="ship_time" jdbcType="INTEGER"/>
|
||||
<result property="shopCostAmount" column="shop_cost_amount" jdbcType="INTEGER"/>
|
||||
<result property="platformCostAmount" column="platform_cost_amount" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
|
||||
<result property="shopName" column="shop_name" jdbcType="VARCHAR"/>
|
||||
<result property="totalPromotionAmount" column="total_promotion_amount" jdbcType="INTEGER"/>
|
||||
<result property="userTagUi" column="user_tag_ui" jdbcType="VARCHAR"/>
|
||||
<result property="sShopId" column="s_shop_id" jdbcType="INTEGER"/>
|
||||
<result property="pullTime" column="pull_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="lastPullTime" column="last_pull_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="auditStatus" column="audit_status" jdbcType="INTEGER"/>
|
||||
<result property="auditTime" column="audit_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,order_id,order_level,
|
||||
order_phase_list,order_status,order_status_desc,
|
||||
order_tag,order_type,order_type_desc,
|
||||
app_id,open_id,accept_order_status,
|
||||
appointment_ship_time,author_cost_amount,aweme_id,
|
||||
b_type,b_type_desc,sub_b_type,
|
||||
sub_b_type_desc,biz,biz_desc,
|
||||
buyer_words,seller_words,seller_remark_stars,
|
||||
cancel_reason,channel_payment_no,create_time,
|
||||
pay_time,update_time,finish_time,
|
||||
order_expire_time,doudian_open_id,encrypt_post_receiver,
|
||||
encrypt_post_tel,encrypt_post_address,exp_ship_time,
|
||||
logistics_info,main_status,main_status_desc,
|
||||
mask_post_receiver,mask_post_tel,mask_post_address,
|
||||
province_name,province_id,city_name,
|
||||
city_id,town_name,town_id,
|
||||
street_name,street_id,open_address_id,
|
||||
modify_amount,modify_post_amount,only_platform_cost_amount,
|
||||
order_amount,pay_amount,pay_type,
|
||||
post_amount,post_insurance_amount,post_origin_amount,
|
||||
post_promotion_amount,promotion_amount,promotion_pay_amount,
|
||||
promotion_platform_amount,promotion_redpack_amount,promotion_redpack_platform_amount,
|
||||
promotion_redpack_talent_amount,promotion_shop_amount,promotion_talent_amount,
|
||||
ship_time,shop_cost_amount,platform_cost_amount,
|
||||
shop_id,shop_name,total_promotion_amount,
|
||||
user_tag_ui,s_shop_id,pull_time,
|
||||
last_pull_time,audit_status,audit_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.qihang.oms.mapper.OmsPddGoodsSkuMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.oms.domain.OmsPddGoodsSku">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
||||
<result property="goodsId" column="goods_id" jdbcType="BIGINT"/>
|
||||
<result property="goodsName" column="goods_name" jdbcType="VARCHAR"/>
|
||||
<result property="thumbUrl" column="thumb_url" jdbcType="VARCHAR"/>
|
||||
<result property="outerId" column="outer_id" jdbcType="VARCHAR"/>
|
||||
<result property="skuQuantity" column="sku_quantity" jdbcType="BIGINT"/>
|
||||
<result property="spec" column="spec" jdbcType="VARCHAR"/>
|
||||
<result property="isSkuOnsale" column="is_sku_onsale" jdbcType="INTEGER"/>
|
||||
<result property="erpGoodsId" column="erp_goods_id" jdbcType="BIGINT"/>
|
||||
<result property="erpGoodsSkuId" column="erp_goods_sku_id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,sku_id,goods_id,
|
||||
goods_name,thumb_url,outer_id,
|
||||
sku_quantity,spec,is_sku_onsale,
|
||||
erp_goods_id,erp_goods_sku_id,shop_id,
|
||||
create_time,update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.qihang.oms.mapper.OmsPddOrderItemMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.oms.domain.OmsPddOrderItem">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="orderId" column="order_id" jdbcType="BIGINT"/>
|
||||
<result property="orderSn" column="order_sn" jdbcType="VARCHAR"/>
|
||||
<result property="erpGoodsId" column="erp_goods_id" jdbcType="INTEGER"/>
|
||||
<result property="erpSpecId" column="erp_spec_id" jdbcType="INTEGER"/>
|
||||
<result property="goodId" column="good_id" jdbcType="BIGINT"/>
|
||||
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
||||
<result property="goodsName" column="goods_name" jdbcType="VARCHAR"/>
|
||||
<result property="goodsImg" column="goods_img" jdbcType="VARCHAR"/>
|
||||
<result property="goodsSpec" column="goods_spec" jdbcType="VARCHAR"/>
|
||||
<result property="goodsPrice" column="goods_price" jdbcType="DOUBLE"/>
|
||||
<result property="outerGoodsId" column="outer_goods_id" jdbcType="VARCHAR"/>
|
||||
<result property="outerId" column="outer_id" jdbcType="VARCHAR"/>
|
||||
<result property="goodsCount" column="goods_count" jdbcType="INTEGER"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="itemAmount" column="item_amount" jdbcType="DOUBLE"/>
|
||||
<result property="isGift" column="is_gift" jdbcType="TINYINT"/>
|
||||
<result property="refundCount" column="refund_count" jdbcType="INTEGER"/>
|
||||
<result property="refundStatus" column="refund_status" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,order_id,order_sn,
|
||||
erp_goods_id,erp_spec_id,good_id,
|
||||
sku_id,goods_name,goods_img,
|
||||
goods_spec,goods_price,outer_goods_id,
|
||||
outer_id,goods_count,remark,
|
||||
item_amount,is_gift,refund_count,
|
||||
refund_status,shop_id,create_time,
|
||||
update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.qihang.oms.mapper.OmsPddOrderMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.oms.domain.OmsPddOrder">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="orderSn" column="order_sn" jdbcType="VARCHAR"/>
|
||||
<result property="tradeType" column="trade_type" jdbcType="INTEGER"/>
|
||||
<result property="freeSf" column="free_sf" jdbcType="INTEGER"/>
|
||||
<result property="isLuckyFlag" column="is_lucky_flag" jdbcType="INTEGER"/>
|
||||
<result property="groupStatus" column="group_status" jdbcType="INTEGER"/>
|
||||
<result property="confirmStatus" column="confirm_status" jdbcType="INTEGER"/>
|
||||
<result property="orderStatus" column="order_status" jdbcType="INTEGER"/>
|
||||
<result property="refundStatus" column="refund_status" jdbcType="INTEGER"/>
|
||||
<result property="capitalFreeDiscount" column="capital_free_discount" jdbcType="DOUBLE"/>
|
||||
<result property="sellerDiscount" column="seller_discount" jdbcType="DOUBLE"/>
|
||||
<result property="platformDiscount" column="platform_discount" jdbcType="DOUBLE"/>
|
||||
<result property="goodsAmount" column="goods_amount" jdbcType="DOUBLE"/>
|
||||
<result property="discountAmount" column="discount_amount" jdbcType="DOUBLE"/>
|
||||
<result property="payAmount" column="pay_amount" jdbcType="DOUBLE"/>
|
||||
<result property="postage" column="postage" jdbcType="DOUBLE"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="remarkTag" column="remark_tag" jdbcType="INTEGER"/>
|
||||
<result property="remarkTagName" column="remark_tag_name" jdbcType="VARCHAR"/>
|
||||
<result property="buyerMemo" column="buyer_memo" jdbcType="VARCHAR"/>
|
||||
<result property="updatedAt" column="updated_at" jdbcType="VARCHAR"/>
|
||||
<result property="shippingTime" column="shipping_time" jdbcType="VARCHAR"/>
|
||||
<result property="trackingNumber" column="tracking_number" jdbcType="VARCHAR"/>
|
||||
<result property="trackingCompany" column="tracking_company" jdbcType="VARCHAR"/>
|
||||
<result property="payType" column="pay_type" jdbcType="VARCHAR"/>
|
||||
<result property="payNo" column="pay_no" jdbcType="VARCHAR"/>
|
||||
<result property="receiverAddress" column="receiver_address" jdbcType="VARCHAR"/>
|
||||
<result property="receiverAddressMask" column="receiver_address_mask" jdbcType="VARCHAR"/>
|
||||
<result property="receiverName" column="receiver_name" jdbcType="VARCHAR"/>
|
||||
<result property="receiverPhone" column="receiver_phone" jdbcType="VARCHAR"/>
|
||||
<result property="receiverPhoneMask" column="receiver_phone_mask" jdbcType="VARCHAR"/>
|
||||
<result property="receiverNameMask" column="receiver_name_mask" jdbcType="VARCHAR"/>
|
||||
<result property="addressMask" column="address_mask" jdbcType="VARCHAR"/>
|
||||
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||
<result property="town" column="town" jdbcType="VARCHAR"/>
|
||||
<result property="townId" column="town_id" jdbcType="INTEGER"/>
|
||||
<result property="city" column="city" jdbcType="VARCHAR"/>
|
||||
<result property="cityId" column="city_id" jdbcType="INTEGER"/>
|
||||
<result property="province" column="province" jdbcType="VARCHAR"/>
|
||||
<result property="provinceId" column="province_id" jdbcType="INTEGER"/>
|
||||
<result property="country" column="country" jdbcType="VARCHAR"/>
|
||||
<result property="countryId" column="country_id" jdbcType="INTEGER"/>
|
||||
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="payTime" column="pay_time" jdbcType="VARCHAR"/>
|
||||
<result property="confirmTime" column="confirm_time" jdbcType="VARCHAR"/>
|
||||
<result property="receiveTime" column="receive_time" jdbcType="VARCHAR"/>
|
||||
<result property="afterSalesStatus" column="after_sales_status" jdbcType="INTEGER"/>
|
||||
<result property="lastShipTime" column="last_ship_time" jdbcType="VARCHAR"/>
|
||||
<result property="tag" column="tag" jdbcType="VARCHAR"/>
|
||||
<result property="deliveryOneDay" column="delivery_one_day" jdbcType="INTEGER"/>
|
||||
<result property="duoduoWholesale" column="duoduo_wholesale" jdbcType="INTEGER"/>
|
||||
<result property="homeDeliveryType" column="home_delivery_type" jdbcType="INTEGER"/>
|
||||
<result property="invoiceStatus" column="invoice_status" jdbcType="INTEGER"/>
|
||||
<result property="isPreSale" column="is_pre_sale" jdbcType="INTEGER"/>
|
||||
<result property="isStockOut" column="is_stock_out" jdbcType="INTEGER"/>
|
||||
<result property="logisticsId" column="logistics_id" jdbcType="BIGINT"/>
|
||||
<result property="mktBizType" column="mkt_biz_type" jdbcType="INTEGER"/>
|
||||
<result property="onlySupportReplace" column="only_support_replace" jdbcType="INTEGER"/>
|
||||
<result property="orderChangeAmount" column="order_change_amount" jdbcType="DOUBLE"/>
|
||||
<result property="preSaleTime" column="pre_sale_time" jdbcType="VARCHAR"/>
|
||||
<result property="returnFreightPayer" column="return_freight_payer" jdbcType="INTEGER"/>
|
||||
<result property="riskControlStatus" column="risk_control_status" jdbcType="INTEGER"/>
|
||||
<result property="urgeShippingTime" column="urge_shipping_time" jdbcType="VARCHAR"/>
|
||||
<result property="auditStatus" column="audit_status" jdbcType="INTEGER"/>
|
||||
<result property="auditTime" column="audit_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,shop_id,order_sn,
|
||||
trade_type,free_sf,is_lucky_flag,
|
||||
group_status,confirm_status,order_status,
|
||||
refund_status,capital_free_discount,seller_discount,
|
||||
platform_discount,goods_amount,discount_amount,
|
||||
pay_amount,postage,remark,
|
||||
remark_tag,remark_tag_name,buyer_memo,
|
||||
updated_at,shipping_time,tracking_number,
|
||||
tracking_company,pay_type,pay_no,
|
||||
receiver_address,receiver_address_mask,receiver_name,
|
||||
receiver_phone,receiver_phone_mask,receiver_name_mask,
|
||||
address_mask,address,town,
|
||||
town_id,city,city_id,
|
||||
province,province_id,country,
|
||||
country_id,created_time,pay_time,
|
||||
confirm_time,receive_time,after_sales_status,
|
||||
last_ship_time,tag,delivery_one_day,
|
||||
duoduo_wholesale,home_delivery_type,invoice_status,
|
||||
is_pre_sale,is_stock_out,logistics_id,
|
||||
mkt_biz_type,only_support_replace,order_change_amount,
|
||||
pre_sale_time,return_freight_payer,risk_control_status,
|
||||
urge_shipping_time,audit_status,audit_time,
|
||||
create_time,update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,100 +1,52 @@
|
|||
//package com.qihang.pdd.controller;
|
||||
//
|
||||
//
|
||||
//import com.qihang.common.common.TableDataInfo;
|
||||
//import com.qihang.security.common.BaseController;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||
//import org.springframework.web.bind.annotation.RequestMethod;
|
||||
//import org.springframework.web.bind.annotation.RestController;
|
||||
//
|
||||
///**
|
||||
// * 拼多多订单Controller
|
||||
// *
|
||||
// * @author qihang
|
||||
// * @date 2024-01-02
|
||||
// */
|
||||
//@AllArgsConstructor
|
||||
//@RestController
|
||||
//@RequestMapping("/order")
|
||||
//public class PddOrderController extends BaseController
|
||||
//{
|
||||
//
|
||||
// private final OmsPddOrderService orderService;
|
||||
// @RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
// public TableDataInfo orderList(OmsPddOrder bo, PageQuery pageQuery) {
|
||||
// PageResult<OmsPddOrder> result = orderService.queryPageList(bo, pageQuery);
|
||||
//
|
||||
// return getDataTable(result);
|
||||
// }
|
||||
//// @Autowired
|
||||
//// private IPddOrderService pddOrderService;
|
||||
////
|
||||
//// /**
|
||||
//// * 查询拼多多订单列表
|
||||
//// */
|
||||
//// @PreAuthorize("@ss.hasPermi('pdd:order:list')")
|
||||
//// @GetMapping("/list")
|
||||
//// public TableDataInfo list(PddOrder pddOrder)
|
||||
//// {
|
||||
//// startPage();
|
||||
//// List<PddOrder> list = pddOrderService.selectPddOrderList(pddOrder);
|
||||
//// return getDataTable(list);
|
||||
//// }
|
||||
////
|
||||
//// /**
|
||||
//// * 导出拼多多订单列表
|
||||
//// */
|
||||
//// @PreAuthorize("@ss.hasPermi('pdd:order:export')")
|
||||
//// @Log(title = "拼多多订单", businessType = BusinessType.EXPORT)
|
||||
//// @PostMapping("/export")
|
||||
//// public void export(HttpServletResponse response, PddOrder pddOrder)
|
||||
//// {
|
||||
//// List<PddOrder> list = pddOrderService.selectPddOrderList(pddOrder);
|
||||
//// ExcelUtil<PddOrder> util = new ExcelUtil<PddOrder>(PddOrder.class);
|
||||
//// util.exportExcel(response, list, "拼多多订单数据");
|
||||
//// }
|
||||
////
|
||||
//// /**
|
||||
//// * 获取拼多多订单详细信息
|
||||
//// */
|
||||
//// @PreAuthorize("@ss.hasPermi('pdd:order:query')")
|
||||
//// @GetMapping(value = "/{id}")
|
||||
//// public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
//// {
|
||||
//// return success(pddOrderService.selectPddOrderById(id));
|
||||
//// }
|
||||
////
|
||||
//// /**
|
||||
//// * 新增拼多多订单
|
||||
//// */
|
||||
//// @PreAuthorize("@ss.hasPermi('pdd:order:add')")
|
||||
//// @Log(title = "拼多多订单", businessType = BusinessType.INSERT)
|
||||
//// @PostMapping
|
||||
//// public AjaxResult add(@RequestBody PddOrder pddOrder)
|
||||
//// {
|
||||
//// Integer result = pddOrderService.insertPddOrder(pddOrder);
|
||||
//// if(result == -1) return new AjaxResult(505,"订单号已存在");
|
||||
//// else if(result == -2) return new AjaxResult(506,"请添加商品");
|
||||
//// else if(result == -3) return new AjaxResult(507,"商品数据错误");
|
||||
//// return toAjax(result);
|
||||
//// }
|
||||
////
|
||||
//// @Log(title = "拼多多订单", businessType = BusinessType.UPDATE)
|
||||
//// @PostMapping("/confirm")
|
||||
//// public AjaxResult confirmOrder(@RequestBody PddOrder pddOrder)
|
||||
//// {
|
||||
//// pddOrder.setUpdateBy(getUsername());
|
||||
//// Integer result = pddOrderService.confirmOrder(pddOrder);
|
||||
//// if(result == -1) return new AjaxResult(505,"订单不存在");
|
||||
//// else if(result == -2) return new AjaxResult(506,"订单已确认过了");
|
||||
//// else if(result == -3) return new AjaxResult(507,"订单售后中!无法操作!");
|
||||
//// else if(result == -4) return new AjaxResult(508,"订单号确认过了!请检查订单号是否正确!");
|
||||
//// else if(result == -5) return new AjaxResult(509,"不支持的发货方式!");
|
||||
//// else if(result == -11) return new AjaxResult(511,"商品SKU编码不存在!");
|
||||
//// else if(result == -12) return new AjaxResult(512,"商品信息不存在!");
|
||||
//// return toAjax(result);
|
||||
//// }
|
||||
////
|
||||
//
|
||||
//}
|
||||
package com.qihang.pdd.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.qihang.common.common.AjaxResult;
|
||||
import com.qihang.common.common.PageQuery;
|
||||
import com.qihang.common.common.PageResult;
|
||||
import com.qihang.common.common.TableDataInfo;
|
||||
import com.qihang.common.enums.EnumShopType;
|
||||
import com.qihang.common.mq.MqMessage;
|
||||
import com.qihang.common.mq.MqType;
|
||||
import com.qihang.pdd.domain.OmsPddOrder;
|
||||
import com.qihang.pdd.domain.bo.PddOrderPushBo;
|
||||
import com.qihang.pdd.service.OmsPddOrderService;
|
||||
import com.qihang.security.common.BaseController;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.kafka.core.KafkaTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 拼多多订单Controller
|
||||
*
|
||||
* @author qihang
|
||||
* @date 2024-01-02
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/order")
|
||||
public class PddOrderController extends BaseController
|
||||
{
|
||||
private final KafkaTemplate<String,Object> kafkaTemplate;
|
||||
private final OmsPddOrderService orderService;
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public TableDataInfo orderList(OmsPddOrder bo, PageQuery pageQuery) {
|
||||
PageResult<OmsPddOrder> result = orderService.queryPageList(bo, pageQuery);
|
||||
|
||||
return getDataTable(result);
|
||||
}
|
||||
@PostMapping("/push_oms")
|
||||
@ResponseBody
|
||||
public AjaxResult pushOms(@RequestBody PddOrderPushBo bo) {
|
||||
// TODO:需要优化消息格式
|
||||
if(bo!=null && bo.getIds()!=null) {
|
||||
for(String id: bo.getIds()) {
|
||||
kafkaTemplate.send(MqType.ORDER_MQ, JSONObject.toJSONString(MqMessage.build(EnumShopType.PDD, MqType.ORDER_MESSAGE,id)));
|
||||
// mqUtils.sendApiMessage(MqMessage.build(EnumShopType.JD, MqType.ORDER_MESSAGE, id));
|
||||
}
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,360 @@
|
|||
package com.qihang.pdd.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 拼多多订单表
|
||||
* @TableName oms_pdd_order
|
||||
*/
|
||||
@Data
|
||||
public class OmsPddOrder implements Serializable {
|
||||
/**
|
||||
* 订单id,自增
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 内部店铺ID
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderSn;
|
||||
|
||||
/**
|
||||
* 订单类型 0-普通订单 ,1- 定金订单
|
||||
*/
|
||||
private Integer tradeType;
|
||||
|
||||
/**
|
||||
* 是否顺丰包邮,1-是 0-否
|
||||
*/
|
||||
private Integer freeSf;
|
||||
|
||||
/**
|
||||
* 是否是抽奖订单,1-非抽奖订单,2-抽奖订单
|
||||
*/
|
||||
private Integer isLuckyFlag;
|
||||
|
||||
/**
|
||||
* 成团状态:0:拼团中、1:已成团、2:团失败
|
||||
*/
|
||||
private Integer groupStatus;
|
||||
|
||||
/**
|
||||
* 成交状态:0:未成交、1:已成交、2:已取消、
|
||||
*/
|
||||
private Integer confirmStatus;
|
||||
|
||||
/**
|
||||
* 订单状态1:待发货,2:已发货待签收,3:已签收
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
|
||||
/**
|
||||
* 售后状态 1:无售后或售后关闭,2:售后处理中,3:退款中,4: 退款成功 5:全部
|
||||
*/
|
||||
private Integer refundStatus;
|
||||
|
||||
/**
|
||||
* 团长免单金额,单位:元
|
||||
*/
|
||||
private Double capitalFreeDiscount;
|
||||
|
||||
/**
|
||||
* 商家优惠金额,单位:元
|
||||
*/
|
||||
private Double sellerDiscount;
|
||||
|
||||
/**
|
||||
* 平台优惠金额,单位:元
|
||||
*/
|
||||
private Double platformDiscount;
|
||||
|
||||
/**
|
||||
* 商品金额,单位:元,商品金额=商品销售价格*商品数量-改价金额(接口暂无该字段)
|
||||
*/
|
||||
private Double goodsAmount;
|
||||
|
||||
/**
|
||||
* 折扣金额,单位:元,折扣金额=平台优惠+商家优惠+团长免单优惠金额
|
||||
*/
|
||||
private Double discountAmount;
|
||||
|
||||
/**
|
||||
* 支付金额,单位:元,支付金额=商品金额-折扣金额+邮费
|
||||
*/
|
||||
private Double payAmount;
|
||||
|
||||
/**
|
||||
* 邮费,单位:元
|
||||
*/
|
||||
private Double postage;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单备注标记,1-红色,2-黄色,3-绿色,4-蓝色,5-紫色
|
||||
*/
|
||||
private Integer remarkTag;
|
||||
|
||||
/**
|
||||
* 订单备注标记名称
|
||||
*/
|
||||
private String remarkTagName;
|
||||
|
||||
/**
|
||||
* 买家留言信息
|
||||
*/
|
||||
private String buyerMemo;
|
||||
|
||||
/**
|
||||
* 订单的更新时间
|
||||
*/
|
||||
private String updatedAt;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private String shippingTime;
|
||||
|
||||
/**
|
||||
* 快递单号
|
||||
*/
|
||||
private String trackingNumber;
|
||||
|
||||
/**
|
||||
* 物流公司
|
||||
*/
|
||||
private String trackingCompany;
|
||||
|
||||
/**
|
||||
* 支付方式,枚举值:QQ,WEIXIN,ALIPAY,LIANLIANPAY
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 支付单号
|
||||
*/
|
||||
private String payNo;
|
||||
|
||||
/**
|
||||
* 收件人地址,不拼接省市区
|
||||
*/
|
||||
private String receiverAddress;
|
||||
|
||||
/**
|
||||
* 收件人地址(打码)
|
||||
*/
|
||||
private String receiverAddressMask;
|
||||
|
||||
/**
|
||||
* 收件人姓名
|
||||
*/
|
||||
private String receiverName;
|
||||
|
||||
/**
|
||||
* 收件人电话
|
||||
*/
|
||||
private String receiverPhone;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String receiverPhoneMask;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String receiverNameMask;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String addressMask;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
private String town;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer townId;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 城市编码
|
||||
*/
|
||||
private Integer cityId;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer provinceId;
|
||||
|
||||
/**
|
||||
* 国家地区
|
||||
*/
|
||||
private String country;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer countryId;
|
||||
|
||||
/**
|
||||
* 订单创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private String payTime;
|
||||
|
||||
/**
|
||||
* 成交时间
|
||||
*/
|
||||
private String confirmTime;
|
||||
|
||||
/**
|
||||
* 确认收货时间
|
||||
*/
|
||||
private String receiveTime;
|
||||
|
||||
/**
|
||||
* 售后状态 0:无售后 2:买家申请退款,待商家处理 3:退货退款,待商家处理 4:商家同意退款,退款中 5:平台同意退款,退款中 6:驳回退款, 待买家处理 7:已同意退货退款,待用户发货 8:平台处理中 9:平台拒 绝退款,退款关闭 10:退款成功 11:买家撤销 12:买家逾期未处 理,退款失败 13:买家逾期,超过有效期 14 : 换货补寄待商家处理 15:换货补寄待用户处理 16:换货补寄成功 17:换货补寄失败 18:换货补寄待用户确认完成
|
||||
*/
|
||||
private Integer afterSalesStatus;
|
||||
|
||||
/**
|
||||
* 订单承诺发货时间
|
||||
*/
|
||||
private String lastShipTime;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* 是否当日发货,1-是,0-否
|
||||
*/
|
||||
private Integer deliveryOneDay;
|
||||
|
||||
/**
|
||||
* 是否多多批发,1-是,0-否
|
||||
*/
|
||||
private Integer duoduoWholesale;
|
||||
|
||||
/**
|
||||
* 送货入户并安装服务 0-不支持送货,1-送货入户不安装,2-送货入户并安装
|
||||
*/
|
||||
private Integer homeDeliveryType;
|
||||
|
||||
/**
|
||||
* 发票申请,1代表有 0代表无
|
||||
*/
|
||||
private Integer invoiceStatus;
|
||||
|
||||
/**
|
||||
* 是否为预售商品 1表示是 0表示否
|
||||
*/
|
||||
private Integer isPreSale;
|
||||
|
||||
/**
|
||||
* 是否缺货 0-无缺货处理 1: 有缺货处理
|
||||
*/
|
||||
private Integer isStockOut;
|
||||
|
||||
/**
|
||||
* 快递公司在拼多多的代码
|
||||
*/
|
||||
private Long logisticsId;
|
||||
|
||||
/**
|
||||
* 市场业务类型,0-普通订单,1-拼内购订单
|
||||
*/
|
||||
private Integer mktBizType;
|
||||
|
||||
/**
|
||||
* 只换不修,1:是,0:否
|
||||
*/
|
||||
private Integer onlySupportReplace;
|
||||
|
||||
/**
|
||||
* 订单改价折扣金额,单位元
|
||||
*/
|
||||
private Double orderChangeAmount;
|
||||
|
||||
/**
|
||||
* 预售时间
|
||||
*/
|
||||
private String preSaleTime;
|
||||
|
||||
/**
|
||||
* 退货包运费,1:是,0:否
|
||||
*/
|
||||
private Integer returnFreightPayer;
|
||||
|
||||
/**
|
||||
* 订单审核状态(0-正常订单, 1-审核中订单)
|
||||
*/
|
||||
private Integer riskControlStatus;
|
||||
|
||||
/**
|
||||
* 催发货时间
|
||||
*/
|
||||
private String urgeShippingTime;
|
||||
|
||||
/**
|
||||
* 0待确认,1已确认2已拦截-9未拉取
|
||||
*/
|
||||
private Integer auditStatus;
|
||||
|
||||
/**
|
||||
* 发货时间(仓库真实发货时间)
|
||||
*/
|
||||
private Date auditTime;
|
||||
|
||||
/**
|
||||
* 系统创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 系统更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<OmsPddOrderItem> itemList;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
package com.qihang.pdd.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 拼多多订单明细表
|
||||
* @TableName oms_pdd_order_item
|
||||
*/
|
||||
@Data
|
||||
public class OmsPddOrderItem implements Serializable {
|
||||
/**
|
||||
* id,自增
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderSn;
|
||||
|
||||
/**
|
||||
* erp系统商品id
|
||||
*/
|
||||
private Integer erpGoodsId;
|
||||
|
||||
/**
|
||||
* erp系统商品规格id
|
||||
*/
|
||||
private Integer erpSpecId;
|
||||
|
||||
/**
|
||||
* 拼多多商品id
|
||||
*/
|
||||
private Long goodId;
|
||||
|
||||
/**
|
||||
* 拼多多商品skuid
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 商品图片
|
||||
*/
|
||||
private String goodsImg;
|
||||
|
||||
/**
|
||||
* 商品规格
|
||||
*/
|
||||
private String goodsSpec;
|
||||
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private Double goodsPrice;
|
||||
|
||||
/**
|
||||
* 商家外部编码(商品)
|
||||
*/
|
||||
private String outerGoodsId;
|
||||
|
||||
/**
|
||||
* 商家外部编码(sku)
|
||||
*/
|
||||
private String outerId;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private Integer goodsCount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 子订单金额
|
||||
*/
|
||||
private Double itemAmount;
|
||||
|
||||
/**
|
||||
* 是否礼品0否1是
|
||||
*/
|
||||
private Integer isGift;
|
||||
|
||||
/**
|
||||
* 已退货数量
|
||||
*/
|
||||
private Integer refundCount;
|
||||
|
||||
/**
|
||||
* 售后状态 1:无售后或售后关闭,2:售后处理中,3:退款中,4: 退款成功
|
||||
*/
|
||||
private Integer refundStatus;
|
||||
|
||||
/**
|
||||
* 内部店铺ID
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 系统创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 系统更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -1,12 +1,16 @@
|
|||
package com.qihang.pdd.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店铺更新最后时间记录
|
||||
* @TableName sys_shop_pull_lasttime
|
||||
*/
|
||||
@Data
|
||||
public class SysShopPullLasttime implements Serializable {
|
||||
/**
|
||||
*
|
||||
|
|
@ -26,7 +30,7 @@ public class SysShopPullLasttime implements Serializable {
|
|||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
private Date lasttime;
|
||||
private LocalDateTime lasttime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
|
@ -40,137 +44,4 @@ public class SysShopPullLasttime implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
public Integer getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
public void setShopId(Integer shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类型(ORDER:订单,REFUND:退款)
|
||||
*/
|
||||
public Object getPullType() {
|
||||
return pullType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类型(ORDER:订单,REFUND:退款)
|
||||
*/
|
||||
public void setPullType(Object pullType) {
|
||||
this.pullType = pullType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
public Date getLasttime() {
|
||||
return lasttime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
public void setLasttime(Date lasttime) {
|
||||
this.lasttime = lasttime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SysShopPullLasttime other = (SysShopPullLasttime) 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.getPullType() == null ? other.getPullType() == null : this.getPullType().equals(other.getPullType()))
|
||||
&& (this.getLasttime() == null ? other.getLasttime() == null : this.getLasttime().equals(other.getLasttime()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (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 + ((getShopId() == null) ? 0 : getShopId().hashCode());
|
||||
result = prime * result + ((getPullType() == null) ? 0 : getPullType().hashCode());
|
||||
result = prime * result + ((getLasttime() == null) ? 0 : getLasttime().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", shopId=").append(shopId);
|
||||
sb.append(", pullType=").append(pullType);
|
||||
sb.append(", lasttime=").append(lasttime);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.qihang.pdd.domain.bo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PddOrderPushBo {
|
||||
private String[] ids;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.pdd.mapper;
|
||||
|
||||
import com.qihang.pdd.domain.OmsPddOrderItem;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order_item(拼多多订单明细表)】的数据库操作Mapper
|
||||
* @createDate 2024-06-13 16:54:36
|
||||
* @Entity com.qihang.pdd.domain.OmsPddOrderItem
|
||||
*/
|
||||
public interface OmsPddOrderItemMapper extends BaseMapper<OmsPddOrderItem> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.qihang.pdd.mapper;
|
||||
|
||||
import com.qihang.pdd.domain.OmsPddOrder;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order(拼多多订单表)】的数据库操作Mapper
|
||||
* @createDate 2024-06-13 16:54:36
|
||||
* @Entity com.qihang.pdd.domain.OmsPddOrder
|
||||
*/
|
||||
public interface OmsPddOrderMapper extends BaseMapper<OmsPddOrder> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.qihang.pdd.service;
|
||||
|
||||
import com.qihang.pdd.domain.OmsPddOrderItem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order_item(拼多多订单明细表)】的数据库操作Service
|
||||
* @createDate 2024-06-13 16:54:36
|
||||
*/
|
||||
public interface OmsPddOrderItemService extends IService<OmsPddOrderItem> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.qihang.pdd.service;
|
||||
|
||||
import com.qihang.common.common.PageQuery;
|
||||
import com.qihang.common.common.PageResult;
|
||||
import com.qihang.common.common.ResultVo;
|
||||
import com.qihang.pdd.domain.OmsPddOrder;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order(拼多多订单表)】的数据库操作Service
|
||||
* @createDate 2024-06-13 16:54:36
|
||||
*/
|
||||
public interface OmsPddOrderService extends IService<OmsPddOrder> {
|
||||
PageResult<OmsPddOrder> queryPageList(OmsPddOrder bo, PageQuery pageQuery);
|
||||
ResultVo<Integer> saveOrder(Long shopId, OmsPddOrder order);
|
||||
}
|
||||
|
|
@ -9,5 +9,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
* @createDate 2024-03-13 17:43:42
|
||||
*/
|
||||
public interface SysShopPullLasttimeService extends IService<SysShopPullLasttime> {
|
||||
|
||||
SysShopPullLasttime getLasttimeByShop(Long shopId,String pullType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package com.qihang.pdd.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.pdd.domain.OmsPddOrderItem;
|
||||
import com.qihang.pdd.service.OmsPddOrderItemService;
|
||||
import com.qihang.pdd.mapper.OmsPddOrderItemMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order_item(拼多多订单明细表)】的数据库操作Service实现
|
||||
* @createDate 2024-06-13 16:54:36
|
||||
*/
|
||||
@Service
|
||||
public class OmsPddOrderItemServiceImpl extends ServiceImpl<OmsPddOrderItemMapper, OmsPddOrderItem>
|
||||
implements OmsPddOrderItemService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
package com.qihang.pdd.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.common.common.PageQuery;
|
||||
import com.qihang.common.common.PageResult;
|
||||
import com.qihang.common.common.ResultVo;
|
||||
import com.qihang.common.common.ResultVoEnum;
|
||||
import com.qihang.pdd.domain.OmsPddOrder;
|
||||
import com.qihang.pdd.domain.OmsPddOrderItem;
|
||||
import com.qihang.pdd.mapper.OmsPddOrderItemMapper;
|
||||
import com.qihang.pdd.service.OmsPddOrderService;
|
||||
import com.qihang.pdd.mapper.OmsPddOrderMapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【oms_pdd_order(拼多多订单表)】的数据库操作Service实现
|
||||
* @createDate 2024-06-13 16:54:36
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class OmsPddOrderServiceImpl extends ServiceImpl<OmsPddOrderMapper, OmsPddOrder>
|
||||
implements OmsPddOrderService{
|
||||
private final OmsPddOrderMapper orderMapper;
|
||||
private final OmsPddOrderItemMapper orderItemMapper;
|
||||
|
||||
@Override
|
||||
public PageResult<OmsPddOrder> queryPageList(OmsPddOrder bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OmsPddOrder> queryWrapper = new LambdaQueryWrapper<OmsPddOrder>()
|
||||
.eq(bo.getShopId()!=null,OmsPddOrder::getShopId,bo.getShopId());
|
||||
|
||||
Page<OmsPddOrder> goodsPage = orderMapper.selectPage(pageQuery.build(), queryWrapper);
|
||||
if(goodsPage.getRecords()!=null){
|
||||
for (var o: goodsPage.getRecords()) {
|
||||
o.setItemList(orderItemMapper.selectList(new LambdaQueryWrapper<OmsPddOrderItem>().eq(OmsPddOrderItem::getOrderSn,o.getOrderSn())));
|
||||
}
|
||||
}
|
||||
return PageResult.build(goodsPage);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public ResultVo<Integer> saveOrder(Long shopId, OmsPddOrder order) {
|
||||
if(order == null ) return ResultVo.error(ResultVoEnum.SystemException);
|
||||
try {
|
||||
List<OmsPddOrder> taoOrders = orderMapper.selectList(new LambdaQueryWrapper<OmsPddOrder>().eq(OmsPddOrder::getOrderSn, order.getOrderSn()));
|
||||
if (taoOrders != null && taoOrders.size() > 0) {
|
||||
// 存在,修改
|
||||
OmsPddOrder update = new OmsPddOrder();
|
||||
update.setId(taoOrders.get(0).getId());
|
||||
if(StringUtils.hasText(order.getReceiverName())){
|
||||
update.setReceiverName(order.getReceiverName());
|
||||
}
|
||||
if(StringUtils.hasText(order.getReceiverPhone())){
|
||||
update.setReceiverPhone(order.getReceiverPhone());
|
||||
}
|
||||
if(StringUtils.hasText(order.getReceiverAddress())){
|
||||
update.setReceiverAddress(order.getReceiverAddress());
|
||||
}
|
||||
if(StringUtils.hasText(order.getAddress())){
|
||||
update.setAddress(order.getAddress());
|
||||
}
|
||||
update.setReceiverNameMask(order.getReceiverNameMask());
|
||||
update.setReceiverPhoneMask(order.getReceiverPhoneMask());
|
||||
update.setReceiverAddressMask(order.getReceiverAddressMask());
|
||||
update.setAddressMask(order.getAddressMask());
|
||||
|
||||
update.setGroupStatus(order.getGroupStatus());
|
||||
update.setConfirmStatus(order.getConfirmStatus());
|
||||
update.setOrderStatus(order.getOrderStatus());
|
||||
update.setRefundStatus(order.getRefundStatus());
|
||||
update.setCapitalFreeDiscount(order.getCapitalFreeDiscount());
|
||||
update.setSellerDiscount(order.getSellerDiscount());
|
||||
update.setPlatformDiscount(order.getPlatformDiscount());
|
||||
update.setGoodsAmount(order.getGoodsAmount());
|
||||
update.setDiscountAmount(order.getDiscountAmount());
|
||||
update.setPayAmount(order.getPayAmount());
|
||||
update.setPostage(order.getPostage());
|
||||
update.setOrderChangeAmount(order.getOrderChangeAmount());
|
||||
update.setRemark(order.getRemark());
|
||||
update.setRemarkTag(order.getRemarkTag());
|
||||
update.setRemarkTagName(order.getRemarkTagName());
|
||||
update.setBuyerMemo(order.getBuyerMemo());
|
||||
update.setUpdatedAt(order.getUpdatedAt());
|
||||
update.setShippingTime(order.getShippingTime());
|
||||
update.setTrackingNumber(order.getTrackingNumber());
|
||||
update.setPayType(order.getPayType());
|
||||
update.setPayNo(order.getPayNo());
|
||||
update.setPayTime(order.getPayTime());
|
||||
update.setConfirmTime(order.getConfirmTime());
|
||||
update.setReceiveTime(order.getReceiveTime());
|
||||
update.setAfterSalesStatus(order.getAfterSalesStatus());
|
||||
|
||||
update.setLastShipTime(order.getLastShipTime());
|
||||
update.setLogisticsId(order.getLogisticsId());
|
||||
update.setRiskControlStatus(order.getRiskControlStatus());
|
||||
update.setUrgeShippingTime(order.getUrgeShippingTime());
|
||||
update.setUpdateTime(new Date());
|
||||
orderMapper.updateById(update);
|
||||
// 更新item
|
||||
for (var item : order.getItemList()) {
|
||||
List<OmsPddOrderItem> taoOrderItems = orderItemMapper.selectList(new LambdaQueryWrapper<OmsPddOrderItem>().eq(OmsPddOrderItem::getOrderSn, order.getOrderSn()).eq(OmsPddOrderItem::getSkuId,item.getSkuId()));
|
||||
if (taoOrderItems != null && taoOrderItems.size() > 0) {
|
||||
// 存在,不操作
|
||||
} else {
|
||||
// 新增
|
||||
// TODO:子订单价格计算
|
||||
item.setIsGift(0);
|
||||
item.setRefundCount(0);
|
||||
item.setRefundStatus(1);
|
||||
item.setShopId(shopId);
|
||||
item.setOrderSn(order.getOrderSn());
|
||||
item.setOrderId(update.getId());
|
||||
item.setCreateTime(new Date());
|
||||
orderItemMapper.insert(item);
|
||||
}
|
||||
}
|
||||
return ResultVo.error(ResultVoEnum.DataExist, "订单已经存在,更新成功");
|
||||
} else {
|
||||
// 不存在,新增
|
||||
order.setShopId(shopId);
|
||||
order.setAuditStatus(0);
|
||||
order.setCreateTime(new Date());
|
||||
orderMapper.insert(order);
|
||||
// 添加item
|
||||
for (var item : order.getItemList()) {
|
||||
// 新增
|
||||
// TODO:子订单价格计算
|
||||
item.setIsGift(0);
|
||||
item.setRefundCount(0);
|
||||
item.setRefundStatus(1);
|
||||
item.setShopId(shopId);
|
||||
item.setOrderSn(order.getOrderSn());
|
||||
item.setOrderId(order.getId());
|
||||
item.setCreateTime(new Date());
|
||||
orderItemMapper.insert(item);
|
||||
}
|
||||
return ResultVo.success();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
e.printStackTrace();
|
||||
System.out.println("保存订单数据错误:"+e.getMessage());
|
||||
return ResultVo.error(ResultVoEnum.SystemException, "系统异常:" + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,20 +1,32 @@
|
|||
package com.qihang.pdd.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qihang.pdd.domain.SysShopPullLasttime;
|
||||
import com.qihang.pdd.service.SysShopPullLasttimeService;
|
||||
import com.qihang.pdd.mapper.SysShopPullLasttimeMapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author TW
|
||||
* @description 针对表【sys_shop_pull_lasttime(店铺更新最后时间记录)】的数据库操作Service实现
|
||||
* @createDate 2024-03-13 17:43:42
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class SysShopPullLasttimeServiceImpl extends ServiceImpl<SysShopPullLasttimeMapper, SysShopPullLasttime>
|
||||
implements SysShopPullLasttimeService{
|
||||
private final SysShopPullLasttimeMapper mapper;
|
||||
|
||||
@Override
|
||||
public SysShopPullLasttime getLasttimeByShop(Long shopId, String pullType) {
|
||||
List<SysShopPullLasttime> sysShopPullLasttimes = mapper.selectList(new LambdaQueryWrapper<SysShopPullLasttime>().eq(SysShopPullLasttime::getShopId, shopId).eq(SysShopPullLasttime::getPullType, pullType));
|
||||
if(sysShopPullLasttimes != null && !sysShopPullLasttimes.isEmpty()) return sysShopPullLasttimes.get(0);
|
||||
else return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.qihang.pdd.mapper.OmsPddOrderItemMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.pdd.domain.OmsPddOrderItem">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="orderId" column="order_id" jdbcType="BIGINT"/>
|
||||
<result property="orderSn" column="order_sn" jdbcType="VARCHAR"/>
|
||||
<result property="erpGoodsId" column="erp_goods_id" jdbcType="INTEGER"/>
|
||||
<result property="erpSpecId" column="erp_spec_id" jdbcType="INTEGER"/>
|
||||
<result property="goodId" column="good_id" jdbcType="BIGINT"/>
|
||||
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
||||
<result property="goodsName" column="goods_name" jdbcType="VARCHAR"/>
|
||||
<result property="goodsImg" column="goods_img" jdbcType="VARCHAR"/>
|
||||
<result property="goodsSpec" column="goods_spec" jdbcType="VARCHAR"/>
|
||||
<result property="goodsPrice" column="goods_price" jdbcType="DOUBLE"/>
|
||||
<result property="outerGoodsId" column="outer_goods_id" jdbcType="VARCHAR"/>
|
||||
<result property="outerId" column="outer_id" jdbcType="VARCHAR"/>
|
||||
<result property="goodsCount" column="goods_count" jdbcType="INTEGER"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="itemAmount" column="item_amount" jdbcType="DOUBLE"/>
|
||||
<result property="isGift" column="is_gift" jdbcType="TINYINT"/>
|
||||
<result property="refundCount" column="refund_count" jdbcType="INTEGER"/>
|
||||
<result property="refundStatus" column="refund_status" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,order_id,order_sn,
|
||||
erp_goods_id,erp_spec_id,good_id,
|
||||
sku_id,goods_name,goods_img,
|
||||
goods_spec,goods_price,outer_goods_id,
|
||||
outer_id,goods_count,remark,
|
||||
item_amount,is_gift,refund_count,
|
||||
refund_status,shop_id,create_time,
|
||||
update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.qihang.pdd.mapper.OmsPddOrderMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.qihang.pdd.domain.OmsPddOrder">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="orderSn" column="order_sn" jdbcType="VARCHAR"/>
|
||||
<result property="tradeType" column="trade_type" jdbcType="INTEGER"/>
|
||||
<result property="freeSf" column="free_sf" jdbcType="INTEGER"/>
|
||||
<result property="isLuckyFlag" column="is_lucky_flag" jdbcType="INTEGER"/>
|
||||
<result property="groupStatus" column="group_status" jdbcType="INTEGER"/>
|
||||
<result property="confirmStatus" column="confirm_status" jdbcType="INTEGER"/>
|
||||
<result property="orderStatus" column="order_status" jdbcType="INTEGER"/>
|
||||
<result property="refundStatus" column="refund_status" jdbcType="INTEGER"/>
|
||||
<result property="capitalFreeDiscount" column="capital_free_discount" jdbcType="DOUBLE"/>
|
||||
<result property="sellerDiscount" column="seller_discount" jdbcType="DOUBLE"/>
|
||||
<result property="platformDiscount" column="platform_discount" jdbcType="DOUBLE"/>
|
||||
<result property="goodsAmount" column="goods_amount" jdbcType="DOUBLE"/>
|
||||
<result property="discountAmount" column="discount_amount" jdbcType="DOUBLE"/>
|
||||
<result property="payAmount" column="pay_amount" jdbcType="DOUBLE"/>
|
||||
<result property="postage" column="postage" jdbcType="DOUBLE"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="remarkTag" column="remark_tag" jdbcType="INTEGER"/>
|
||||
<result property="remarkTagName" column="remark_tag_name" jdbcType="VARCHAR"/>
|
||||
<result property="buyerMemo" column="buyer_memo" jdbcType="VARCHAR"/>
|
||||
<result property="updatedAt" column="updated_at" jdbcType="VARCHAR"/>
|
||||
<result property="shippingTime" column="shipping_time" jdbcType="VARCHAR"/>
|
||||
<result property="trackingNumber" column="tracking_number" jdbcType="VARCHAR"/>
|
||||
<result property="trackingCompany" column="tracking_company" jdbcType="VARCHAR"/>
|
||||
<result property="payType" column="pay_type" jdbcType="VARCHAR"/>
|
||||
<result property="payNo" column="pay_no" jdbcType="VARCHAR"/>
|
||||
<result property="receiverAddress" column="receiver_address" jdbcType="VARCHAR"/>
|
||||
<result property="receiverAddressMask" column="receiver_address_mask" jdbcType="VARCHAR"/>
|
||||
<result property="receiverName" column="receiver_name" jdbcType="VARCHAR"/>
|
||||
<result property="receiverPhone" column="receiver_phone" jdbcType="VARCHAR"/>
|
||||
<result property="receiverPhoneMask" column="receiver_phone_mask" jdbcType="VARCHAR"/>
|
||||
<result property="receiverNameMask" column="receiver_name_mask" jdbcType="VARCHAR"/>
|
||||
<result property="addressMask" column="address_mask" jdbcType="VARCHAR"/>
|
||||
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||
<result property="town" column="town" jdbcType="VARCHAR"/>
|
||||
<result property="townId" column="town_id" jdbcType="INTEGER"/>
|
||||
<result property="city" column="city" jdbcType="VARCHAR"/>
|
||||
<result property="cityId" column="city_id" jdbcType="INTEGER"/>
|
||||
<result property="province" column="province" jdbcType="VARCHAR"/>
|
||||
<result property="provinceId" column="province_id" jdbcType="INTEGER"/>
|
||||
<result property="country" column="country" jdbcType="VARCHAR"/>
|
||||
<result property="countryId" column="country_id" jdbcType="INTEGER"/>
|
||||
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="payTime" column="pay_time" jdbcType="VARCHAR"/>
|
||||
<result property="confirmTime" column="confirm_time" jdbcType="VARCHAR"/>
|
||||
<result property="receiveTime" column="receive_time" jdbcType="VARCHAR"/>
|
||||
<result property="afterSalesStatus" column="after_sales_status" jdbcType="INTEGER"/>
|
||||
<result property="lastShipTime" column="last_ship_time" jdbcType="VARCHAR"/>
|
||||
<result property="tag" column="tag" jdbcType="VARCHAR"/>
|
||||
<result property="deliveryOneDay" column="delivery_one_day" jdbcType="INTEGER"/>
|
||||
<result property="duoduoWholesale" column="duoduo_wholesale" jdbcType="INTEGER"/>
|
||||
<result property="homeDeliveryType" column="home_delivery_type" jdbcType="INTEGER"/>
|
||||
<result property="invoiceStatus" column="invoice_status" jdbcType="INTEGER"/>
|
||||
<result property="isPreSale" column="is_pre_sale" jdbcType="INTEGER"/>
|
||||
<result property="isStockOut" column="is_stock_out" jdbcType="INTEGER"/>
|
||||
<result property="logisticsId" column="logistics_id" jdbcType="BIGINT"/>
|
||||
<result property="mktBizType" column="mkt_biz_type" jdbcType="INTEGER"/>
|
||||
<result property="onlySupportReplace" column="only_support_replace" jdbcType="INTEGER"/>
|
||||
<result property="orderChangeAmount" column="order_change_amount" jdbcType="DOUBLE"/>
|
||||
<result property="preSaleTime" column="pre_sale_time" jdbcType="VARCHAR"/>
|
||||
<result property="returnFreightPayer" column="return_freight_payer" jdbcType="INTEGER"/>
|
||||
<result property="riskControlStatus" column="risk_control_status" jdbcType="INTEGER"/>
|
||||
<result property="urgeShippingTime" column="urge_shipping_time" jdbcType="VARCHAR"/>
|
||||
<result property="auditStatus" column="audit_status" jdbcType="INTEGER"/>
|
||||
<result property="auditTime" column="audit_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,shop_id,order_sn,
|
||||
trade_type,free_sf,is_lucky_flag,
|
||||
group_status,confirm_status,order_status,
|
||||
refund_status,capital_free_discount,seller_discount,
|
||||
platform_discount,goods_amount,discount_amount,
|
||||
pay_amount,postage,remark,
|
||||
remark_tag,remark_tag_name,buyer_memo,
|
||||
updated_at,shipping_time,tracking_number,
|
||||
tracking_company,pay_type,pay_no,
|
||||
receiver_address,receiver_address_mask,receiver_name,
|
||||
receiver_phone,receiver_phone_mask,receiver_name_mask,
|
||||
address_mask,address,town,
|
||||
town_id,city,city_id,
|
||||
province,province_id,country,
|
||||
country_id,created_time,pay_time,
|
||||
confirm_time,receive_time,after_sales_status,
|
||||
last_ship_time,tag,delivery_one_day,
|
||||
duoduo_wholesale,home_delivery_type,invoice_status,
|
||||
is_pre_sale,is_stock_out,logistics_id,
|
||||
mkt_biz_type,only_support_replace,order_change_amount,
|
||||
pre_sale_time,return_freight_payer,risk_control_status,
|
||||
urge_shipping_time,audit_status,audit_time,
|
||||
create_time,update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||
// 查询拼多多订单列表
|
||||
export function listOrder(query) {
|
||||
return request({
|
||||
url: '/pdd/order/list',
|
||||
url: '/pdd-api/order/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
|
|
@ -12,43 +12,24 @@ export function listOrder(query) {
|
|||
// 查询拼多多订单详细
|
||||
export function getOrder(id) {
|
||||
return request({
|
||||
url: '/pdd/order/' + id,
|
||||
url: '/pdd-api/order/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增拼多多订单
|
||||
export function addOrder(data) {
|
||||
return request({
|
||||
url: '/pdd/order',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改拼多多订单
|
||||
export function confirmOrder(data) {
|
||||
return request({
|
||||
url: '/pdd/order/confirm',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除拼多多订单
|
||||
export function delOrder(id) {
|
||||
return request({
|
||||
url: '/pdd/order/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 接口拉取淘宝订单
|
||||
export function pullOrder(query) {
|
||||
return request({
|
||||
url: '/pdd_api/order/pull_order',
|
||||
url: '/pdd-api/order/pull_order',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function pushOms(data) {
|
||||
return request({
|
||||
url: '/pdd-api/order/push_oms',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -23,7 +23,7 @@
|
|||
import OrderTao from "@/views/shop/tao/order/index";
|
||||
import OrderJd from "@/views/shop/jd/order/index";
|
||||
import OrderDou from "@/views/dou/order/index";
|
||||
import OrderPdd from "@/views/pdd/order/index";
|
||||
import OrderPdd from "@/views/shop/pdd/order/index";
|
||||
export default {
|
||||
name: "Order",
|
||||
components:{OrderTao,OrderJd,OrderDou,OrderPdd},
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
import OrderTao from "@/views/shop/tao/order/index";
|
||||
import OrderJd from "@/views/shop/jd/order/index";
|
||||
import OrderDou from "@/views/dou/order/index";
|
||||
import OrderPdd from "@/views/pdd/order/index";
|
||||
import OrderPdd from "@/views/shop/pdd/order/index";
|
||||
import OrderWei from "@/views/shop/wei/order/index";
|
||||
export default {
|
||||
name: "Order",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,335 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="订单号" prop="orderSn">
|
||||
<el-input
|
||||
v-model="queryParams.orderSn"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺" prop="shopId">
|
||||
<el-select v-model="queryParams.shopId" placeholder="请选择店铺" clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="item in shopList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单时间" prop="orderTime">
|
||||
<el-date-picker clearable
|
||||
v-model="orderTime" value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择状态" clearable @change="handleQuery">
|
||||
<el-option label="待发货" value="1" ></el-option>
|
||||
<el-option label="已发货待签收" value="2"></el-option>
|
||||
<el-option label="已签收" value="3"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="售后状态" prop="refundStatus">
|
||||
<el-select v-model="queryParams.refundStatus" placeholder="请选择状态" clearable @change="handleQuery">
|
||||
<el-option label="无售后或售后关闭" value="1" ></el-option>
|
||||
<el-option label="售后处理中" value="2"></el-option>
|
||||
<el-option label="退款中" value="3"> </el-option>
|
||||
<el-option label="退款成功" value="4"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取订单</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>手动将选中订单推送到OMS</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="订单号" align="center" prop="orderSn" />
|
||||
<el-table-column label="店铺" align="center" prop="shopId" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ shopList.find(x=>x.id === scope.row.shopId).name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品" width="350">
|
||||
<template slot-scope="scope">
|
||||
<el-row v-for="item in scope.row.itemList" :key="item.id" :gutter="20">
|
||||
|
||||
<div style="float: left;display: flex;align-items: center;" >
|
||||
<el-image style="width: 70px; height: 70px;" :src="item.goodsImg"></el-image>
|
||||
<div style="margin-left:10px">
|
||||
<p>{{item.goodsName}}【{{item.goodsSpec}}】
|
||||
</p>
|
||||
<p>SKU编码:{{item.outerSkuId}}</p>
|
||||
<p>数量:<el-tag size="small">x {{item.goodsCount}}</el-tag></p>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实付总金额" align="center" prop="payAmount" :formatter="amountFormatter" />
|
||||
<el-table-column label="订单创建时间" align="center" prop="createdTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="买家留言" align="center" prop="buyerMemo" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 1"> 待发货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 2"> 已发货待签收</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 3"> 已签收</el-tag>
|
||||
<br />
|
||||
<el-tag size="small" v-if="scope.row.refundStatus === 1"> 无售后或售后关闭</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.refundStatus === 2"> 售后处理中</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.refundStatus === 3"> 退款中</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.refundStatus === 4"> 退款成功</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
size="mini"
|
||||
icon="el-icon-refresh"
|
||||
@click="handlePullUpdate(scope.row)"
|
||||
>更新订单</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listOrder, pullOrder, getOrder, pushOms} from "@/api/pdd/order";
|
||||
import { listShop } from "@/api/shop/shop";
|
||||
import {MessageBox} from "element-ui";
|
||||
|
||||
|
||||
export default {
|
||||
name: "OrderPdd",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
detailOpen: false,
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 淘宝订单表格数据
|
||||
orderList: [],
|
||||
shopList:[],
|
||||
orderTime:null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
shopId: null,
|
||||
tid: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
status: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform: 5}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
amountFormatter(row, column, cellValue, index) {
|
||||
return '¥' + cellValue.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
||||
},
|
||||
/** 查询淘宝订单列表 */
|
||||
getList() {
|
||||
if(this.orderTime){
|
||||
this.queryParams.startTime = this.orderTime[0]
|
||||
this.queryParams.endTime = this.orderTime[1]
|
||||
}else {
|
||||
this.queryParams.startTime = null
|
||||
this.queryParams.endTime = null
|
||||
}
|
||||
this.loading = true;
|
||||
listOrder(this.queryParams).then(response => {
|
||||
this.orderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.detailOpen = false;
|
||||
this.saleAfterOpen = false
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
shopId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.orderTime=null
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.orderSn)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handlePullDetailByTid(){
|
||||
if(this.queryParams.shopId && this.queryParams.orderSn) {
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:this.queryParams.shopId,orderId:this.queryParams.tid}).then(response => {
|
||||
console.log('拉取淘宝订单接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先输入订单号并且选择店铺");
|
||||
}
|
||||
},
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullOrder({shopId:this.queryParams.shopId,updType:0}).then(response => {
|
||||
console.log('拉取PDD订单接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
this.$router.push({path:"/shop/shop_list",query:{type:1}})
|
||||
// isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
}
|
||||
this.pullLoading = false
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
},
|
||||
handlePullUpdate(row) {
|
||||
// 接口拉取订单并更新
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:row.shopId,orderId:row.orderSn}).then(response => {
|
||||
console.log('拉取pdd订单详情接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
})
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.goodsList = response.data.taoOrderItemList;
|
||||
this.detailOpen = true;
|
||||
this.detailTitle = "订单详情";
|
||||
});
|
||||
this.isAudit = false
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
handlePushOms(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否手动推送到系统?').then(function() {
|
||||
return pushOms({ids:ids});
|
||||
}).then(() => {
|
||||
// this.getList();
|
||||
this.$modal.msgSuccess("推送成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue