mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-06-28 13:16:19 +08:00
🎨 #3575 【视频号】微信小店api官方将要废除finder_id,以promoter_id代替
Some checks failed
Publish to Maven Central / build-and-publish (push) Has been cancelled
Some checks failed
Publish to Maven Central / build-and-publish (push) Has been cancelled
This commit is contained in:
parent
1a74e3e3a8
commit
d776792bae
@ -15,43 +15,84 @@ public interface WxLeaguePromoterService {
|
|||||||
/**
|
/**
|
||||||
* 新增达人
|
* 新增达人
|
||||||
*
|
*
|
||||||
* @param finderId 视频号finder_id
|
* @param finderId 视频号finder_id,待废除
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
* @deprecated 使用 {@link #addPromoterV2(String)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
WxChannelBaseResponse addPromoter(String finderId) throws WxErrorException;
|
WxChannelBaseResponse addPromoter(String finderId) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑达人
|
* 编辑达人
|
||||||
*
|
*
|
||||||
* @param finderId 视频号finder_id
|
* @param finderId 视频号finder_id,待废除
|
||||||
* @param type 操作 1取消邀请 2结束合作
|
* @param type 操作 1取消邀请 2结束合作
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
* @deprecated 使用 {@link #updatePromoterV2(String, int)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
WxChannelBaseResponse updatePromoter(String finderId, int type) throws WxErrorException;
|
WxChannelBaseResponse updatePromoter(String finderId, int type) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除达人
|
* 删除达人
|
||||||
*
|
*
|
||||||
* @param finderId 视频号finder_id
|
* @param finderId 视频号finder_id,待废除
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
* @deprecated 使用 {@link #deletePromoterV2(String)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
WxChannelBaseResponse deletePromoter(String finderId) throws WxErrorException;
|
WxChannelBaseResponse deletePromoter(String finderId) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取达人详情信息
|
* 获取达人详情信息
|
||||||
*
|
*
|
||||||
* @param finderId 视频号finder_id
|
* @param finderId 视频号finder_id,待废除
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
* @deprecated 使用 {@link #getPromoterInfoV2(String)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
PromoterInfoResponse getPromoterInfo(String finderId) throws WxErrorException;
|
PromoterInfoResponse getPromoterInfo(String finderId) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取达人列表
|
* 新增达人
|
||||||
*
|
*
|
||||||
* @param pageIndex 页面下标,下标从1开始,默认为1
|
* @param promoterId 达人带货id
|
||||||
* @param pageSize 单页达人数(不超过200)
|
* @return 结果
|
||||||
* @param status 拉取该状态下的达人列表
|
*/
|
||||||
* @return 结果
|
WxChannelBaseResponse addPromoterV2(String promoterId) throws WxErrorException;
|
||||||
*/
|
|
||||||
PromoterListResponse listPromoter(Integer pageIndex, Integer pageSize, Integer status) throws WxErrorException;
|
/**
|
||||||
|
* 编辑达人
|
||||||
|
*
|
||||||
|
* @param promoterId 达人带货id
|
||||||
|
* @param type 操作 1取消邀请 2结束合作
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
WxChannelBaseResponse updatePromoterV2(String promoterId, int type) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除达人
|
||||||
|
*
|
||||||
|
* @param promoterId 达人带货id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
WxChannelBaseResponse deletePromoterV2(String promoterId) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取达人详情信息
|
||||||
|
*
|
||||||
|
* @param promoterId 达人带货id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
PromoterInfoResponse getPromoterInfoV2(String promoterId) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取达人列表
|
||||||
|
*
|
||||||
|
* @param pageIndex 页面下标,下标从1开始,默认为1
|
||||||
|
* @param pageSize 单页达人数(不超过200)
|
||||||
|
* @param status 拉取该状态下的达人列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
PromoterListResponse listPromoter(Integer pageIndex, Integer pageSize, Integer status) throws WxErrorException;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,34 @@ public class WxLeaguePromoterServiceImpl implements WxLeaguePromoterService {
|
|||||||
return ResponseUtils.decode(resJson, PromoterInfoResponse.class);
|
return ResponseUtils.decode(resJson, PromoterInfoResponse.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxChannelBaseResponse addPromoterV2(String promoterId) throws WxErrorException {
|
||||||
|
String reqJson = "{\"promoter_id\":\"" + promoterId + "\"}";
|
||||||
|
String resJson = shopService.post(ADD_PROMOTER_URL, reqJson);
|
||||||
|
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxChannelBaseResponse updatePromoterV2(String promoterId, int type) throws WxErrorException {
|
||||||
|
String reqJson = "{\"promoter_id\":\"" + promoterId + "\",\"type\":" + type + "}";
|
||||||
|
String resJson = shopService.post(EDIT_PROMOTER_URL, reqJson);
|
||||||
|
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxChannelBaseResponse deletePromoterV2(String promoterId) throws WxErrorException {
|
||||||
|
String reqJson = "{\"promoter_id\":\"" + promoterId + "\"}";
|
||||||
|
String resJson = shopService.post(DELETE_PROMOTER_URL, reqJson);
|
||||||
|
return ResponseUtils.decode(resJson, WxChannelBaseResponse.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PromoterInfoResponse getPromoterInfoV2(String promoterId) throws WxErrorException {
|
||||||
|
String reqJson = "{\"promoter_id\":\"" + promoterId + "\"}";
|
||||||
|
String resJson = shopService.post(GET_PROMOTER_URL, reqJson);
|
||||||
|
return ResponseUtils.decode(resJson, PromoterInfoResponse.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PromoterListResponse listPromoter(Integer pageIndex, Integer pageSize, Integer status)
|
public PromoterListResponse listPromoter(Integer pageIndex, Integer pageSize, Integer status)
|
||||||
throws WxErrorException {
|
throws WxErrorException {
|
||||||
|
@ -18,11 +18,19 @@ import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;
|
|||||||
public class PromoterListResponse extends WxChannelBaseResponse {
|
public class PromoterListResponse extends WxChannelBaseResponse {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1411870432999885996L;
|
private static final long serialVersionUID = 1411870432999885996L;
|
||||||
/** 达人finder_id列表 */
|
/** 达人finder_id列表,待废除后续以promoter_ids为准 */
|
||||||
@JsonProperty("finder_ids")
|
@JsonProperty("finder_ids")
|
||||||
private List<String> finderIds;
|
private List<String> finderIds;
|
||||||
|
|
||||||
/** 达人总数 */
|
/** 达人总数 */
|
||||||
@JsonProperty("total_num")
|
@JsonProperty("total_num")
|
||||||
private Integer totalNum;
|
private Integer totalNum;
|
||||||
|
|
||||||
|
/** 后面是否还有(true: 还有内容; false: 已结束)*/
|
||||||
|
@JsonProperty("continue_flag")
|
||||||
|
private Boolean continueFlag;
|
||||||
|
|
||||||
|
/** 达人带货id列表 */
|
||||||
|
@JsonProperty("promoter_ids")
|
||||||
|
private List<String> promoterIds;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user