mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🎨 #2715【企业微信&小程序】微信客服、小程序物流服务和交易组件 等相关接口优化更新
This commit is contained in:
parent
a807063f4c
commit
4fd6693c56
@ -2,6 +2,22 @@ package me.chanjar.weixin.cp.api;
|
||||
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountAdd;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountAddResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountDel;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountLink;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountLinkResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountListResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountUpd;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfCustomerBatchGetResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfMsgListResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfMsgSendRequest;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfMsgSendResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServiceStateResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServiceStateTransResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServiceUpgradeConfigResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServicerListResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServicerOpResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.*;
|
||||
|
||||
import java.util.List;
|
||||
@ -189,4 +205,46 @@ public interface WxCpKfService {
|
||||
* @return 客户数据统计-企业汇总数据
|
||||
*/
|
||||
WxCpKfGetCorpStatisticResp getCorpStatistic(WxCpKfGetCorpStatisticRequest request) throws WxErrorException;
|
||||
|
||||
// 「升级服务」配置
|
||||
/**
|
||||
* 获取配置的专员与客户群
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxCpKfServiceUpgradeConfigResp getUpgradeServiceConfig() throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 升级专员服务
|
||||
* @param openKfid 客服帐号ID
|
||||
* @param externalUserId 微信客户的external_userid
|
||||
* @param userid 服务专员的userid
|
||||
* @param wording 推荐语
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxCpBaseResp upgradeMemberService(String openKfid, String externalUserId,
|
||||
String userid, String wording) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 升级客户群服务
|
||||
* @param openKfid 客服帐号ID
|
||||
* @param externalUserId 微信客户的external_userid
|
||||
* @param chatId 客户群id
|
||||
* @param wording 推荐语
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxCpBaseResp upgradeGroupchatService(String openKfid, String externalUserId,
|
||||
String chatId, String wording) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 为客户取消推荐
|
||||
* @param openKfid 客服帐号ID
|
||||
* @param externalUserId 微信客户的external_userid
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxCpBaseResp cancelUpgradeService(String openKfid, String externalUserId)
|
||||
throws WxErrorException;
|
||||
}
|
||||
|
@ -10,6 +10,22 @@ import me.chanjar.weixin.cp.api.WxCpKfService;
|
||||
import me.chanjar.weixin.cp.api.WxCpService;
|
||||
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.*;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountAdd;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountAddResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountDel;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountLink;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountLinkResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountListResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountUpd;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfCustomerBatchGetResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfMsgListResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfMsgSendRequest;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfMsgSendResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServiceStateResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServiceStateTransResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServiceUpgradeConfigResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServicerListResp;
|
||||
import me.chanjar.weixin.cp.bean.kf.WxCpKfServicerOpResp;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
@ -182,6 +198,63 @@ public class WxCpKfServiceImpl implements WxCpKfService {
|
||||
return WxCpKfCustomerBatchGetResp.fromJson(responseContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpKfServiceUpgradeConfigResp getUpgradeServiceConfig() throws WxErrorException {
|
||||
String url = cpService.getWxCpConfigStorage().getApiUrl(CUSTOMER_GET_UPGRADE_SERVICE_CONFIG);
|
||||
|
||||
String response = cpService.get(url, null);
|
||||
return WxCpKfServiceUpgradeConfigResp.fromJson(response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp upgradeMemberService(String openKfid, String externalUserId,
|
||||
String userid, String wording) throws WxErrorException {
|
||||
String url = cpService.getWxCpConfigStorage().getApiUrl(CUSTOMER_UPGRADE_SERVICE);
|
||||
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("open_kfid", openKfid);
|
||||
json.addProperty("external_userid", externalUserId);
|
||||
json.addProperty("type", 1);
|
||||
|
||||
JsonObject memberJson = new JsonObject();
|
||||
memberJson.addProperty("userid", userid);
|
||||
memberJson.addProperty("wording", wording);
|
||||
json.add("member", memberJson);
|
||||
|
||||
String response = cpService.post(url, json);
|
||||
return WxCpBaseResp.fromJson(response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp upgradeGroupchatService(String openKfid, String externalUserId,
|
||||
String chatId, String wording) throws WxErrorException {
|
||||
String url = cpService.getWxCpConfigStorage().getApiUrl(CUSTOMER_UPGRADE_SERVICE);
|
||||
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("open_kfid", openKfid);
|
||||
json.addProperty("external_userid", externalUserId);
|
||||
json.addProperty("type", 2);
|
||||
|
||||
JsonObject groupchatJson = new JsonObject();
|
||||
groupchatJson.addProperty("chat_id", chatId);
|
||||
groupchatJson.addProperty("wording", wording);
|
||||
json.add("groupchat", groupchatJson);
|
||||
|
||||
String response = cpService.post(url, json);
|
||||
return WxCpBaseResp.fromJson(response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp cancelUpgradeService(String openKfid, String externalUserId)
|
||||
throws WxErrorException {
|
||||
String url = cpService.getWxCpConfigStorage().getApiUrl(CUSTOMER_CANCEL_UPGRADE_SERVICE);
|
||||
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("open_kfid", openKfid);
|
||||
json.addProperty("external_userid", externalUserId);
|
||||
String response = cpService.post(url, json);
|
||||
return WxCpBaseResp.fromJson(response);
|
||||
}
|
||||
@Override
|
||||
public WxCpKfGetCorpStatisticResp getCorpStatistic(WxCpKfGetCorpStatisticRequest request) throws WxErrorException {
|
||||
String url = cpService.getWxCpConfigStorage().getApiUrl(GET_CORP_STATISTIC);
|
||||
|
@ -39,6 +39,7 @@ public class WxCpUserExternalGroupChatTransferResp extends WxCpBaseResp {
|
||||
/**
|
||||
* 没能成功继承的群ID
|
||||
*/
|
||||
@SerializedName("chat_id")
|
||||
private String chatId;
|
||||
|
||||
public static WxCpUserExternalGroupChatTransferResp.GroupChatFailedTransfer fromJson(String json) {
|
||||
|
@ -0,0 +1,48 @@
|
||||
package me.chanjar.weixin.cp.bean.kf;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/4/26 5:21 下午
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class WxCpKfServiceUpgradeConfigResp extends WxCpBaseResp {
|
||||
|
||||
private static final long serialVersionUID = -3212550906238196617L;
|
||||
|
||||
@SerializedName("member_range")
|
||||
private MemberRange memberRange;
|
||||
|
||||
@SerializedName("groupchat_range")
|
||||
private GroupchatRange groupchatRange;
|
||||
|
||||
public static WxCpKfServiceUpgradeConfigResp fromJson(String json) {
|
||||
return WxCpGsonBuilder.create().fromJson(json, WxCpKfServiceUpgradeConfigResp.class);
|
||||
}
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class MemberRange {
|
||||
@SerializedName("userid_list")
|
||||
private List<String> useridList;
|
||||
|
||||
@SerializedName("department_id_list")
|
||||
private List<Integer> departmentIdList;
|
||||
}
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class GroupchatRange {
|
||||
@SerializedName("chat_id_list")
|
||||
private List<String> chatIdList;
|
||||
}
|
||||
}
|
@ -390,6 +390,9 @@ public interface WxCpApiPathConsts {
|
||||
String SEND_MSG_ON_EVENT = "/cgi-bin/kf/send_msg_on_event";
|
||||
String CUSTOMER_BATCH_GET = "/cgi-bin/kf/customer/batchget";
|
||||
String GET_CORP_STATISTIC = "/cgi-bin/kf/get_corp_statistic";
|
||||
String CUSTOMER_GET_UPGRADE_SERVICE_CONFIG = "/cgi-bin/kf/customer/get_upgrade_service_config";
|
||||
String CUSTOMER_UPGRADE_SERVICE = "/cgi-bin/kf/customer/upgrade_service";
|
||||
String CUSTOMER_CANCEL_UPGRADE_SERVICE = "/cgi-bin/kf/customer/cancel_upgrade_service";
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,10 +7,14 @@ import cn.binarywang.wx.miniapp.bean.delivery.AddOrderResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.BindAccountResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.CancelOrderRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.CancelOrderResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.FollowWaybillRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.FollowWaybillResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.GetOrderRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.GetOrderResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.MockUpdateOrderRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.MockUpdateOrderResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.QueryFollowTraceRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.QueryFollowTraceResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.QueryWaybillTraceRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.QueryWaybillTraceResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.TraceWaybillRequest;
|
||||
@ -129,4 +133,34 @@ public interface WxMaImmediateDeliveryService {
|
||||
throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* 传运单接口 follow_waybill 订阅微信后台会跟踪运单的状态变化
|
||||
* <pre>
|
||||
* 文档地址:https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/express_open_msg.html
|
||||
* </pre>
|
||||
*
|
||||
* @param request request
|
||||
* @return 响应
|
||||
* @throws WxErrorException 异常
|
||||
*/
|
||||
FollowWaybillResponse followWaybill(FollowWaybillRequest request)
|
||||
throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* 查运单接口 query_follow_trace
|
||||
*
|
||||
* <pre>
|
||||
* 商户在调用完trace_waybill接口后,可以使用本接口查询到对应运单的详情信息
|
||||
* 文档地址:https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/express_open_msg.html
|
||||
* </pre>
|
||||
*
|
||||
* @param request request
|
||||
* @return 响应
|
||||
* @throws WxErrorException 异常
|
||||
*/
|
||||
QueryFollowTraceResponse queryFollowTrace(QueryFollowTraceRequest request)
|
||||
throws WxErrorException ;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,119 @@
|
||||
package cn.binarywang.wx.miniapp.api;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopAddGoodsSkuData;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopAddGoodsSpuData;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopOrderListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopResult;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopSku;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopSpu;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopSpuGet;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopSpuGetResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopSpuListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopUpdateGoodsSkuData;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopSpuPageRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopBaseResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopGetSpuListResponse;
|
||||
import java.util.List;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
|
||||
/**
|
||||
* 小程序交易组件-商品服务
|
||||
*
|
||||
* @author boris
|
||||
*/
|
||||
public interface WxMaProductService {
|
||||
WxMinishopResult addSpu(WxMinishopSpu spuInfo) throws WxErrorException;
|
||||
|
||||
WxMaShopBaseResponse deleteSpu(Integer productId, String outProductId) throws WxErrorException;
|
||||
|
||||
WxMinishopSpuGetResponse getSpu(Integer productId, String outProductId, Integer needEditSpu)
|
||||
throws WxErrorException;
|
||||
|
||||
WxMinishopSpuListResponse getSpuList(WxMaShopSpuPageRequest request)
|
||||
throws WxErrorException;
|
||||
|
||||
WxMinishopResult<WxMinishopAddGoodsSpuData> updateSpu(WxMinishopSpu spuInfo) throws WxErrorException;
|
||||
|
||||
WxMaShopBaseResponse listingSpu(Integer productId, String outProductId)
|
||||
throws WxErrorException;
|
||||
|
||||
WxMaShopBaseResponse delistingSpu(Integer productId, String outProductId)
|
||||
throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 小商店新增sku信息
|
||||
*
|
||||
* @param sku
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMinishopResult<WxMinishopAddGoodsSkuData> minishiopGoodsAddSku(WxMinishopSku sku) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* 小商店批量新增sku信息
|
||||
*
|
||||
* @param skuList
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMinishopResult<List<WxMinishopAddGoodsSkuData>> minishopGoodsBatchAddSku(List<WxMinishopSku> skuList) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* 小商店删除sku消息
|
||||
*
|
||||
* @param productId
|
||||
* @param outProductId
|
||||
* @param outSkuId
|
||||
* @param skuId
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMaShopBaseResponse minishopGoodsDelSku(Long productId, Long outProductId, String outSkuId, Long skuId) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* 小商店更新sku
|
||||
*
|
||||
* @param sku
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMinishopResult<WxMinishopUpdateGoodsSkuData> minishopGoodsUpdateSku(WxMinishopSku sku) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* 小商店更新sku价格
|
||||
*
|
||||
* @param productId
|
||||
* @param outProductId
|
||||
* @param outSkuId
|
||||
* @param skuId
|
||||
* @param salePrice
|
||||
* @param marketPrice
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMinishopResult<WxMinishopUpdateGoodsSkuData> minishopGoodsUpdateSkuPrice(Long productId,
|
||||
Long outProductId, String outSkuId, Long skuId, Long salePrice, Long marketPrice) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* 小商店更新sku库存
|
||||
*
|
||||
* @param productId
|
||||
* @param outProductId
|
||||
* @param outSkuId
|
||||
* @param skuId
|
||||
* @param type
|
||||
* @param stockNum
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMinishopResult<WxMinishopUpdateGoodsSkuData> minishopGoodsUpdateSkuStock(Long productId,
|
||||
Long outProductId, String outSkuId, Long skuId, Integer type, Integer stockNum) throws WxErrorException;
|
||||
|
||||
WxMinishopOrderListResponse minishopOrderGetList(String startCreateTime, String endCreateTime,
|
||||
Integer status, Integer page, Integer pageSize, Integer source) throws WxErrorException;
|
||||
}
|
@ -492,4 +492,15 @@ public interface WxMaService extends WxService {
|
||||
*/
|
||||
WxMaSafetyRiskControlService getSafetyRiskControlService();
|
||||
|
||||
/**
|
||||
* 分享人接口
|
||||
* @return
|
||||
*/
|
||||
WxMaShopSharerService getShopSharerService();
|
||||
|
||||
/**
|
||||
* 标准交易组件接口
|
||||
* @return
|
||||
*/
|
||||
WxMaProductService getProductService();
|
||||
}
|
||||
|
@ -0,0 +1,83 @@
|
||||
package cn.binarywang.wx.miniapp.api;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSearchSharerResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerBindResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerDataSummaryResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerLiveOrderListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerLiveSummaryListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerUnbindResponse;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
|
||||
/**
|
||||
* 分享员
|
||||
* @author leiin
|
||||
* @date 2022/6/18 2:48 下午
|
||||
*/
|
||||
public interface WxMaShopSharerService {
|
||||
|
||||
/**
|
||||
* 绑定分享员
|
||||
* 用来批量邀请分享员
|
||||
* @param openids
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMaShopSharerBindResponse bindSharer(String[] openids) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取分享员的总带货数据
|
||||
* @param openid
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMaShopSharerDataSummaryResponse getSharerDataSummary(String openid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取已经绑定的分享员列表
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMaShopSharerListResponse getSharerList(Integer page, Integer pageSize) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取分享员的直播间订单汇总
|
||||
* @param openid
|
||||
* @param liveExportId
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMaShopSharerLiveOrderListResponse getSharerLiveOrderList(String openid, String liveExportId,
|
||||
Integer page, Integer pageSize) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取分享员的直播间带货数据汇总
|
||||
* @param openid
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMaShopSharerLiveSummaryListResponse getSharerLiveSummaryList(String openid,
|
||||
Integer page, Integer pageSize) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 查看分享员
|
||||
* @param openid
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMaShopSearchSharerResponse searchSharer(String openid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 解绑分享员
|
||||
* @param openids
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
WxMaShopSharerUnbindResponse unbindSharer(String[] openids) throws WxErrorException;
|
||||
}
|
@ -79,6 +79,8 @@ public abstract class BaseWxMaServiceImpl<H, P> implements WxMaService, RequestH
|
||||
private final WxMaMarketingService marketingService = new WxMaMarketingServiceImpl(this);
|
||||
private final WxMaImmediateDeliveryService immediateDeliveryService = new WxMaImmediateDeliveryServiceImpl(this);
|
||||
private final WxMaSafetyRiskControlService safetyRiskControlService = new WxMaSafetyRiskControlServiceImpl(this);
|
||||
private final WxMaShopSharerService shopSharerService = new WxMaShopSharerServiceImpl(this);
|
||||
private final WxMaProductService productService = new WxMaProductServiceImpl(this);
|
||||
private Map<String, WxMaConfig> configMap;
|
||||
private int retrySleepMillis = 1000;
|
||||
private int maxRetryTimes = 5;
|
||||
@ -592,4 +594,10 @@ public abstract class BaseWxMaServiceImpl<H, P> implements WxMaService, RequestH
|
||||
@Override
|
||||
public WxMaSafetyRiskControlService getSafetyRiskControlService(){ return this.safetyRiskControlService; }
|
||||
|
||||
@Override
|
||||
public WxMaShopSharerService getShopSharerService() {return this.shopSharerService; }
|
||||
|
||||
@Override
|
||||
public WxMaProductService getProductService() { return this.productService; }
|
||||
|
||||
}
|
||||
|
@ -9,10 +9,14 @@ import cn.binarywang.wx.miniapp.bean.delivery.AddOrderResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.BindAccountResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.CancelOrderRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.CancelOrderResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.FollowWaybillRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.FollowWaybillResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.GetOrderRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.GetOrderResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.MockUpdateOrderRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.MockUpdateOrderResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.QueryFollowTraceRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.QueryFollowTraceResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.QueryWaybillTraceRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.QueryWaybillTraceResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.delivery.TraceWaybillRequest;
|
||||
@ -186,6 +190,28 @@ public class WxMaImmediateDeliveryServiceImpl implements WxMaImmediateDeliverySe
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FollowWaybillResponse followWaybill(
|
||||
FollowWaybillRequest request) throws WxErrorException {
|
||||
String responseContent = this.wxMaService.post(InstantDelivery.FOLLOW_WAYBILL_URL, request);
|
||||
FollowWaybillResponse response = FollowWaybillResponse.fromJson(responseContent);
|
||||
if (response.getErrcode() == -1) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryFollowTraceResponse queryFollowTrace(
|
||||
QueryFollowTraceRequest request) throws WxErrorException {
|
||||
String responseContent = this.wxMaService.post(InstantDelivery.QUERY_FOLLOW_TRACE_URL, request);
|
||||
QueryFollowTraceResponse response = QueryFollowTraceResponse.fromJson(responseContent);
|
||||
if (response.getErrcode() == -1) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析响应.
|
||||
*
|
||||
|
@ -0,0 +1,298 @@
|
||||
package cn.binarywang.wx.miniapp.api.impl;
|
||||
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Order.PRODUCT_ORDER_GET_LIST;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Sku.PRODUCT_ADD_SKU_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Sku.PRODUCT_BATCH_ADD_SKU_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Sku.PRODUCT_DEL_SKU_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Sku.PRODUCT_UPDATE_SKU_PRICE_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Sku.PRODUCT_UPDATE_SKU_STOCK_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Sku.PRODUCT_UPDATE_SKU_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Spu.PRODUCT_SPU_ADD_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Spu.PRODUCT_SPU_DELISTING_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Spu.PRODUCT_SPU_DEL_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Spu.PRODUCT_SPU_GET_LIST_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Spu.PRODUCT_SPU_GET_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Spu.PRODUCT_SPU_LISTING_URL;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.Spu.PRODUCT_SPU_UPDATE_URL;
|
||||
|
||||
import cn.binarywang.wx.miniapp.api.WxMaProductService;
|
||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopAddGoodsSkuData;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopAddGoodsSpuData;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopOrderListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopResult;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopSku;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopSpu;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopSpuGetResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopSpuListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.product.WxMinishopUpdateGoodsSkuData;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopSpuPageRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopBaseResponse;
|
||||
import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.common.enums.WxType;
|
||||
import me.chanjar.weixin.common.error.WxError;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.common.util.json.GsonParser;
|
||||
|
||||
/**
|
||||
* @author boris
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class WxMaProductServiceImpl implements WxMaProductService {
|
||||
|
||||
private static final String ERR_CODE = "errcode";
|
||||
private final WxMaService wxMaService;
|
||||
|
||||
@Override
|
||||
public WxMinishopResult<WxMinishopAddGoodsSpuData> addSpu(WxMinishopSpu spu) throws WxErrorException {
|
||||
|
||||
String response = this.wxMaService.post(PRODUCT_SPU_ADD_URL, spu);
|
||||
|
||||
JsonObject respObj = GsonParser.parse(response);
|
||||
|
||||
if (respObj.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
WxMinishopResult result = new WxMinishopResult();
|
||||
result.setErrcode(respObj.get("errcode").getAsInt());
|
||||
JsonObject dataObj = respObj.get("data").getAsJsonObject();
|
||||
WxMinishopAddGoodsSpuData resultData = new WxMinishopAddGoodsSpuData();
|
||||
resultData.setProductId(dataObj.get("product_id").getAsLong());
|
||||
resultData.setOutProductId(dataObj.get("out_product_id").getAsString());
|
||||
resultData.setCreateTime(dataObj.get("create_time").getAsString());
|
||||
result.setData(resultData);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopBaseResponse deleteSpu(Integer productId, String outProductId)
|
||||
throws WxErrorException {
|
||||
String responseContent = this.wxMaService
|
||||
.post(PRODUCT_SPU_DEL_URL, GsonHelper.buildJsonObject("product_id", productId,
|
||||
"out_product_id", outProductId));
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopBaseResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMinishopSpuGetResponse getSpu(Integer productId, String outProductId, Integer needEditSpu)
|
||||
throws WxErrorException {
|
||||
String response = this.wxMaService
|
||||
.post(PRODUCT_SPU_GET_URL, GsonHelper.buildJsonObject("product_id", productId,
|
||||
"out_product_id", outProductId, "need_edit_spu", needEditSpu));
|
||||
JsonObject jsonObject = GsonParser.parse(response);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
|
||||
return WxMaGsonBuilder.create().fromJson(response, WxMinishopSpuGetResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMinishopSpuListResponse getSpuList(WxMaShopSpuPageRequest request)
|
||||
throws WxErrorException {
|
||||
String responseContent = this.wxMaService.post(PRODUCT_SPU_GET_LIST_URL, request);
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMinishopSpuListResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMinishopResult<WxMinishopAddGoodsSpuData> updateSpu(WxMinishopSpu spu) throws WxErrorException {
|
||||
String response = this.wxMaService.post(PRODUCT_SPU_UPDATE_URL, spu);
|
||||
|
||||
JsonObject respObj = GsonParser.parse(response);
|
||||
|
||||
if (respObj.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
WxMinishopResult result = new WxMinishopResult();
|
||||
result.setErrcode(respObj.get("errcode").getAsInt());
|
||||
JsonObject dataObj = respObj.get("data").getAsJsonObject();
|
||||
WxMinishopAddGoodsSpuData resultData = new WxMinishopAddGoodsSpuData();
|
||||
resultData.setProductId(dataObj.get("product_id").getAsLong());
|
||||
resultData.setOutProductId(dataObj.get("out_product_id").getAsString());
|
||||
resultData.setUpdateTime(dataObj.get("update_time").getAsString());
|
||||
result.setData(resultData);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopBaseResponse listingSpu(Integer productId, String outProductId)
|
||||
throws WxErrorException {
|
||||
String responseContent = this.wxMaService
|
||||
.post(PRODUCT_SPU_LISTING_URL, GsonHelper.buildJsonObject("product_id", productId,
|
||||
"out_product_id", outProductId));
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopBaseResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopBaseResponse delistingSpu(Integer productId, String outProductId)
|
||||
throws WxErrorException {
|
||||
String responseContent = this.wxMaService
|
||||
.post(PRODUCT_SPU_DELISTING_URL, GsonHelper.buildJsonObject("product_id", productId,
|
||||
"out_product_id", outProductId));
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopBaseResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMinishopResult<WxMinishopAddGoodsSkuData> minishiopGoodsAddSku(
|
||||
WxMinishopSku sku) throws WxErrorException {
|
||||
String response = this.wxMaService
|
||||
.post(PRODUCT_ADD_SKU_URL, sku);
|
||||
JsonObject jsonObject = GsonParser.parse(response);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
WxMinishopResult result = new WxMinishopResult();
|
||||
result.setErrcode(jsonObject.get("errcode").getAsInt());
|
||||
JsonObject dataObj = jsonObject.get("data").getAsJsonObject();
|
||||
WxMinishopAddGoodsSkuData resultData = new WxMinishopAddGoodsSkuData();
|
||||
resultData.setSkuId(dataObj.get("sku_id").getAsLong());
|
||||
resultData.setCreateTime(dataObj.get("create_time").getAsString());
|
||||
result.setData(resultData);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMinishopResult<List<WxMinishopAddGoodsSkuData>> minishopGoodsBatchAddSku(
|
||||
List<WxMinishopSku> skuList) throws WxErrorException {
|
||||
String response = this.wxMaService
|
||||
.post(PRODUCT_BATCH_ADD_SKU_URL, GsonHelper.buildJsonObject("skus", skuList));
|
||||
JsonObject jsonObject = GsonParser.parse(response);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
|
||||
WxMinishopResult result = new WxMinishopResult();
|
||||
result.setErrcode(jsonObject.get("errcode").getAsInt());
|
||||
JsonArray jsonArray = jsonObject.get("data").getAsJsonArray();
|
||||
List<WxMinishopAddGoodsSkuData> skuData = new ArrayList<>();
|
||||
for (JsonElement jsonElement : jsonArray) {
|
||||
JsonObject element = jsonElement.getAsJsonObject();
|
||||
WxMinishopAddGoodsSkuData resultData = new WxMinishopAddGoodsSkuData();
|
||||
resultData.setSkuId(element.get("sku_id").getAsLong());
|
||||
resultData.setOutSkuId(element.get("out_sku_id").getAsString());
|
||||
resultData.setCreateTime(element.get("create_time").getAsString());
|
||||
skuData.add(resultData);
|
||||
}
|
||||
result.setData(skuData);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopBaseResponse minishopGoodsDelSku(Long productId, Long outProductId,
|
||||
String outSkuId, Long skuId) throws WxErrorException {
|
||||
String response = this.wxMaService
|
||||
.post(PRODUCT_DEL_SKU_URL, GsonHelper.buildJsonObject("product_id", productId,
|
||||
"out_product_id", outProductId, "out_sku_id", outSkuId, "sku_id", skuId));
|
||||
JsonObject jsonObject = GsonParser.parse(response);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(response, WxMaShopBaseResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMinishopResult<WxMinishopUpdateGoodsSkuData> minishopGoodsUpdateSku(
|
||||
WxMinishopSku sku) throws WxErrorException {
|
||||
String response = this.wxMaService
|
||||
.post(PRODUCT_UPDATE_SKU_URL, sku);
|
||||
JsonObject jsonObject = GsonParser.parse(response);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
WxMinishopResult result = new WxMinishopResult();
|
||||
result.setErrcode(jsonObject.get("errcode").getAsInt());
|
||||
JsonObject dataObj = jsonObject.get("data").getAsJsonObject();
|
||||
WxMinishopUpdateGoodsSkuData resultData = new WxMinishopUpdateGoodsSkuData();
|
||||
resultData.setSkuId(dataObj.get("sku_id").getAsLong());
|
||||
resultData.setUpdateTime(dataObj.get("update_time").getAsString());
|
||||
result.setData(resultData);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMinishopResult<WxMinishopUpdateGoodsSkuData> minishopGoodsUpdateSkuPrice(
|
||||
Long productId, Long outProductId, String outSkuId, Long skuId, Long salePrice,
|
||||
Long marketPrice) throws WxErrorException {
|
||||
String response = this.wxMaService
|
||||
.post(PRODUCT_UPDATE_SKU_PRICE_URL, GsonHelper.buildJsonObject(
|
||||
"product_id", productId, "out_product_id", outProductId,
|
||||
"sku_id", skuId, "out_sku_id", outSkuId, "sale_price", salePrice, "market_price", marketPrice));
|
||||
JsonObject jsonObject = GsonParser.parse(response);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
|
||||
WxMinishopResult result = new WxMinishopResult();
|
||||
result.setErrcode(jsonObject.get("errcode").getAsInt());
|
||||
JsonObject dataObj = jsonObject.get("data").getAsJsonObject();
|
||||
WxMinishopUpdateGoodsSkuData resultData = new WxMinishopUpdateGoodsSkuData();
|
||||
resultData.setSkuId(dataObj.get("sku_id").getAsLong());
|
||||
resultData.setUpdateTime(dataObj.get("update_time").getAsString());
|
||||
result.setData(resultData);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMinishopResult<WxMinishopUpdateGoodsSkuData> minishopGoodsUpdateSkuStock(
|
||||
Long productId, Long outProductId, String outSkuId, Long skuId, Integer type,
|
||||
Integer stockNum) throws WxErrorException {
|
||||
String response = this.wxMaService
|
||||
.post(PRODUCT_UPDATE_SKU_STOCK_URL, GsonHelper.buildJsonObject(
|
||||
"product_id", productId, "out_product_id", outProductId,
|
||||
"sku_id", skuId, "out_sku_id", outSkuId, "type", type, "stock_num", stockNum));
|
||||
JsonObject jsonObject = GsonParser.parse(response);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
|
||||
WxMinishopResult result = new WxMinishopResult();
|
||||
result.setErrcode(jsonObject.get("errcode").getAsInt());
|
||||
JsonObject dataObj = jsonObject.get("data").getAsJsonObject();
|
||||
WxMinishopUpdateGoodsSkuData resultData = new WxMinishopUpdateGoodsSkuData();
|
||||
resultData.setUpdateTime(dataObj.get("update_time").getAsString());
|
||||
result.setData(resultData);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMinishopOrderListResponse minishopOrderGetList(String startCreateTime, String endCreateTime,
|
||||
Integer status, Integer page, Integer pageSize, Integer source) throws WxErrorException {
|
||||
String response = this.wxMaService
|
||||
.post(PRODUCT_ORDER_GET_LIST, GsonHelper.buildJsonObject(
|
||||
"start_create_time", startCreateTime, "end_create_time", endCreateTime,
|
||||
"status", status, "page", page, "page_size", pageSize, "source", source));
|
||||
|
||||
JsonObject jsonObject = GsonParser.parse(response);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(response, WxType.MiniApp));
|
||||
}
|
||||
|
||||
return WxMaGsonBuilder.create().fromJson(response, WxMinishopOrderListResponse.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
package cn.binarywang.wx.miniapp.api.impl;
|
||||
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Sharer;
|
||||
|
||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||
import cn.binarywang.wx.miniapp.api.WxMaShopSharerService;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSearchSharerResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerBindResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerDataSummaryResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerLiveOrderListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerLiveSummaryListResponse;
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopSharerUnbindResponse;
|
||||
import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
|
||||
import com.google.gson.JsonObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.common.enums.WxType;
|
||||
import me.chanjar.weixin.common.error.WxError;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.common.util.json.GsonParser;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/18 3:38 下午
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class WxMaShopSharerServiceImpl implements WxMaShopSharerService {
|
||||
private static final String ERR_CODE = "errcode";
|
||||
private final WxMaService wxMaService;
|
||||
|
||||
@Override
|
||||
public WxMaShopSharerBindResponse bindSharer(String[] openids) throws WxErrorException {
|
||||
JsonObject json = GsonHelper.buildJsonObject("openids", openids);
|
||||
String responseContent = this.wxMaService.post(Sharer.BIND, json);
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopSharerBindResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopSharerDataSummaryResponse getSharerDataSummary(String openid) throws WxErrorException {
|
||||
JsonObject json = GsonHelper.buildJsonObject("openid", openid);
|
||||
String responseContent = this.wxMaService.post(Sharer.GET_SHARER_DATA_SUMMARY, json);
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopSharerDataSummaryResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopSharerListResponse getSharerList(Integer page, Integer pageSize) throws WxErrorException {
|
||||
JsonObject json = GsonHelper.buildJsonObject("page", page, "page_size", pageSize);
|
||||
String responseContent = this.wxMaService.post(Sharer.GET_SHARER_LIST, json);
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopSharerListResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopSharerLiveOrderListResponse getSharerLiveOrderList(String openid, String liveExportId,
|
||||
Integer page, Integer pageSize) throws WxErrorException {
|
||||
JsonObject json = GsonHelper.buildJsonObject("openid", openid, "live_export_id", liveExportId,
|
||||
"page", page, "page_size", pageSize);
|
||||
String responseContent = this.wxMaService.post(Sharer.GET_SHARER_LIVE_ORDER_LIST, json);
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopSharerLiveOrderListResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopSharerLiveSummaryListResponse getSharerLiveSummaryList(String openid,
|
||||
Integer page, Integer pageSize) throws WxErrorException {
|
||||
JsonObject json = GsonHelper.buildJsonObject("openid", openid, "page", page, "page_size", pageSize);
|
||||
String responseContent = this.wxMaService.post(Sharer.GET_SHARER_LIVE_SUMMARY_LIST, json);
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopSharerLiveSummaryListResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopSearchSharerResponse searchSharer(String openid) throws WxErrorException {
|
||||
JsonObject json = GsonHelper.buildJsonObject("openid", openid);
|
||||
String responseContent = this.wxMaService.post(Sharer.SEARCH_SHARER, json);
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopSearchSharerResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaShopSharerUnbindResponse unbindSharer(String[] openids) throws WxErrorException {
|
||||
JsonObject json = GsonHelper.buildJsonObject("openids", openids);
|
||||
String responseContent = this.wxMaService.post(Sharer.UNBIND, json);
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||
}
|
||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopSharerUnbindResponse.class);
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package cn.binarywang.wx.miniapp.bean.delivery;
|
||||
|
||||
|
||||
import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 传运单接口 follow_waybil
|
||||
*
|
||||
* 商户使用此接口向微信提供某交易单号对应的运单号。微信后台会跟踪运单的状态变化,在关键物流节点给下单用户推送消息通知。
|
||||
* </pre>
|
||||
*
|
||||
* @author boris
|
||||
* @since 2022-04-01
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class FollowWaybillRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7538739003766268386L;
|
||||
|
||||
|
||||
/**
|
||||
* 用户openid
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* 描述: 用户openid
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("openid")
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 寄件人手机号
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* 描述:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sender_phone")
|
||||
private String senderPhone;
|
||||
|
||||
/**
|
||||
* 收件人手机号
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* 描述:部分运力需要用户手机号作为查单依据
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("receiver_phone")
|
||||
private String receiverPhone;
|
||||
|
||||
/**
|
||||
* 运单ID
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("waybill_id")
|
||||
private String waybillId;
|
||||
|
||||
/**
|
||||
* 交易单号(微信支付生成的交易单号,一般以420开头)
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("trans_id")
|
||||
private String transId;
|
||||
|
||||
|
||||
/**
|
||||
* 点击落地页商品卡片跳转路径(建议为订单详情页path),不传默认跳转小程序首页。
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("order_detail_path")
|
||||
private String orderDetailPath;
|
||||
|
||||
/**
|
||||
* 商品信息
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("goods_info")
|
||||
private WaybillGoodsInfo goodsInfo;
|
||||
|
||||
public String toJson() {
|
||||
return WxMaGsonBuilder.create().toJson(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package cn.binarywang.wx.miniapp.bean.delivery;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaBaseResponse;
|
||||
import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 查运单接口 query_follow_trace 响应参数
|
||||
* </pre>
|
||||
*
|
||||
* @author boris
|
||||
* @since 2022-04-01
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class FollowWaybillResponse extends WxMaBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3773007367000633663L;
|
||||
|
||||
/**
|
||||
* 查询id.
|
||||
*/
|
||||
@SerializedName("waybill_token")
|
||||
private String waybillToken;
|
||||
|
||||
|
||||
public static FollowWaybillResponse fromJson(String json) {
|
||||
return WxMaGsonBuilder.create().fromJson(json, FollowWaybillResponse.class);
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package cn.binarywang.wx.miniapp.bean.delivery;
|
||||
|
||||
|
||||
import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 消息组件-查运单接口 query_follow_trace
|
||||
*
|
||||
* 商户在调用完trace_waybill接口后,可以使用本接口查询到对应运单的详情信息
|
||||
* </pre>
|
||||
*
|
||||
* @author boris
|
||||
* @since 2022-04-01
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class QueryFollowTraceRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7538739003766268386L;
|
||||
|
||||
|
||||
/**
|
||||
* 查询id
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* 描述: 可以从 传运单接口 follow_waybill 取数据
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("waybill_token")
|
||||
private String waybillToken;
|
||||
|
||||
public String toJson() {
|
||||
return WxMaGsonBuilder.create().toJson(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package cn.binarywang.wx.miniapp.bean.delivery;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaBaseResponse;
|
||||
import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 消息组件-查运单接口 query_follow_trace 响应参数
|
||||
*
|
||||
* 商户在调用完follow_waybill/trace_waybill接口后,可以使用本接口查询到对应运单的详情信息
|
||||
* </pre>
|
||||
*
|
||||
* @author boris
|
||||
* @since 2022-04-01
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class QueryFollowTraceResponse extends WxMaBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3773007367000633663L;
|
||||
|
||||
/**
|
||||
* 运单信息.
|
||||
*/
|
||||
@SerializedName("waybill_info")
|
||||
private WaybillInfo waybillInfo;
|
||||
|
||||
/**
|
||||
* 商品信息
|
||||
*/
|
||||
@SerializedName("shop_info")
|
||||
private ShopInfo shopInfo;
|
||||
|
||||
/**
|
||||
* 运力信息.
|
||||
*/
|
||||
@SerializedName("delivery_info")
|
||||
private DeliveryInfo deliveryInfo;
|
||||
|
||||
|
||||
public static QueryFollowTraceResponse fromJson(String json) {
|
||||
return WxMaGsonBuilder.create().fromJson(json, QueryFollowTraceResponse.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 运单信息.
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class WaybillInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3759074878713856529L;
|
||||
|
||||
/**
|
||||
* 运单状态 释义
|
||||
* <pre>
|
||||
*
|
||||
* 0 运单不存在或者未揽收
|
||||
* 1 已揽件
|
||||
* 2 运输中
|
||||
* 3 派件中
|
||||
* 4 已签收
|
||||
* 5 异常
|
||||
* 6 代签收
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 查询id.
|
||||
*/
|
||||
@SerializedName("waybill_token")
|
||||
private String waybillToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品信息.
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class ShopInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3759074878713856529L;
|
||||
|
||||
/**
|
||||
* 配送公司Id.
|
||||
*/
|
||||
@SerializedName("goods_info")
|
||||
private WaybillGoodsInfo goodsInfo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 运力信息.
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class DeliveryInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3759074878713856529L;
|
||||
|
||||
/**
|
||||
* 配送公司Id.
|
||||
*/
|
||||
@SerializedName("delivery_id")
|
||||
private String deliveryId;
|
||||
|
||||
/**
|
||||
* 运力公司名称.
|
||||
*/
|
||||
@SerializedName("delivery_name")
|
||||
private String deliveryName;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 店铺的商品分类
|
||||
*/
|
||||
@Data
|
||||
public class MinishopShopCat implements Serializable {
|
||||
private static final long serialVersionUID = 4179473856929659641L;
|
||||
|
||||
@SerializedName("cat_id")
|
||||
private Integer shopCatId;
|
||||
|
||||
private String shopCatName;
|
||||
|
||||
private Integer fShopCatId;
|
||||
|
||||
@SerializedName("level")
|
||||
private Integer catLevel;
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/20 7:16 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMiniAfterSaleDetail {
|
||||
@SerializedName("aftersale_order_list")
|
||||
private List<AfterSaleOrder> aftersaleOrderList;
|
||||
@SerializedName("on_aftersale_order_cnt")
|
||||
private Integer onAftersaleOrderCnt;
|
||||
|
||||
@Data
|
||||
public static class AfterSaleOrder {
|
||||
@SerializedName("aftersale_order_id")
|
||||
private Long aftersaleOrderId;
|
||||
private Integer status;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMinishopAddGoodsSkuData implements Serializable {
|
||||
private static final long serialVersionUID = -2596988603027040989L;
|
||||
@SerializedName("sku_id")
|
||||
private Long skuId;
|
||||
@SerializedName("out_sku_id")
|
||||
private String outSkuId;
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMinishopAddGoodsSpuData implements Serializable {
|
||||
private static final long serialVersionUID = 2023708625713948192L;
|
||||
private Long productId;
|
||||
|
||||
private String outProductId;
|
||||
|
||||
private String createTime;
|
||||
|
||||
private String updateTime;
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/20 7:32 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopAddressInfo {
|
||||
@SerializedName("user_name")
|
||||
private String userName;
|
||||
@SerializedName("postal_code")
|
||||
private String postalCode;
|
||||
@SerializedName("province_name")
|
||||
private String provinceName;
|
||||
@SerializedName("city_name")
|
||||
private String cityame;
|
||||
@SerializedName("county_name")
|
||||
private String countyName;
|
||||
@SerializedName("detail_info")
|
||||
private String detailInfo;
|
||||
@SerializedName("national_code")
|
||||
private String nationalCode;
|
||||
@SerializedName("tel_number")
|
||||
private String telNumber;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMinishopDeliveryCompany implements Serializable {
|
||||
private static final long serialVersionUID = 3736970376549639779L;
|
||||
private String deliveryId;
|
||||
|
||||
private String deliveryName;
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/20 7:28 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopDeliveryInfo {
|
||||
@SerializedName("address_info")
|
||||
private WxMinishopAddressInfo addressInfo;
|
||||
@SerializedName("delivery_method")
|
||||
private String deliveryMethod;
|
||||
@SerializedName("delivery_product_info")
|
||||
private List<DeliveryProductInfo> deliveryProductInfo;
|
||||
@SerializedName("ship_done_time")
|
||||
private Long ship_done_time;
|
||||
@SerializedName("insurance_info")
|
||||
private InsuranceInfo insuranceInfo;
|
||||
@SerializedName("deliver_type")
|
||||
private String deliverType;
|
||||
@SerializedName("offline_delivery_time")
|
||||
private Long offlineDeliveryTime;
|
||||
@SerializedName("offline_pickup_time")
|
||||
private Long offlinePickupTime;
|
||||
|
||||
@Data
|
||||
public static class DeliveryProductInfo {
|
||||
@SerializedName("waybill_id")
|
||||
private String waybillId;
|
||||
@SerializedName("delivery_id")
|
||||
private String deliveryId;
|
||||
@SerializedName("delivery_time")
|
||||
private String deliveryTime;
|
||||
@SerializedName("deliver_type")
|
||||
private String deliverType;
|
||||
@SerializedName("delivery_address")
|
||||
private WxMinishopAddressInfo deliveryAddress;
|
||||
@SerializedName("product_infos")
|
||||
private List<ProductInfo> productInfos;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class InsuranceInfo {
|
||||
private String type;
|
||||
@SerializedName("insurance_price")
|
||||
private Long insurancePrice;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ProductInfo {
|
||||
@SerializedName("product_id")
|
||||
private Long product_id;
|
||||
@SerializedName("sku_id")
|
||||
private Long sku_id;
|
||||
@SerializedName("product_cnt")
|
||||
private Long product_cnt;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMinishopGoodsSkuAttr implements Serializable {
|
||||
private static final long serialVersionUID = -7274443170526394680L;
|
||||
|
||||
@SerializedName("attr_key")
|
||||
private String attrKey;
|
||||
|
||||
@SerializedName("attr_value")
|
||||
private String attrValue;
|
||||
|
||||
public JsonObject toJsonObject() {
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
jsonObject.addProperty("attr_key", attrKey);
|
||||
jsonObject.addProperty("attr_value", attrValue);
|
||||
|
||||
return jsonObject;
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopOrderDetail implements Serializable {
|
||||
private static final long serialVersionUID = 3325843289672341160L;
|
||||
|
||||
/**
|
||||
* 下单商品信息
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("product_infos")
|
||||
private List<WxMinishopProductInfo> productInfos;
|
||||
|
||||
/**
|
||||
* 支付信息 (当作为返回结果,payorder时action_type!=6时存在)
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("pay_info")
|
||||
private WxMinishopPayInfo payInfo;
|
||||
|
||||
/**
|
||||
* 价格信息
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("price_info")
|
||||
private WxMinishopPriceInfo priceInfo;
|
||||
|
||||
/**
|
||||
* 必须调过发货接口才会存在这个字段
|
||||
*/
|
||||
@SerializedName("delivery_info")
|
||||
private WxMinishopDeliveryInfo deliveryInfo;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopBaseResponse;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/20 7:09 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopOrderListResponse extends WxMaShopBaseResponse {
|
||||
private List<WxMinishopOrderDetail> orders;
|
||||
@SerializedName("total_num")
|
||||
private Long totalNum;
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.WxMaShopOrderDetail;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopOrderResult implements Serializable {
|
||||
private static final long serialVersionUID = -2665426592693969921L;
|
||||
|
||||
/**
|
||||
* 交易组件平台订单ID
|
||||
*/
|
||||
@SerializedName("order_id")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
@SerializedName("status")
|
||||
private Integer status;
|
||||
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
|
||||
@SerializedName("update_time")
|
||||
private String updateTime;
|
||||
/**
|
||||
* 订单详情
|
||||
*/
|
||||
@SerializedName("order_detail")
|
||||
private WxMinishopOrderDetail orderDetail;
|
||||
|
||||
@SerializedName("aftersale_detail")
|
||||
private WxMiniAfterSaleDetail afterSaleDetail;
|
||||
|
||||
/**
|
||||
* 商家小程序该订单的用户id
|
||||
*/
|
||||
@SerializedName("openid")
|
||||
private String openid;
|
||||
|
||||
@SerializedName("ext_info")
|
||||
private ExtInfo extInfo;
|
||||
|
||||
@SerializedName("order_type")
|
||||
private Integer orderType;
|
||||
|
||||
@Data
|
||||
public static class ExtInfo {
|
||||
@SerializedName("customer_notes")
|
||||
private String customerNotes;
|
||||
@SerializedName("merchant_notes")
|
||||
private String merchantNotes;
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopPayInfo implements Serializable {
|
||||
private static final long serialVersionUID = 687488209024968647L;
|
||||
|
||||
@SerializedName("pay_method")
|
||||
private String payMethod;
|
||||
|
||||
/**
|
||||
* 预支付ID
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("prepay_id")
|
||||
private String prepayId;
|
||||
|
||||
/**
|
||||
* 预付款时间(拿到prepay_id的时间)
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("prepay_time")
|
||||
private String prepayTime;
|
||||
|
||||
// 以下字段仅作为返回数据
|
||||
/**
|
||||
* 支付ID,调过同步订单支付结果且action_type=1时才存在
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("transaction_id")
|
||||
private String transactionId;
|
||||
|
||||
/**
|
||||
* 付款时间(拿到transaction_id的时间)
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("pay_time")
|
||||
private String payTime;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopPriceInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1588840927992523263L;
|
||||
|
||||
@SerializedName("product_price")
|
||||
private Integer productPrice;
|
||||
/**
|
||||
* 该订单最终的金额(单位:分)
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("order_price")
|
||||
private Integer orderPrice;
|
||||
/**
|
||||
* 运费(单位:分)
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("freight")
|
||||
private Integer freight;
|
||||
/**
|
||||
* 优惠金额(单位:分)
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("discounted_price")
|
||||
private Integer discountedPrice;
|
||||
|
||||
@SerializedName("is_discounted")
|
||||
private Boolean isDiscounted;
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopProductInfo implements Serializable {
|
||||
private static final long serialVersionUID = 8979181840150112093L;
|
||||
/**
|
||||
* 交易组件平台内部商品ID
|
||||
*/
|
||||
@SerializedName("product_id")
|
||||
private Integer productId;
|
||||
|
||||
/**
|
||||
* 交易组件平台内部skuID,可填0(如果这个product_id下没有sku)
|
||||
*/
|
||||
@SerializedName("sku_id")
|
||||
private Integer skuId;
|
||||
/**
|
||||
* 购买的数量
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sku_cnt")
|
||||
private Integer skuCnt;
|
||||
|
||||
@SerializedName("on_aftersale_sku_cnt")
|
||||
private Integer onAftersaleSkuCnt;
|
||||
|
||||
@SerializedName("finish_aftersale_sku_cnt")
|
||||
private Integer finishAftersaleSkuCnt;
|
||||
/**
|
||||
* 生成订单时商品的标题
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
@SerializedName("thumb_img")
|
||||
private String thumbImg;
|
||||
|
||||
@SerializedName("sku_attrs")
|
||||
private List<WxMinishopGoodsSkuAttr> skuAttrs;
|
||||
/**
|
||||
* 生成订单时商品的售卖价(单位:分)
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sale_price")
|
||||
private Integer salePrice;
|
||||
|
||||
@SerializedName("market_price")
|
||||
private Integer marketPrice;
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMinishopResult<T> implements Serializable {
|
||||
private static final long serialVersionUID = 4323118714581265968L;
|
||||
private Integer errcode;
|
||||
|
||||
private String errmsg;
|
||||
|
||||
private T data;
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMinishopSku implements Serializable {
|
||||
private static final long serialVersionUID = 12373392723136246L;
|
||||
|
||||
@SerializedName("product_id")
|
||||
private Long productId;
|
||||
|
||||
@SerializedName("out_product_id")
|
||||
private String outProductId;
|
||||
|
||||
@SerializedName("out_sku_id")
|
||||
private String outSkuId;
|
||||
|
||||
@SerializedName("thumb_img")
|
||||
private String thumbImg;
|
||||
|
||||
@SerializedName("sale_price")
|
||||
private Integer salePrice;
|
||||
|
||||
@SerializedName("market_price")
|
||||
private Integer marketPrice;
|
||||
|
||||
@SerializedName("stock_num")
|
||||
private Integer stockNum;
|
||||
|
||||
@SerializedName("sku_code")
|
||||
private String skuCode;
|
||||
|
||||
@SerializedName("barcode")
|
||||
private String barCode;
|
||||
|
||||
@SerializedName("sku_attrs")
|
||||
private List<WxMinishopGoodsSkuAttr> skuAttrs;
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMinishopSpu implements Serializable {
|
||||
private static final long serialVersionUID = 6689040014027161007L;
|
||||
|
||||
@SerializedName("out_product_id")
|
||||
private String outProductId;
|
||||
|
||||
private String title;
|
||||
|
||||
@SerializedName("sub_title")
|
||||
private String subTitle;
|
||||
|
||||
@SerializedName("head_img")
|
||||
private List<String> headImgs;
|
||||
|
||||
@SerializedName("desc_info")
|
||||
private DescInfo descInfo;
|
||||
|
||||
@SerializedName("brand_id")
|
||||
private Long brandId;
|
||||
|
||||
@SerializedName("cats")
|
||||
private List<MinishopShopCat> shopCats;
|
||||
|
||||
private List<WxMinishopGoodsSkuAttr> attrs;
|
||||
|
||||
private String model;
|
||||
|
||||
@SerializedName("express_info")
|
||||
private ExpressInfo expressInfo;
|
||||
|
||||
private List<WxMinishopSku> skus;
|
||||
|
||||
@Data
|
||||
public static class DescInfo {
|
||||
private List<String> imgs;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ExpressInfo {
|
||||
@SerializedName("template_id")
|
||||
private Long templateId;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/20 4:36 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopSpuGet implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -957810527714924409L;
|
||||
|
||||
private WxMinishopSpu spu;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/20 4:46 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopSpuGetResponse extends WxMinishopResult<WxMinishopSpuGet> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/20 4:46 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMinishopSpuListResponse extends WxMinishopResult {
|
||||
@SerializedName("total_num")
|
||||
private Long totalNum;
|
||||
|
||||
private List<WxMinishopSpu> spus;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.binarywang.wx.miniapp.bean.product;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMinishopUpdateGoodsSkuData implements Serializable {
|
||||
private static final long serialVersionUID = -2596988603027040989L;
|
||||
@SerializedName("sku_id")
|
||||
private Long skuId;
|
||||
@SerializedName("out_sku_id")
|
||||
private String outSkuId;
|
||||
@SerializedName("update_time")
|
||||
private String updateTime;
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/18 3:14 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMaPromotionInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2090629980847386450L;
|
||||
|
||||
@SerializedName("finder_username")
|
||||
private String finderUsername;
|
||||
@SerializedName("finder_nickname")
|
||||
private String finderNickname;
|
||||
@SerializedName("sharer_openid")
|
||||
private String sharerOpenid;
|
||||
@SerializedName("live_start_time")
|
||||
private String liveStartTime;
|
||||
}
|
@ -14,6 +14,7 @@ import java.util.List;
|
||||
public class WxMaShopOrderDetail implements Serializable {
|
||||
private static final long serialVersionUID = 3325843289672341160L;
|
||||
|
||||
|
||||
/**
|
||||
* 推广员、分享员信息
|
||||
*/
|
||||
|
@ -21,6 +21,9 @@ public class WxMaShopPayInfo implements Serializable {
|
||||
@SerializedName("pay_method_type")
|
||||
private Integer payMethodType;
|
||||
|
||||
@SerializedName("pay_method")
|
||||
private String payMethod;
|
||||
|
||||
/**
|
||||
* 预支付ID
|
||||
* <pre>
|
||||
|
@ -88,5 +88,8 @@ public class WxMaShopProductInfo implements Serializable {
|
||||
*/
|
||||
@SerializedName("real_price")
|
||||
private Integer realPrice;
|
||||
|
||||
@SerializedName("sku_real_price")
|
||||
private Integer skuRealPrice;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.request;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAfterSaleAddRequest.ProductInfosBean;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@ -38,6 +39,8 @@ public class WxMaShopDeliverySendRequest implements Serializable {
|
||||
private Integer finishAllDelivery;
|
||||
@SerializedName("delivery_list")
|
||||
private List<DeliveryListBean> deliveryList;
|
||||
@SerializedName("ship_done_time")
|
||||
private String shipDoneTme;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@ -53,5 +56,7 @@ public class WxMaShopDeliverySendRequest implements Serializable {
|
||||
private String deliveryId;
|
||||
@SerializedName("waybill_id")
|
||||
private String waybillId;
|
||||
@SerializedName("product_info_list")
|
||||
private List<ProductInfosBean> productInfoList;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/18 2:58 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSearchSharerResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2049214239752832818L;
|
||||
|
||||
@SerializedName("invited_time")
|
||||
private Long invitedTime;
|
||||
@SerializedName("bind_time")
|
||||
private Long bindTime;
|
||||
@SerializedName("nickname")
|
||||
private String nickname;
|
||||
@SerializedName("bind_status")
|
||||
private Integer bindStatus;
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/18 2:51 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSharerBindResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5648529892711033276L;
|
||||
|
||||
@SerializedName("success_list")
|
||||
private List<String> successList;
|
||||
|
||||
@SerializedName("fail_list")
|
||||
private List<String> failList;
|
||||
|
||||
@SerializedName("refuse_list")
|
||||
private List<String> refuseList;
|
||||
|
||||
@SerializedName("result_list")
|
||||
private List<ResultListItem> resultList;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public static class ResultListItem {
|
||||
private String openid;
|
||||
@SerializedName("result_code")
|
||||
private Integer resultCode;
|
||||
@SerializedName("reason_code")
|
||||
private Integer reasonCode;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/18 2:53 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSharerDataSummaryResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3985829585979186778L;
|
||||
|
||||
private Long gmv;
|
||||
@SerializedName("order_cnt")
|
||||
private Long orderCnt;
|
||||
@SerializedName("user_cnt")
|
||||
private Long userCnt;
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/18 2:55 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSharerListResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8533731677643022825L;
|
||||
|
||||
private List<SharerInfo> sharers;
|
||||
@SerializedName("total_num")
|
||||
private Integer totalNum;
|
||||
|
||||
@Data
|
||||
public static class SharerInfo {
|
||||
private String openid;
|
||||
@SerializedName("invited_time")
|
||||
private Long invitedTime;
|
||||
@SerializedName("bind_time")
|
||||
private Long bindTime;
|
||||
private String nickname;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.WxMaShopOrderDetail;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/18 2:56 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSharerLiveOrderListResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4190199778148290127L;
|
||||
|
||||
private List<WxMaShopOrderItem> orders;
|
||||
|
||||
@SerializedName("total_num")
|
||||
private Integer totalNum;
|
||||
|
||||
@Data
|
||||
public static class WxMaShopOrderItem {
|
||||
@SerializedName("order_id")
|
||||
private Long orderId;
|
||||
@SerializedName("out_order_id")
|
||||
private String outOrderId;
|
||||
private Integer status;
|
||||
private String path;
|
||||
@SerializedName("order_detail")
|
||||
private WxMaShopOrderDetail orderDetail;
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/18 2:57 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSharerLiveSummaryListResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2085366863029618067L;
|
||||
|
||||
private List<LiveSummaryItem> lives;
|
||||
|
||||
@SerializedName("total_num")
|
||||
private Integer totalNum;
|
||||
|
||||
@Data
|
||||
public static class LiveSummaryItem {
|
||||
@SerializedName("live_export_id")
|
||||
private String liveExportId;
|
||||
@SerializedName("live_nickname")
|
||||
private String liveNickname;
|
||||
@SerializedName("live_start_time")
|
||||
private Long liveStartTime;
|
||||
@SerializedName("live_end_time")
|
||||
private Long liveEndTime;
|
||||
@SerializedName("live_status")
|
||||
private Long liveStatus;
|
||||
@SerializedName("gmv")
|
||||
private Long gmv;
|
||||
@SerializedName("order_cnt")
|
||||
private Long orderCnt;
|
||||
@SerializedName("user_cnt")
|
||||
private Long userCnt;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2022/6/18 3:00 下午
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSharerUnbindResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -9015680115600175408L;
|
||||
|
||||
@SerializedName("success_list")
|
||||
private List<String> successList;
|
||||
|
||||
@SerializedName("fail_list")
|
||||
private List<String> failList;
|
||||
|
||||
@SerializedName("refuse_list")
|
||||
private List<String> refuseList;
|
||||
}
|
@ -400,6 +400,31 @@ public class WxMaApiUrlConstants {
|
||||
String FILE_COMM = "https://api.weixin.qq.com/cv/ocr/comm";
|
||||
}
|
||||
|
||||
public interface Product {
|
||||
interface Spu {
|
||||
String PRODUCT_SPU_ADD_URL = "https://api.weixin.qq.com/product/spu/add";
|
||||
String PRODUCT_SPU_DEL_URL = "https://api.weixin.qq.com/product/spu/del";
|
||||
String PRODUCT_SPU_GET_URL = "https://api.weixin.qq.com/product/spu/get";
|
||||
String PRODUCT_SPU_GET_LIST_URL = "https://api.weixin.qq.com/product/spu/get_list";
|
||||
String PRODUCT_SPU_UPDATE_URL = "https://api.weixin.qq.com/product/spu/update";
|
||||
String PRODUCT_SPU_LISTING_URL = "https://api.weixin.qq.com/product/spu/listing";
|
||||
String PRODUCT_SPU_DELISTING_URL = "https://api.weixin.qq.com/product/spu/delisting";
|
||||
}
|
||||
|
||||
interface Sku {
|
||||
String PRODUCT_ADD_SKU_URL = "https://api.weixin.qq.com/product/sku/add";
|
||||
String PRODUCT_BATCH_ADD_SKU_URL = "https://api.weixin.qq.com/product/sku/batch_add";
|
||||
String PRODUCT_DEL_SKU_URL = "https://api.weixin.qq.com/product/sku/del";
|
||||
String PRODUCT_UPDATE_SKU_URL = "https://api.weixin.qq.com/product/sku/update";
|
||||
String PRODUCT_UPDATE_SKU_PRICE_URL = "https://api.weixin.qq.com/product/sku/update_price";
|
||||
String PRODUCT_UPDATE_SKU_STOCK_URL = "https://api.weixin.qq.com/product/stock/update";
|
||||
}
|
||||
|
||||
interface Order {
|
||||
String PRODUCT_ORDER_GET_LIST = "https://api.weixin.qq.com/product/order/get_list";
|
||||
}
|
||||
}
|
||||
|
||||
public interface Shop {
|
||||
interface Spu {
|
||||
String SPU_ADD_URL = "https://api.weixin.qq.com/shop/spu/add";
|
||||
@ -462,6 +487,16 @@ public class WxMaApiUrlConstants {
|
||||
String AFTERSALE_GET = "https://api.weixin.qq.com/shop/aftersale/get";
|
||||
String AFTERSALE_UPDATE = "https://api.weixin.qq.com/shop/aftersale/update";
|
||||
}
|
||||
|
||||
interface Sharer {
|
||||
String BIND = "https://api.weixin.qq.com/shop/sharer/bind";
|
||||
String GET_SHARER_DATA_SUMMARY = "https://api.weixin.qq.com/shop/sharer/get_sharer_data_summary";
|
||||
String GET_SHARER_LIST = "https://api.weixin.qq.com/shop/sharer/get_sharer_list";
|
||||
String GET_SHARER_LIVE_ORDER_LIST = "https://api.weixin.qq.com/shop/sharer/get_sharer_live_order_list";
|
||||
String GET_SHARER_LIVE_SUMMARY_LIST = "https://api.weixin.qq.com/shop/sharer/get_sharer_live_summary_list";
|
||||
String SEARCH_SHARER = "https://api.weixin.qq.com/shop/sharer/search_sharer";
|
||||
String UNBIND = "https://api.weixin.qq.com/shop/sharer/unbind";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -553,6 +588,18 @@ public class WxMaApiUrlConstants {
|
||||
*/
|
||||
String QUERY_WAYBILL_TRACE_URL = "https://api.weixin.qq.com/cgi-bin/express/delivery/open_msg/query_trace";
|
||||
|
||||
/**
|
||||
* 物流服务-消息组件-传运单接口(订阅消息) follow_waybill
|
||||
* 商户在调用完trace_waybill接口后,可以使用本接口查询到对应运单的详情信息
|
||||
*/
|
||||
String FOLLOW_WAYBILL_URL = "https://api.weixin.qq.com/cgi-bin/express/delivery/open_msg/follow_waybill";
|
||||
|
||||
/**
|
||||
* 物流服务-消息组件-查运单接口(订阅消息) query_follow_trace
|
||||
* 商户在调用完trace_waybill接口后,可以使用本接口查询到对应运单的详情信息
|
||||
*/
|
||||
String QUERY_FOLLOW_TRACE_URL = "https://api.weixin.qq.com/cgi-bin/express/delivery/open_msg/query_follow_trace";
|
||||
|
||||
|
||||
/**
|
||||
* 下单接口.
|
||||
|
Loading…
Reference in New Issue
Block a user