瀏覽代碼

kwaixiaodian 初版

zhaoxian 7 月之前
父節點
當前提交
abfeb55179
共有 18 個文件被更改,包括 1874 次插入0 次删除
  1. 1 0
      ruixuan-framework/src/main/java/com/ruixuan/framework/config/SecurityConfig.java
  2. 66 0
      ruixuan-live/src/main/java/com/ruixuan/isc/controller/KwaixiaodianItemGetController.java
  3. 5 0
      ruixuan-live/src/main/java/com/ruixuan/isc/entity/KuaishouAccessToken.java
  4. 254 0
      ruixuan-live/src/main/java/com/ruixuan/isc/entity/KwaixiaodianItemGet.java
  5. 124 0
      ruixuan-live/src/main/java/com/ruixuan/isc/entity/KwaixiaodianItemGetSku.java
  6. 625 0
      ruixuan-live/src/main/java/com/ruixuan/isc/entity/KwaixiaodianOrderCursorList.java
  7. 2 0
      ruixuan-live/src/main/java/com/ruixuan/isc/mapper/AccessTokenMapper.java
  8. 22 0
      ruixuan-live/src/main/java/com/ruixuan/isc/mapper/KwaixiaodianItemGetMapper.java
  9. 17 0
      ruixuan-live/src/main/java/com/ruixuan/isc/mapper/KwaixiaodianOrderCursorListMapper.java
  10. 2 0
      ruixuan-live/src/main/java/com/ruixuan/isc/service/IAccessTokenService.java
  11. 17 0
      ruixuan-live/src/main/java/com/ruixuan/isc/service/IKwaixiaodianItemGetService.java
  12. 11 0
      ruixuan-live/src/main/java/com/ruixuan/isc/service/IKwaixiaodianOrderCursorListService.java
  13. 5 0
      ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/AccessTokenServiceImpl.java
  14. 121 0
      ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KwaixiaodianItemGetServiceImpl.java
  15. 111 0
      ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KwaixiaodianOrderCursorListServiceImpl.java
  16. 6 0
      ruixuan-live/src/main/resources/mapper/isc/AccessTokenMapper.xml
  17. 274 0
      ruixuan-live/src/main/resources/mapper/isc/KwaixiaodianItemGetMapper.xml
  18. 211 0
      ruixuan-live/src/main/resources/mapper/isc/KwaixiaodianOrderCursorListMapper.xml

+ 1 - 0
ruixuan-framework/src/main/java/com/ruixuan/framework/config/SecurityConfig.java

@@ -133,6 +133,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
                 .antMatchers("/testVideo/**").permitAll()
                 .antMatchers("/open/**").permitAll()
                 .antMatchers("/jy/callback/**").permitAll()
+                .antMatchers("/kwaixiaodian/**").permitAll()
 
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()

+ 66 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/controller/KwaixiaodianItemGetController.java

@@ -0,0 +1,66 @@
+package com.ruixuan.isc.controller;
+
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.isc.service.IKwaixiaodianItemGetService;
+import com.ruixuan.isc.service.IKwaixiaodianOrderCursorListService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * kwaixiaodian商品详情Controller
+ *
+ * @date 2024-10-28
+ */
+@Api(tags = "Kwaixiaodian")
+@RestController
+@RequestMapping("/kwaixiaodian/item")
+public class KwaixiaodianItemGetController extends BaseController {
+    @Autowired
+    private IKwaixiaodianItemGetService kwaixiaodianItemGetService;
+
+    @Autowired
+    private IKwaixiaodianOrderCursorListService orderCursorListService;
+
+    /**
+     * 获取商品详情(open.item.get)
+     * https://open.kwaixiaodian.com/zone/new/docs/api?name=open.item.get&version=1
+     */
+    @GetMapping("/querykwaiItmInfo")
+    @ApiOperation(value = "获kwai商品详情")
+    public void querykwaiItmInfo(
+            @ApiParam("商品ID") @RequestParam(value = "kwaiItemId", required = false) Long kwaiItemId,
+            @ApiParam("店铺ID") @RequestParam(value = "shopId", required = false) String shopId,
+            @ApiParam("用户ID") @RequestParam(value = "userId", required = false) String userId,
+            @ApiParam("用户") @RequestParam(value = "userName", required = false) String userName) {
+        try {
+            kwaixiaodianItemGetService.querykwaiItmInfo(kwaiItemId, shopId, userId, userName);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取订单列表(open.order.cursor.list)
+     * https://open.kwaixiaodian.com/zone/new/docs/api?name=open.order.cursor.list&version=1
+     */
+    @GetMapping("/querykwaiOrderList")
+    @ApiOperation(value = "获kwai订单列表")
+    public void querykwaiOrderList(@ApiParam("店铺ID") @RequestParam(value = "shopId", required = false) String shopId
+            , @ApiParam("开始日期") @RequestParam(value = "beginDate", required = false) String beginDate
+            , @ApiParam("结束日期(间隔不大于7天)") @RequestParam(value = "endDate", required = false) String endDate
+
+    ) {
+        try {
+            orderCursorListService.querykwaiOrderList(shopId, beginDate, endDate, "");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}

+ 5 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/entity/KuaishouAccessToken.java

@@ -15,4 +15,9 @@ public class KuaishouAccessToken extends BaseEntity {
     private String appSecret;
     private String signSecret;
 
+    private String shopName;
+    private Long companyId;
+    private String companyName;
+    private String leaderName;
+
 }

+ 254 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/entity/KwaixiaodianItemGet.java

@@ -0,0 +1,254 @@
+package com.ruixuan.isc.entity;
+
+import lombok.Data;
+
+/**
+ * kwaixiaodian商品详情对象 kwaixiaodian_item_get
+ *
+ * @date 2024-10-28
+ */
+@Data
+public class KwaixiaodianItemGet {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 商品ID
+     */
+    private Long itemId;
+
+    /**
+     * 用户ID
+     */
+    private String userId;
+
+    /**
+     * 用户名称
+     */
+    private String userName;
+
+    /**
+     * 店铺id
+     */
+    private String shopId;
+
+    /**
+     * 店铺名称
+     */
+    private String shopName;
+
+    /**
+     * 公司ID
+     */
+    private Long companyId;
+
+    /**
+     * 公司名称
+     */
+    private String companyName;
+
+    /**
+     * 负责人
+     */
+    private String leaderName;
+
+    /**
+     * 三方商品id
+     */
+    private Long relItemId;
+
+    /**
+     * 商品所属类目id
+     */
+    private Long categoryId;
+
+    /**
+     * 商品所属类目名称
+     */
+    private String categoryName;
+
+    /**
+     * 父级类目id
+     */
+    private Long parentCategoryId;
+
+    /**
+     * 父级类目名称
+     */
+    private String parentCategoryName;
+
+    /**
+     * 根类目id
+     */
+    private Long rootCategoryId;
+
+    /**
+     * 根类目名称
+     */
+    private String rootCategoryName;
+
+    /**
+     * 商品标题
+     */
+    private String title;
+
+    /**
+     * 商品详情
+     */
+    private String details;
+
+    /**
+     * 商品图片URL(第一张默认为头图)
+     */
+    private String imageUrls;
+
+    /**
+     * 图文详情图片
+     */
+    private String detailImageUrls;
+
+    /**
+     * 服务规则
+     */
+    private String serviceRule;
+
+    /**
+     * 审核状态 0待审核 1审核待修改 2审核通过 3审核拒绝
+     */
+    private String auditStatus;
+
+    /**
+     * 审核原因
+     */
+    private String auditReason;
+
+    /**
+     * 创建时间 (毫秒)
+     */
+    private Long createdTimeMs;
+
+    /**
+     * 创建时间 (日:时分秒)
+     */
+    private String createdTime;
+
+    /**
+     * 更新时间 (毫秒)
+     */
+    private Long updateTimeMs;
+
+    /**
+     * 更新时间 (日:时分秒)
+     */
+    private String updateTime;
+
+    /**
+     * 上下架状态
+     */
+    private String onOfflineStatus;
+
+    /**
+     * 父级类目列表
+     */
+    private String parentCategoryList;
+
+    /**
+     * 商品属性列表
+     */
+    private String itemPropValues;
+
+    /**
+     * 运费模板ID
+     */
+    private Long expressTemplateId;
+
+    /**
+     * 是否限购,1:支持限购,0:不支持限购
+     */
+    private String purchaseLimit;
+
+    /**
+     * 限购数量
+     */
+    private Long limitCount;
+
+    /**
+     * 商品链接
+     */
+    private String linkUrl;
+
+    /**
+     * 商品开售时间,单位:分
+     */
+    private Long timeOfSale;
+
+    /**
+     * 商品备注
+     */
+    private String itemRemark;
+
+    /**
+     * 副本审核状态 0待审核 1审核待修改 2审核通过 3审核拒绝
+     */
+    private String duplicationStatus;
+
+    /**
+     * 副本审核原因
+     */
+    private String duplicationReason;
+
+    /**
+     * 1-货品库存模式;2-商品库存模式
+     */
+    private String multipleStock;
+
+    /**
+     * 门店ID
+     */
+    private String poiIds;
+
+    /**
+     * 商品白底图
+     */
+    private String whiteBaseImageUrl;
+
+    /**
+     * 商品透明图
+     */
+    private String transparentImageUrl;
+
+    /**
+     * 商品短标题
+     */
+    private String shortTitle;
+
+    /**
+     * 商品卖点
+     */
+    private String sellingPoint;
+
+    /**
+     * 使用说明
+     */
+    private String instructions;
+
+    /**
+     * 是否是合约机商品
+     */
+    private String contractPhone;
+
+    /**
+     * 下架原因
+     */
+    private String offlineReason;
+
+    /**
+     * 下架原因
+     */
+    private String itemQualification;
+
+    /**
+     * 标品ID
+     */
+    private Long spuId;
+
+}

+ 124 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/entity/KwaixiaodianItemGetSku.java

@@ -0,0 +1,124 @@
+package com.ruixuan.isc.entity;
+
+import lombok.Data;
+
+/**
+ * kwaixiaodian商品详情对象 kwaixiaodian_item_get
+ */
+@Data
+public class KwaixiaodianItemGetSku {
+
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 商品ID
+     */
+    private Long kwaiItemId;
+
+    /**
+     * 快手skuId
+     */
+    private Long kwaiSkuId;
+
+    /**
+     * 外部商品 Sku id,仅供记录外部商品sku和快手商品sku对应关系
+     */
+    private Long relSkuId;
+
+    /**
+     * sku库存数
+     */
+    private Long skuStock;
+
+    /**
+     * sku图片url
+     */
+    private String imageUrl;
+
+    /**
+     * sku售卖价,单位分
+     */
+    private Long skuSalePrice;
+
+    /**
+     * 已售件数,已废弃
+     */
+    private Long volume;
+
+    /**
+     * 是否有效。0 无效 1 有效
+     */
+    private Long isValid;
+
+    /**
+     * 规格
+     */
+    private String specification;
+
+    /**
+     * appkey
+     */
+    private String appkey;
+
+    /**
+     * skuNick
+     */
+    private String skuNick;
+
+    /**
+     * sku属性信息
+     */
+    private String skuProp;
+
+    /**
+     * sku条形码
+     */
+    private String gtinCode;
+
+    /**
+     * 套餐详情
+     */
+    private String mealDetail;
+
+    /**
+     * sku预留库存
+     */
+    private Long reserveStock;
+
+    /**
+     * 合约机套餐编码
+     */
+    private String packageCode;
+
+    /**
+     * 外部货品ID
+     */
+    private String goodsId;
+
+    /**
+     * 外部货品编码
+     */
+    private String goodsCode;
+
+    /**
+     * 创建时间 (毫秒)
+     */
+    private Long createTimeMs;
+
+    /**
+     * 更新时间 (毫秒)
+     */
+    private Long updateTimeMs;
+    /**
+     * 创建时间 (日:时分秒)
+     */
+    private String createTime;
+    /**
+     * 更新时间 (日:时分秒)
+     */
+    private String updateTime;
+}

+ 625 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/entity/KwaixiaodianOrderCursorList.java

@@ -0,0 +1,625 @@
+package com.ruixuan.isc.entity;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.ruixuan.common.utils.Check;
+import com.ruixuan.common.utils.DateUtils;
+import lombok.Data;
+
+/**
+ * kwaixiaodian商品详情对象 kwaixiaodian_item_get
+ */
+@Data
+public class KwaixiaodianOrderCursorList {
+
+    /**
+     * 公司ID
+     */
+    private Long companyId;
+
+
+    /**
+     * 公司名称
+     */
+    private String companyName;
+
+    /**
+     * 店铺ID
+     */
+    private Long shopId;
+
+    /**
+     * 店铺名称
+     */
+    private String shopName;
+
+    /**
+     * 订单ID
+     */
+    private Long oid;
+
+    /**
+     * 付款时间
+     */
+    private Long payTime;
+
+    /**
+     * 买家图像
+     */
+    private String buyerImage;
+
+    /**
+     * 买家ID
+     */
+    private String buyerOpenId;
+
+    /**
+     * 买家昵称
+     */
+    private String buyerNick;
+
+    /**
+     * 卖家ID
+     */
+    private String sellerOpenId;
+
+    /**
+     * 卖家名称
+     */
+    private String sellerNick;
+
+    /**
+     * 运费
+     */
+    private Long expressFee;
+
+    /**
+     * 促销减价、折扣价格
+     */
+    private Long discountFee;
+
+    /**
+     * 子订单商品总价
+     */
+    private Long totalFee;
+
+    /**
+     * 订订单状态:[0, "未知状态"], [10, "待付款"], [30, "已付款/待发货"], [40, "已发货"], [50, "已签收"], [70, "订单成功"], [80, "订单失败/订单关闭"];订单取消会转为“订单失败”状态
+     */
+    private Long status;
+
+    /**
+     * 发货时间
+     */
+    private Long sendTime;
+
+    /**
+     * 发起退款时间
+     */
+    private Long refundTime;
+
+    /**
+     * 发货超时间隔时间,单位:天
+     */
+    private Long theDayOfDeliverGoodsTime;
+
+    /**
+     * 不推荐,固定计算逻辑,订单支付时间+承诺发货时间间隔,只作为无任何特殊场景的普通商品订单的承诺发货时间点,时间戳格式
+     */
+    private Long promiseTimeStampOfDelivery;
+
+    /**
+     * 分销类型 0-全部 1-普通订单 2-分销订单
+     */
+    private Long cpsType;
+
+    /**
+     * 1543843735000	【商家承诺发货时间】 推荐使用,动态计算逻辑计算的实际商家承诺发货时间,所有场景(如普通、延迟发货报备、预售、风控、拼团、车品等)等综合对比计算出的承诺发货时间点,时间戳格式,若值为0表示订单不能发货
+     */
+    private Long validPromiseShipmentTimeStamp;
+
+    /**
+     * 库存预售: 0-非预售 1-预售,该字段为库存预售,定金预售为orderStepInfo.payStepType字段
+     */
+    private Long preSale;
+
+    /**
+     * 收货时间
+     */
+    private Long recvTime;
+
+    /**
+     * [未知:0];[券包:2];[话费充值:3];[跨境:8];[预约有价优惠券:24]
+     */
+    private Long coType;
+
+    /**
+     * 评价状态: 0未评价,1评价
+     */
+    private Long commentStatus;
+
+    /**
+     * 支付方式 0:未知, 1:微信, 2:支付宝, 3:平安, 99:银行转账. 88:支付宝先用后付
+     */
+    private Long payType;
+
+    /**
+     * 风险Code码,10001=黑产订单,不建议商家发货
+     */
+    private Long riskCode;
+
+    /**
+     * 支付方式
+     */
+    private String payChannel;
+
+    /**
+     * 商家报备审核后的发货时间,审核通过后,商家发货时效判罚标准以该时间为准
+     */
+    private Long sellerDelayPromiseTimeStamp;
+
+    /**
+     * 是否优先发货
+     */
+    private String priorityDelivery;
+
+    /**
+     * 催发货次数
+     */
+    private Long remindShipmentSign;
+
+    /**
+     * 最近催发货时间戳
+     */
+    private Long remindShipmentTime;
+
+    /**
+     * 订单售卖信息
+     */
+    private String orderSellerRoleInfo;
+
+    /**
+     * 【履约拦截标】订单阻塞发货(hold单)code码:[1:多人拼团活动进行中]、[2:支付后风控审核中],字段有值时不允许发货
+     */
+    private String disableDeliveryReasonCode;
+
+    /**
+     * 活动订单编号
+     */
+    private Long multiplePiecesNo;
+
+    /**
+     * 存在多个值,活动类型列表 0:未知, 1:非活动[废弃值,不要关注], 2:0元抽奖, 3:老铁团, 4:一分夺宝, 5:福袋抽奖, 6:定金预售, 7:2022暑期众筹, 8:下单返金币, 9:会员充值, 10:万人讲价, 11:万人讲价-预售版, 12:买样后返, 13:粉丝组合价, 14:搭配购, 15:尾款立减 16:顺手买一件, 17:多人拼团, 18:赠品活动-主品, 19:赠品活动-赠品
+     * 20:万人团活动, 21:n元m件
+     */
+    private String allActivityType;
+
+    /**
+     * 订单标签信息:1-新疆中转
+     */
+    private String orderLabels;
+
+    /**
+     * 是否支持拆单发货
+     */
+    private String enableSplitDeliveryOrderb;
+
+    /**
+     * 运费补贴
+     */
+    private Long allowanceExpressFee;
+
+    /**
+     * 支付营销优惠
+     */
+    private Long payChannelDiscount;
+
+    /**
+     * 以旧换新先用后付抵扣金额
+     */
+    private Long tradeInPayAfterPromoAmount;
+
+    /**
+     * 政府补贴金额
+     */
+    private Long governmentDiscount;
+
+    /**
+     * 快手商品skuid
+     */
+    private Long skuId;
+
+    /**
+     * 服务商商品skuid
+     */
+    private Long relSkuId;
+
+    /**
+     * sku商品规格快照
+     */
+    private String skuDesc;
+
+    /**
+     * sku编码
+     */
+    private String skuNick;
+
+    /**
+     * 商品ID
+     */
+    private Long itemId;
+
+    /**
+     * 服务商商品id
+     */
+    private Long relItemId;
+
+    /**
+     * 商品名称
+     */
+    private String itemTitle;
+
+    /**
+     * 商品链接
+     */
+    private String itemLinkUrl;
+
+    /**
+     * 商品图片地址
+     */
+    private String itemPicUrl;
+
+    /**
+     * sku数量
+     */
+    private Long num;
+
+    /**
+     * 商品促销前单价快照,单位为分
+     */
+    private Long originalPrice;
+
+    /**
+     * 商品折扣金额,单位为分
+     */
+    private Long itemDiscountFee;
+
+    /**
+     * 商品单价
+     */
+    private Long price;
+
+    /**
+     * 1自建商品 2 闪电购商品
+     */
+    private Long itemType;
+
+    /**
+     * sku修改之前原商品信息
+     */
+    private String itemPrevInfo;
+
+    /**
+     * 外部货品编码
+     */
+    private String goodsCode;
+
+    /**
+     * 快手仓库编码
+     */
+    private String warehouseCode;
+
+    /**
+     * 电子凭证券码库ID
+     */
+    private Long goodStoreCode;
+
+    /**
+     * 服务标签
+     */
+    private String serviceRule;
+
+    /**
+     * 是否使用运费险
+     */
+    private String freight;
+
+    /**
+     * 运费险提供者类型
+     */
+    private Long freightProviderType;
+
+    /**
+     * 首单保障
+     */
+    private String firstOrderGuarantee;
+
+    /**
+     * 急速发货 1是 0否
+     */
+    private Long instantDelivery;
+
+    /**
+     * 急速退款
+     */
+    private String instantRefund;
+
+    /**
+     * 假一赔N
+     */
+    private String compensateFake;
+
+    /**
+     * 服务规则
+     */
+    private String serviceRuleInfo;
+
+    /**
+     * 类目信息
+     */
+    private String categoryInfo;
+
+    /**
+     * 订单退款信息,返回最新的一个,若要获取当前订单关联所有退款单,可通过退款单列表API获取
+     */
+    private String orderRefundList;
+
+    /**
+     * 订单物流信息,发货前也会展示物流轨迹,详情见https://edu.kwaixiaodian.com/bbs/web/article?id=19892&layoutType=4
+     */
+    private String orderLogisticsInfo;
+
+    /**
+     * 订单插旗备注,按照创建时间逆序,最新的在第一个,最多返回30条
+     */
+    private String orderNote;
+
+    /**
+     * 收货人姓名加密密文,若为空请勿发货,disableDeliveryReasonCode有值时表示履约拦截,不返回值,可查看《订单解决方案》
+     */
+    private String encryptedConsignee;
+
+    /**
+     * 收货人姓名脱敏信息,用于展示,disableDeliveryReasonCode有值时表示履约拦截,不返回值
+     */
+    private String desensitiseConsignee;
+
+    /**
+     * 收货人手机号加密密文,若为空请勿发货,disableDeliveryReasonCode有值时表示履约拦截,不返回值,可查看《订单解决方案》
+     */
+    private String encryptedMobile;
+
+    /**
+     * 收货人手机号脱敏信息, 用于展示,disableDeliveryReasonCode有值时表示履约拦截,不返回值
+     */
+    private String desensitiseMobile;
+
+    /**
+     * 收货省份编码
+     */
+    private Long provinceCode;
+
+    /**
+     * 收货省
+     */
+    private String province;
+
+    /**
+     * 收货城市编码
+     */
+    private Long cityCode;
+
+    /**
+     * 收货城市
+     */
+    private String city;
+
+    /**
+     * 收货区编码
+     */
+    private Long districtCode;
+
+    /**
+     * 收货区
+     */
+    private String district;
+
+    /**
+     * 收货街道编码
+     */
+    private Long townCode;
+
+    /**
+     * 收货街道
+     */
+    private String town;
+
+    /**
+     * 收货详细地址加密密文,若为空请勿发货,disableDeliveryReasonCode有值时表示履约拦截,不返回值
+     */
+    private String encryptedAddress;
+
+    /**
+     * 收货详细地址脱敏信息,用于展示,disableDeliveryReasonCode有值时表示履约拦截,不返回值
+     */
+    private String desensitiseAddress;
+
+    /**
+     * 虚拟商品充值信息
+     */
+    private String rechargeAccount;
+
+    /**
+     * 用户收货地址坐标信息
+     */
+    private String coordinateInfo;
+
+    /**
+     * 订单阶段信息
+     */
+    private String orderStepInfo;
+
+    /**
+     * 分销者的ID
+     */
+    private Long distributorId;
+
+    /**
+     * 分销者名称
+     */
+    private String distributorName;
+
+    /**
+     * 订单发货信息
+     */
+    private String orderDeliveryInfo;
+
+    /**
+     * 附属单信息
+     */
+    private String subOrderInfo;
+
+    /**
+     * 订单创建时间(转化为YYYYMMDD)
+     */
+    private Long statDate;
+    /**
+     * 订单创建时间
+     */
+    private String createTime;
+    /**
+     * 订单更新时间
+     */
+    private String updateTime;
+
+    /**
+     * 买家留言
+     */
+    private String remark;
+
+    public KwaixiaodianOrderCursorList() {
+    }
+
+    public KwaixiaodianOrderCursorList(KuaishouAccessToken token, JSONObject object) {
+        this.setShopId(Long.valueOf(token.getId()));
+        this.setShopName(token.getShopName());
+        this.setCompanyId(token.getCompanyId());
+        this.setCompanyName(token.getCompanyName());
+
+        JSONObject orderBaseInfo = object.getJSONObject("orderBaseInfo");
+        if (Check.isNotNull(orderBaseInfo)) {
+            this.setOid(orderBaseInfo.getLong("oid"));
+            this.setPayTime(orderBaseInfo.getLong("payTime"));
+            this.setBuyerImage(orderBaseInfo.getString("buyerImage"));
+            this.setBuyerOpenId(orderBaseInfo.getString("buyerOpenId"));
+            this.setBuyerNick(orderBaseInfo.getString("buyerNick"));
+            this.setSellerOpenId(orderBaseInfo.getString("sellerOpenId"));
+            this.setDiscountFee(orderBaseInfo.getLong("discountFee"));
+            this.setTotalFee(orderBaseInfo.getLong("totalFee"));
+            this.setStatus(orderBaseInfo.getLong("status"));
+            this.setSendTime(orderBaseInfo.getLong("sendTime"));
+            this.setRefundTime(orderBaseInfo.getLong("refundTime"));
+            this.setCreateTime(orderBaseInfo.getString("createTime"));
+            this.setStatDate(Long.valueOf(DateUtils.timestamptoStr(orderBaseInfo.getLong("createTime"))));
+            this.setUpdateTime(orderBaseInfo.getString("updateTime"));
+            this.setRemark(orderBaseInfo.getString("remark"));
+            this.setTheDayOfDeliverGoodsTime(orderBaseInfo.getLong("theDayOfDeliverGoodsTime"));
+            this.setPromiseTimeStampOfDelivery(orderBaseInfo.getLong("promiseTimeStampOfDelivery"));
+            this.setCpsType(orderBaseInfo.getLong("cpsType"));
+            this.setValidPromiseShipmentTimeStamp(orderBaseInfo.getLong("validPromiseShipmentTimeStamp"));
+            this.setPreSale(orderBaseInfo.getLong("preSale"));
+            this.setRecvTime(orderBaseInfo.getLong("recvTime"));
+            this.setCoType(orderBaseInfo.getLong("coType"));
+            this.setCommentStatus(orderBaseInfo.getLong("commentStatus"));
+            this.setPayType(orderBaseInfo.getLong("payType"));
+            this.setRiskCode(orderBaseInfo.getLong("riskCode"));
+            this.setPayChannel(orderBaseInfo.getString("payChannel"));
+            this.setSellerDelayPromiseTimeStamp(orderBaseInfo.getLong("sellerDelayPromiseTimeStamp"));
+            this.setPriorityDelivery(orderBaseInfo.getString("priorityDelivery"));
+            this.setRemindShipmentSign(orderBaseInfo.getLong("remindShipmentSign"));
+            this.setRemindShipmentTime(orderBaseInfo.getLong("remindShipmentTime"));
+            this.setOrderSellerRoleInfo(orderBaseInfo.getString("orderSellerRoleInfo"));
+            this.setDisableDeliveryReasonCode(orderBaseInfo.getString("disableDeliveryReasonCode"));
+            this.setOrderLabels(orderBaseInfo.getString("orderLabels"));
+            this.setEnableSplitDeliveryOrderb(orderBaseInfo.getString("enableSplitDeliveryOrder"));
+            this.setSellerNick(orderBaseInfo.getString("sellerNick"));
+            this.setExpressFee(orderBaseInfo.getLong("expressFee"));
+            this.setMultiplePiecesNo(orderBaseInfo.getLong("multiplePiecesNo"));
+            this.setAllActivityType(orderBaseInfo.getString("allActivityType"));
+            this.setAllowanceExpressFee(orderBaseInfo.getLong("allowanceExpressFee"));
+            this.setPayChannelDiscount(orderBaseInfo.getLong("payChannelDiscount"));
+            this.setTradeInPayAfterPromoAmount(orderBaseInfo.getLong("tradeInPayAfterPromoAmount"));
+            this.setGovernmentDiscount(orderBaseInfo.getLong("governmentDiscount"));
+        }
+
+        JSONObject orderItemInfo = object.getJSONObject("orderItemInfo");
+        if (Check.isNotNull(orderItemInfo)) {
+            this.setSkuId(orderItemInfo.getLong("skuId"));
+            this.setRelSkuId(orderItemInfo.getLong("relSkuId"));
+            this.setSkuDesc(orderItemInfo.getString("skuDesc"));
+            this.setSkuNick(orderItemInfo.getString("skuNick"));
+            this.setItemId(orderItemInfo.getLong("itemId"));
+            this.setRelItemId(orderItemInfo.getLong("relItemId"));
+            this.setItemTitle(orderItemInfo.getString("itemTitle"));
+            this.setItemLinkUrl(orderItemInfo.getString("itemLinkUrl"));
+            this.setItemPicUrl(orderItemInfo.getString("itemPicUrl"));
+            this.setNum(orderItemInfo.getLong("num"));
+            this.setOriginalPrice(orderItemInfo.getLong("originalPrice"));
+            this.setItemDiscountFee(orderItemInfo.getLong("discountFee"));
+            this.setPrice(orderItemInfo.getLong("price"));
+            this.setItemType(orderItemInfo.getLong("itemType"));
+            this.setItemPrevInfo(orderItemInfo.getString("itemPrevInfo"));
+            this.setGoodsCode(orderItemInfo.getString("goodsCode"));
+            this.setWarehouseCode(orderItemInfo.getString("warehouseCode"));
+            this.setGoodStoreCode(orderItemInfo.getLong("goodStoreCode"));
+            if (Check.isNotNull(orderItemInfo.getJSONObject("serviceInfo"))) {
+                this.setServiceRule(orderItemInfo.getJSONObject("serviceInfo").getString("serviceRule"));
+                this.setFreight(orderItemInfo.getJSONObject("serviceInfo").getString("freight"));
+                this.setFreightProviderType(orderItemInfo.getJSONObject("serviceInfo").getLong("freightProviderType"));
+                this.setFirstOrderGuarantee(orderItemInfo.getJSONObject("serviceInfo").getString("firstOrderGuarantee"));
+                this.setInstantDelivery(orderItemInfo.getJSONObject("serviceInfo").getLong("instantDelivery"));
+                this.setInstantRefund(orderItemInfo.getJSONObject("serviceInfo").getString("instantRefund"));
+                this.setCompensateFake(orderItemInfo.getJSONObject("serviceInfo").getString("compensateFake"));
+                this.setServiceRuleInfo(orderItemInfo.getJSONObject("serviceInfo").getString("serviceRuleInfo"));
+            }
+            if (Check.isNotNull(orderItemInfo.getJSONObject("itemExtra"))) {
+                this.setCategoryInfo(orderItemInfo.getJSONObject("itemExtra").getString("categoryInfo"));
+            }
+        }
+
+        JSONObject orderAddress = object.getJSONObject("orderAddress");
+        if (Check.isNotNull(orderAddress)) {
+            this.setEncryptedConsignee(orderAddress.getString("encryptedConsignee"));
+            this.setDesensitiseConsignee(orderAddress.getString("desensitiseConsignee"));
+            this.setEncryptedMobile(orderAddress.getString("encryptedMobile"));
+            this.setDesensitiseMobile(orderAddress.getString("desensitiseMobile"));
+            this.setProvinceCode(orderAddress.getLong("provinceCode"));
+            this.setProvince(orderAddress.getString("province"));
+            this.setCityCode(orderAddress.getLong("cityCode"));
+            this.setCity(orderAddress.getString("city"));
+            this.setDistrictCode(orderAddress.getLong("districtCode"));
+            this.setDistrict(orderAddress.getString("district"));
+            this.setTownCode(orderAddress.getLong("townCode"));
+            this.setTown(orderAddress.getString("town"));
+            this.setEncryptedAddress(orderAddress.getString("encryptedAddress"));
+            this.setDesensitiseAddress(orderAddress.getString("desensitiseAddress"));
+            this.setRechargeAccount(orderAddress.getString("rechargeAccount"));
+            this.setCoordinateInfo(orderAddress.getString("coordinateInfo"));
+        }
+
+        JSONObject orderCpsInfo = object.getJSONObject("orderCpsInfo");
+        if (Check.isNotNull(orderCpsInfo)) {
+            this.setDistributorId(orderCpsInfo.getLong("distributorId"));
+            this.setDistributorName(orderCpsInfo.getString("distributorName"));
+        }
+
+
+        this.setOrderRefundList(object.getString("orderRefundList"));
+        this.setOrderLogisticsInfo(object.getString("orderLogisticsInfo"));
+        this.setOrderNote(object.getString("orderNote"));
+        this.setOrderStepInfo(object.getString("orderStepInfo"));
+        this.setOrderDeliveryInfo(object.getString("orderDeliveryInfo"));
+        this.setSubOrderInfo(object.getString("subOrderInfo"));
+    }
+
+}

+ 2 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/AccessTokenMapper.java

@@ -11,6 +11,8 @@ import java.util.List;
 public interface AccessTokenMapper {
     KuaishouAccessToken getAccessToken(Long regId);
 
+    KuaishouAccessToken getKWaiAccessToken(String id);
+
     List<KuaishouAccessToken> getTokenInfos();
 
     void update(KuaishouAccessToken updateToken);

+ 22 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/KwaixiaodianItemGetMapper.java

@@ -0,0 +1,22 @@
+package com.ruixuan.isc.mapper;
+
+import com.ruixuan.isc.entity.KwaixiaodianItemGet;
+import com.ruixuan.isc.entity.KwaixiaodianItemGetSku;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * kwaixiaodian商品详情Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-10-28
+ */
+public interface KwaixiaodianItemGetMapper
+{
+    void replaceBatchKWaixiaodianItems(@Param("list") List<KwaixiaodianItemGet> list);
+
+    void replaceKWaixiaodianItems(@Param("itemGet") KwaixiaodianItemGet itemGet);
+
+    void replaceBatchKWaixiaodianItemSku(@Param("list")  List<KwaixiaodianItemGetSku> list);
+}

+ 17 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/KwaixiaodianOrderCursorListMapper.java

@@ -0,0 +1,17 @@
+package com.ruixuan.isc.mapper;
+
+import com.ruixuan.isc.entity.KwaixiaodianOrderCursorList;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * kwaixiaodian商品详情Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-10-28
+ */
+public interface KwaixiaodianOrderCursorListMapper {
+
+    void replaceBatchKWaixiaodianOrderCursorList(@Param("list") List<KwaixiaodianOrderCursorList> orderCursorList);
+}

+ 2 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/service/IAccessTokenService.java

@@ -8,6 +8,8 @@ public interface IAccessTokenService {
 
     KuaishouAccessToken getAccessToken(Long regId);
 
+    KuaishouAccessToken getKWaiAccessToken(String id);
+
     void refreshAccessToken();
 
     void refreshJYAccessToken();

+ 17 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/service/IKwaixiaodianItemGetService.java

@@ -0,0 +1,17 @@
+package com.ruixuan.isc.service;
+
+import com.ruixuan.isc.entity.KwaixiaodianItemGet;
+
+import java.util.List;
+
+/**
+ * kwaixiaodian商品详情Service接口
+ *
+ * @author ruoyi
+ * @date 2024-10-28
+ */
+public interface IKwaixiaodianItemGetService
+{
+    void querykwaiItmInfo(Long kwaiItemId, String shopId, String userId, String userName);
+
+}

+ 11 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/service/IKwaixiaodianOrderCursorListService.java

@@ -0,0 +1,11 @@
+package com.ruixuan.isc.service;
+
+/**
+ * kwaixiaodian商品详情Service接口
+ *
+ * @author ruoyi
+ * @date 2024-10-28
+ */
+public interface IKwaixiaodianOrderCursorListService {
+    void querykwaiOrderList(String shopId, String beginDate, String endDate, String cursor);
+}

+ 5 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/AccessTokenServiceImpl.java

@@ -37,6 +37,11 @@ public class AccessTokenServiceImpl implements IAccessTokenService {
     }
 
     @Override
+    public KuaishouAccessToken getKWaiAccessToken(String  id) {
+        return accessTokenMapper.getKWaiAccessToken(id);
+    }
+
+    @Override
     public void refreshAccessToken() {
         refreshKuaiShouAccessToken();
         refreshByteDanceAccessToken();

+ 121 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KwaixiaodianItemGetServiceImpl.java

@@ -0,0 +1,121 @@
+package com.ruixuan.isc.service.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.kuaishou.merchant.open.api.KsMerchantApiException;
+import com.kuaishou.merchant.open.api.client.AccessTokenKsMerchantClient;
+import com.kuaishou.merchant.open.api.common.utils.GsonUtils;
+import com.kuaishou.merchant.open.api.request.item.OpenItemGetRequest;
+import com.kuaishou.merchant.open.api.response.item.OpenItemGetResponse;
+import com.ruixuan.common.utils.Check;
+import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.isc.constants.KuaiShouConstants;
+import com.ruixuan.isc.entity.KuaishouAccessToken;
+import com.ruixuan.isc.entity.KwaixiaodianItemGet;
+import com.ruixuan.isc.entity.KwaixiaodianItemGetSku;
+import com.ruixuan.isc.mapper.KwaixiaodianItemGetMapper;
+import com.ruixuan.isc.service.IAccessTokenService;
+import com.ruixuan.isc.service.IKwaixiaodianItemGetService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * kwaixiaodian商品详情Service业务层处理
+ *
+ * @date 2024-10-28
+ */
+@Slf4j
+@Service
+public class KwaixiaodianItemGetServiceImpl implements IKwaixiaodianItemGetService {
+    @Autowired
+    private KwaixiaodianItemGetMapper mapper;
+    @Autowired
+    private IAccessTokenService accessTokenService;
+
+    /**
+     * 添加数据 replace
+     * 表:kwaixiaodian_item_get
+     */
+    @Override
+    public void querykwaiItmInfo(Long kwaiItemId, String shopId, String userId, String userName) {
+        try {
+            KuaishouAccessToken token = accessTokenService.getKWaiAccessToken(shopId);
+            if (Check.isNull(token)) {
+                log.error("----kwaixiaodian获取商品详情,kwaiItemId:{} 没有token信息", kwaiItemId);
+            }
+            AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(KuaiShouConstants.KFX_URL, token.getAppKey(), token.getSignSecret());
+            OpenItemGetRequest request = new OpenItemGetRequest();
+            request.setAccessToken(token.getAccessToken());
+            request.setApiMethodVersion(1L);
+            request.setKwaiItemId(kwaiItemId);
+            OpenItemGetResponse response = null;
+            try {
+                response = client.execute(request);
+            } catch (KsMerchantApiException e) {
+                e.printStackTrace();
+            }
+            JSONObject jsonObject = JSONObject.parseObject(GsonUtils.toJSON(response));
+//        System.out.println(GsonUtils.toJSON(response));
+            String code = jsonObject.getString("code");
+            if ("1".equals(code)) {
+                JSONObject data = jsonObject.getJSONObject("data");
+                KwaixiaodianItemGet itemGet = JSONObject.parseObject(data.toJSONString(), KwaixiaodianItemGet.class);
+                itemGet.setUserId(userId);
+                itemGet.setUserName(userName);
+                itemGet.setShopId(shopId);
+                itemGet.setShopName(token.getShopName());
+                itemGet.setCompanyId(token.getCompanyId());
+                itemGet.setCompanyName(token.getCompanyName());
+                itemGet.setLeaderName(token.getLeaderName());
+                itemGet.setCreatedTimeMs(data.getLong("createdTime"));
+                itemGet.setCreatedTime(DateUtils.timestamptoMinutesAndSecondsStr(itemGet.getCreatedTimeMs()));
+                itemGet.setUpdateTimeMs(data.getLong("updateTime"));
+                itemGet.setUpdateTime(DateUtils.timestamptoMinutesAndSecondsStr(itemGet.getUpdateTimeMs()));
+                //ture-货品库存模式;false-商品库存模式     ->     1-货品库存模式;2-商品库存模式
+                itemGet.setMultipleStock(data.getBoolean("multipleStock") ? "1" : "2");
+                //是否限购,true:支持限购,false:不支持限购    ->    1:支持限购,0:不支持限购
+                itemGet.setPurchaseLimit(data.getBoolean("purchaseLimit") ? "1" : "0");
+                //是否是合约机商品,true:是,false:否    ->    1:是,0:否
+                itemGet.setContractPhone(data.getBoolean("contractPhone") ? "1" : "0");
+
+                mapper.replaceKWaixiaodianItems(itemGet);
+                replaceItemGetSku(data.getJSONArray("skuInfos"));
+            } else {
+                log.error("===kwaixiaodian获取商品详情(open.item.get)失败,kwaiItemId:{},信息:{}", kwaiItemId, jsonObject.getString("error_msg"));
+
+            }
+        } catch (Exception e) {
+            log.error("===kwaixiaodian获取商品详情异常 querykwaiItmInfo");
+            e.printStackTrace();
+        }
+    }
+
+    private void replaceItemGetSku(JSONArray skuInfos) {
+        try {
+            if (Check.isNull(skuInfos)) {
+                return;
+            }
+            List<KwaixiaodianItemGetSku> list = new ArrayList<>();
+            for (int i = 0; i < skuInfos.size(); i++) {
+                JSONObject data = skuInfos.getJSONObject(i);
+                KwaixiaodianItemGetSku sku = JSONObject.parseObject(data.toJSONString(), KwaixiaodianItemGetSku.class);
+                sku.setCreateTimeMs(data.getLong("createTime"));
+                sku.setCreateTime(DateUtils.timestamptoMinutesAndSecondsStr(sku.getCreateTimeMs()));
+                sku.setUpdateTimeMs(data.getLong("updateTime"));
+                sku.setUpdateTime(DateUtils.timestamptoMinutesAndSecondsStr(sku.getUpdateTimeMs()));
+                list.add(sku);
+            }
+            if (!Check.isNull(list) && list.size() > 0) {
+                mapper.replaceBatchKWaixiaodianItemSku(list);
+            }
+        } catch (Exception e) {
+            log.error("===kwaixiaodian获取商品详情异常 replaceItemGetSku");
+            e.printStackTrace();
+        }
+    }
+
+}

+ 111 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KwaixiaodianOrderCursorListServiceImpl.java

@@ -0,0 +1,111 @@
+package com.ruixuan.isc.service.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.kuaishou.merchant.open.api.KsMerchantApiException;
+import com.kuaishou.merchant.open.api.client.AccessTokenKsMerchantClient;
+import com.kuaishou.merchant.open.api.common.utils.GsonUtils;
+import com.kuaishou.merchant.open.api.request.order.OpenOrderCursorListRequest;
+import com.kuaishou.merchant.open.api.response.order.OpenOrderCursorListResponse;
+import com.ruixuan.common.utils.Check;
+import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.isc.constants.KuaiShouConstants;
+import com.ruixuan.isc.entity.KuaishouAccessToken;
+import com.ruixuan.isc.entity.KwaixiaodianOrderCursorList;
+import com.ruixuan.isc.mapper.KwaixiaodianOrderCursorListMapper;
+import com.ruixuan.isc.service.IAccessTokenService;
+import com.ruixuan.isc.service.IKwaixiaodianOrderCursorListService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * kwaixiaodian商品详情Service业务层处理
+ *
+ * @date 2024-10-28
+ */
+@Slf4j
+@Service
+public class KwaixiaodianOrderCursorListServiceImpl implements IKwaixiaodianOrderCursorListService {
+    @Autowired
+    private KwaixiaodianOrderCursorListMapper mapper;
+    @Autowired
+    private IAccessTokenService accessTokenService;
+
+    /**
+     * 添加数据 replace
+     * 表:kwaixiaodian_item_get
+     */
+    @Override
+    public void querykwaiOrderList(String shopId, String beginDate, String endDate, String cursor) {
+        try {
+            Long beginTime = DateUtils.getStartLongTime(beginDate);
+            Long endTime = DateUtils.getEndLongTime(endDate);
+            KuaishouAccessToken token = accessTokenService.getKWaiAccessToken(shopId);
+            if (Check.isNull(token)) {
+                log.error("----kwaixiaodian获取订单列表,shopId:{} 没有token信息", shopId);
+            }
+
+            AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(KuaiShouConstants.KFX_URL, token.getAppKey(), token.getSignSecret());
+
+            OpenOrderCursorListRequest request = new OpenOrderCursorListRequest();
+            request.setAccessToken(token.getAccessToken());
+            request.setApiMethodVersion(1L);
+
+            //订单状态,0未知 1 全部 2 待付款 3 待发货 4 待收货(已发货)5 已收货 6 交易成功订单 7 已关闭订单。若此API返回超时,请传入1后重试
+            request.setOrderViewStatus(1);
+            //每页请求数量 最多一页50条
+            request.setPageSize(50);
+            //1时间降序 2时间升序 默认降序
+            request.setSort(1);
+            //1按创建时间查找 2按更新时间查找 ;默认创建时间,值为1时只允许获取创建时间90天内的订单数据,值为2时仅允许获取更新时间90天内且创建时间240天内的订单数据
+            request.setQueryType(1);
+            //订单生成时间的开始时间,单位毫秒, 不能小于90天前,且需要小于结束时间
+            request.setBeginTime(beginTime);
+            //订单生成时间的截止时间,单位毫秒,与开始时间的时间范围不大于7天
+            request.setEndTime(endTime);
+            //分销类型 0-全部 1-普通订单 2-分销订单
+            request.setCpsType(0);
+            //游标内容 第一次传空串,之后传上一次的cursor返回值,若返回“nomore”则标识到底
+            request.setCursor(cursor);
+            OpenOrderCursorListResponse response = null;
+            try {
+                response = client.execute(request);
+            } catch (KsMerchantApiException e) {
+                e.printStackTrace();
+            }
+            JSONObject jsonObject = JSONObject.parseObject(GsonUtils.toJSON(response));
+            System.out.println(GsonUtils.toJSON(response));
+            String code = jsonObject.getString("code");
+            if ("1".equals(code)) {
+                JSONObject data = jsonObject.getJSONObject("data");
+                cursor = data.getString("cursor");
+                JSONArray orderList = data.getJSONArray("orderList");
+                List<KwaixiaodianOrderCursorList> orderCursorList = new ArrayList<>();
+                for (int i = 0; i < orderList.size(); i++) {
+                    JSONObject object = orderList.getJSONObject(i);
+                    KwaixiaodianOrderCursorList order = new KwaixiaodianOrderCursorList(token, object);
+                    orderCursorList.add(order);
+                }
+                if (Check.isNotNull(orderCursorList)) {
+                    System.out.println(orderCursorList);
+                    mapper.replaceBatchKWaixiaodianOrderCursorList(orderCursorList);
+                }
+
+            } else {
+                log.error("===kwaixiaodian获取订单列表(open.order.cursor.list)失败,shopId:{},信息:{}", shopId, jsonObject.getString("error_msg"));
+            }
+
+            if (!"nomore".equals(cursor)) {
+                querykwaiOrderList(shopId, beginDate, endDate, cursor);
+            }
+        } catch (Exception e) {
+            log.error("===kwaixiaodian获取订单列表异常 querykwaiOrderList");
+            e.printStackTrace();
+        }
+    }
+
+}

+ 6 - 0
ruixuan-live/src/main/resources/mapper/isc/AccessTokenMapper.xml

@@ -38,6 +38,12 @@
         where id = #{regId} limit 1
     </select>
 
+    <select id="getKWaiAccessToken" resultType="com.ruixuan.isc.entity.KuaishouAccessToken">
+        select *
+        from kwaixiaodian_access_token
+        where id = #{id} limit 1
+    </select>
+
     <select id="getTokenInfos" resultType="com.ruixuan.isc.entity.KuaishouAccessToken">
         select *
         from kuaishou_access_token

+ 274 - 0
ruixuan-live/src/main/resources/mapper/isc/KwaixiaodianItemGetMapper.xml

@@ -0,0 +1,274 @@
+<?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.ruixuan.isc.mapper.KwaixiaodianItemGetMapper">
+
+    <insert id="replaceBatchKWaixiaodianItems">
+        replace into `ruixuan`.kwaixiaodian_item_get(
+        item_id,
+        user_id,
+        user_name,
+        shop_id,
+        shop_name,
+        company_id,
+        company_name,
+        leader_name,
+        rel_item_id,
+        category_id,
+        category_name,
+        parent_category_id,
+        parent_category_name,
+        root_category_Id,
+        root_category_name,
+        title,
+        details,
+        image_urls,
+        detail_image_urls,
+        service_rule,
+        audit_status,
+        audit_reason,
+        created_time_ms,
+        created_time,
+        update_time_ms,
+        update_time,
+        on_offline_status,
+        parent_category_list,
+        item_prop_values,
+        express_template_id,
+        purchase_limit,
+        limit_count,
+        link_url,
+        time_of_sale,
+        item_remark,
+        duplication_status,
+        duplication_reason,
+        multiple_stock,
+        poi_ids,
+        white_base_image_url,
+        transparent_image_url,
+        short_title,
+        selling_point,
+        instructions,
+        contract_phone,
+        offline_reason,
+        item_qualification,
+        spu_id
+        )
+        values
+        <foreach collection="list" item="li" separator=",">
+            (
+            #{li.itemId},
+            #{li.userId},
+            #{li.userName},
+            #{li.shopId},
+            #{li.shopName},
+            #{li.companyId},
+            #{li.companyName},
+            #{li.leaderName},
+            #{li.relItemId},
+            #{li.categoryId},
+            #{li.categoryName},
+            #{li.parentCategoryId},
+            #{li.parentCategoryName},
+            #{li.rootCategoryId},
+            #{li.rootCategoryName},
+            #{li.title},
+            #{li.details},
+            #{li.imageUrls},
+            #{li.detailImageUrls},
+            #{li.serviceRule},
+            #{li.auditStatus},
+            #{li.auditReason},
+            #{li.createdTimeMs},
+            #{li.createdTime},
+            #{li.updateTimeMs},
+            #{li.updateTime},
+            #{li.onOfflineStatus},
+            #{li.parentCategoryList},
+            #{li.itemPropValues},
+            #{li.expressTemplateId},
+            #{li.purchaseLimit},
+            #{li.limitCount},
+            #{li.linkUrl},
+            #{li.timeOfSale},
+            #{li.itemRemark},
+            #{li.duplicationStatus},
+            #{li.duplicationReason},
+            #{li.multipleStock},
+            #{li.poiIds},
+            #{li.whiteBaseImageUrl},
+            #{li.transparentImageUrl},
+            #{li.shortTitle},
+            #{li.sellingPoint},
+            #{li.instructions},
+            #{li.contractPhone},
+            #{li.offlineReason},
+            #{li.itemQualification},
+            #{li.spuId}
+            )
+        </foreach>
+    </insert>
+
+    <insert id="replaceKWaixiaodianItems">
+        replace
+        into `ruixuan`.kwaixiaodian_item_get(
+        item_id,
+        user_id,
+        user_name,
+        shop_id,
+        shop_name,
+        company_id,
+        company_name,
+        leader_name,
+        rel_item_id,
+        category_id,
+        category_name,
+        parent_category_id,
+        parent_category_name,
+        root_category_Id,
+        root_category_name,
+        title,
+        details,
+        image_urls,
+        detail_image_urls,
+        service_rule,
+        audit_status,
+        audit_reason,
+        created_time_ms,
+        created_time,
+        update_time_ms,
+        update_time,
+        on_offline_status,
+        parent_category_list,
+        item_prop_values,
+        express_template_id,
+        purchase_limit,
+        limit_count,
+        link_url,
+        time_of_sale,
+        item_remark,
+        duplication_status,
+        duplication_reason,
+        multiple_stock,
+        poi_ids,
+        white_base_image_url,
+        transparent_image_url,
+        short_title,
+        selling_point,
+        instructions,
+        contract_phone,
+        offline_reason,
+        item_qualification,
+        spu_id
+        )
+        values
+            (
+        #{itemGet.itemId},
+        #{itemGet.userId},
+        #{itemGet.userName},
+        #{itemGet.shopId},
+        #{itemGet.shopName},
+        #{itemGet.companyId},
+        #{itemGet.companyName},
+        #{itemGet.leaderName},
+        #{itemGet.relItemId},
+        #{itemGet.categoryId},
+        #{itemGet.categoryName},
+        #{itemGet.parentCategoryId},
+        #{itemGet.parentCategoryName},
+        #{itemGet.rootCategoryId},
+        #{itemGet.rootCategoryName},
+        #{itemGet.title},
+        #{itemGet.details},
+        #{itemGet.imageUrls},
+        #{itemGet.detailImageUrls},
+        #{itemGet.serviceRule},
+        #{itemGet.auditStatus},
+        #{itemGet.auditReason},
+        #{itemGet.createdTimeMs},
+        #{itemGet.createdTime},
+        #{itemGet.updateTimeMs},
+        #{itemGet.updateTime},
+        #{itemGet.onOfflineStatus},
+        #{itemGet.parentCategoryList},
+        #{itemGet.itemPropValues},
+        #{itemGet.expressTemplateId},
+        #{itemGet.purchaseLimit},
+        #{itemGet.limitCount},
+        #{itemGet.linkUrl},
+        #{itemGet.timeOfSale},
+        #{itemGet.itemRemark},
+        #{itemGet.duplicationStatus},
+        #{itemGet.duplicationReason},
+        #{itemGet.multipleStock},
+        #{itemGet.poiIds},
+        #{itemGet.whiteBaseImageUrl},
+        #{itemGet.transparentImageUrl},
+        #{itemGet.shortTitle},
+        #{itemGet.sellingPoint},
+        #{itemGet.instructions},
+        #{itemGet.contractPhone},
+        #{itemGet.offlineReason},
+        #{itemGet.itemQualification},
+        #{itemGet.spuId}
+        )
+    </insert>
+
+
+    <insert id="replaceBatchKWaixiaodianItemSku">
+        replace into `ruixuan`.kwaixiaodian_item_get_sku(
+        kwai_item_id,
+        kwai_sku_id,
+        rel_sku_id,
+        sku_stock,
+        image_url,
+        sku_sale_price,
+        volume,
+        is_valid,
+        specification,
+        appkey,
+        sku_nick,
+        sku_prop,
+        gtin_code,
+        meal_detail,
+        reserve_stock,
+        package_code,
+        goods_id,
+        goods_code,
+        create_time_ms,
+        update_time_ms,
+        create_time,
+        update_time
+        )
+        values
+        <foreach collection="list" item="li" separator=",">
+            (
+            #{li.kwaiItemId},
+            #{li.kwaiSkuId},
+            #{li.relSkuId},
+            #{li.skuStock},
+            #{li.imageUrl},
+            #{li.skuSalePrice},
+            #{li.volume},
+            #{li.isValid},
+            #{li.specification},
+            #{li.appkey},
+            #{li.skuNick},
+            #{li.skuProp},
+            #{li.gtinCode},
+            #{li.mealDetail},
+            #{li.reserveStock},
+            #{li.packageCode},
+            #{li.goodsId},
+            #{li.goodsCode},
+            #{li.createTimeMs},
+            #{li.updateTimeMs},
+            #{li.createTime},
+            #{li.updateTime}
+            )
+        </foreach>
+    </insert>
+
+
+</mapper>

+ 211 - 0
ruixuan-live/src/main/resources/mapper/isc/KwaixiaodianOrderCursorListMapper.xml

@@ -0,0 +1,211 @@
+<?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.ruixuan.isc.mapper.KwaixiaodianOrderCursorListMapper">
+
+    <insert id="replaceBatchKWaixiaodianOrderCursorList">
+        replace into `ruixuan`.kwaixiaodian_order_cursor_list(
+        company_id,
+        company_name,
+        shop_id,
+        shop_name,
+        oid,
+        payTime,
+        buyerImage,
+        buyerOpenId,
+        buyerNick,
+        sellerOpenId,
+        sellerNick,
+        expressFee,
+        discountFee,
+        totalFee,
+        status,
+        sendTime,
+        refundTime,
+        createTime,
+        updateTime,
+        remark,
+        theDayOfDeliverGoodsTime,
+        promiseTimeStampOfDelivery,
+        cpsType,
+        validPromiseShipmentTimeStamp,
+        preSale,
+        recvTime,
+        coType,
+        commentStatus,
+        payType,
+        riskCode,
+        payChannel,
+        sellerDelayPromiseTimeStamp,
+        priorityDelivery,
+        remindShipmentSign,
+        remindShipmentTime,
+        orderSellerRoleInfo,
+        disableDeliveryReasonCode,
+        multiplePiecesNo,
+        allActivityType,
+        orderLabels,
+        enableSplitDeliveryOrderb,
+        allowanceExpressFee,
+        payChannelDiscount,
+        tradeInPayAfterPromoAmount,
+        governmentDiscount,
+        skuId,
+        relSkuId,
+        skuDesc,
+        skuNick,
+        itemId,
+        relItemId,
+        itemTitle,
+        itemLinkUrl,
+        itemPicUrl,
+        num,
+        originalPrice,
+        itemDiscountFee,
+        price,
+        itemType,
+        itemPrevInfo,
+        goodsCode,
+        warehouseCode,
+        goodStoreCode,
+        serviceRule,
+        freight,
+        freightProviderType,
+        firstOrderGuarantee,
+        instantDelivery,
+        instantRefund,
+        compensateFake,
+        serviceRuleInfo,
+        categoryInfo,
+        orderRefundList,
+        orderLogisticsInfo,
+        orderNote,
+        encryptedConsignee,
+        desensitiseConsignee,
+        encryptedMobile,
+        desensitiseMobile,
+        provinceCode,
+        province,
+        cityCode,
+        city,
+        districtCode,
+        district,
+        townCode,
+        town,
+        encryptedAddress,
+        desensitiseAddress,
+        rechargeAccount,
+        coordinateInfo,
+        orderStepInfo,
+        distributorId,
+        distributorName,
+        orderDeliveryInfo,
+        subOrderInfo,
+        stat_date
+        )
+        values
+        <foreach collection="list" item="li" separator=",">
+            (
+            #{li.companyId},
+            #{li.companyName},
+            #{li.shopId},
+            #{li.shopName},
+            #{li.oid},
+            #{li.payTime},
+            #{li.buyerImage},
+            #{li.buyerOpenId},
+            #{li.buyerNick},
+            #{li.sellerOpenId},
+            #{li.sellerNick},
+            #{li.expressFee},
+            #{li.discountFee},
+            #{li.totalFee},
+            #{li.status},
+            #{li.sendTime},
+            #{li.refundTime},
+            #{li.createTime},
+            #{li.updateTime},
+            #{li.remark},
+            #{li.theDayOfDeliverGoodsTime},
+            #{li.promiseTimeStampOfDelivery},
+            #{li.cpsType},
+            #{li.validPromiseShipmentTimeStamp},
+            #{li.preSale},
+            #{li.recvTime},
+            #{li.coType},
+            #{li.commentStatus},
+            #{li.payType},
+            #{li.riskCode},
+            #{li.payChannel},
+            #{li.sellerDelayPromiseTimeStamp},
+            #{li.priorityDelivery},
+            #{li.remindShipmentSign},
+            #{li.remindShipmentTime},
+            #{li.orderSellerRoleInfo},
+            #{li.disableDeliveryReasonCode},
+            #{li.multiplePiecesNo},
+            #{li.allActivityType},
+            #{li.orderLabels},
+            #{li.enableSplitDeliveryOrderb},
+            #{li.allowanceExpressFee},
+            #{li.payChannelDiscount},
+            #{li.tradeInPayAfterPromoAmount},
+            #{li.governmentDiscount},
+            #{li.skuId},
+            #{li.relSkuId},
+            #{li.skuDesc},
+            #{li.skuNick},
+            #{li.itemId},
+            #{li.relItemId},
+            #{li.itemTitle},
+            #{li.itemLinkUrl},
+            #{li.itemPicUrl},
+            #{li.num},
+            #{li.originalPrice},
+            #{li.itemDiscountFee},
+            #{li.price},
+            #{li.itemType},
+            #{li.itemPrevInfo},
+            #{li.goodsCode},
+            #{li.warehouseCode},
+            #{li.goodStoreCode},
+            #{li.serviceRule},
+            #{li.freight},
+            #{li.freightProviderType},
+            #{li.firstOrderGuarantee},
+            #{li.instantDelivery},
+            #{li.instantRefund},
+            #{li.compensateFake},
+            #{li.serviceRuleInfo},
+            #{li.categoryInfo},
+            #{li.orderRefundList},
+            #{li.orderLogisticsInfo},
+            #{li.orderNote},
+            #{li.encryptedConsignee},
+            #{li.desensitiseConsignee},
+            #{li.encryptedMobile},
+            #{li.desensitiseMobile},
+            #{li.provinceCode},
+            #{li.province},
+            #{li.cityCode},
+            #{li.city},
+            #{li.districtCode},
+            #{li.district},
+            #{li.townCode},
+            #{li.town},
+            #{li.encryptedAddress},
+            #{li.desensitiseAddress},
+            #{li.rechargeAccount},
+            #{li.coordinateInfo},
+            #{li.orderStepInfo},
+            #{li.distributorId},
+            #{li.distributorName},
+            #{li.orderDeliveryInfo},
+            #{li.subOrderInfo},
+            #{li.statDate}
+            )
+        </foreach>
+    </insert>
+
+</mapper>