Skip to content

fix GitHub issue #3575 #3581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,84 @@ public interface WxLeaguePromoterService {
/**
* 新增达人
*
* @param finderId 视频号finder_id
* @param finderId 视频号finder_id,待废除
* @return 结果
* @deprecated 使用 {@link #addPromoterV2(String)}
*/
@Deprecated
WxChannelBaseResponse addPromoter(String finderId) throws WxErrorException;

/**
* 编辑达人
*
* @param finderId 视频号finder_id
* @param finderId 视频号finder_id,待废除
* @param type 操作 1取消邀请 2结束合作
* @return 结果
* @deprecated 使用 {@link #updatePromoterV2(String, int)}
*/
@Deprecated
WxChannelBaseResponse updatePromoter(String finderId, int type) throws WxErrorException;

/**
* 删除达人
*
* @param finderId 视频号finder_id
* @param finderId 视频号finder_id,待废除
* @return 结果
* @deprecated 使用 {@link #deletePromoterV2(String)}
*/
@Deprecated
WxChannelBaseResponse deletePromoter(String finderId) throws WxErrorException;

/**
* 获取达人详情信息
*
* @param finderId 视频号finder_id
* @param finderId 视频号finder_id,待废除
* @return 结果
* @deprecated 使用 {@link #getPromoterInfoV2(String)}
*/
@Deprecated
PromoterInfoResponse getPromoterInfo(String finderId) throws WxErrorException;

/**
* 获取达人列表
*
* @param pageIndex 页面下标,下标从1开始,默认为1
* @param pageSize 单页达人数(不超过200)
* @param status 拉取该状态下的达人列表
* @return 结果
*/
PromoterListResponse listPromoter(Integer pageIndex, Integer pageSize, Integer status) throws WxErrorException;
/**
* 新增达人
*
* @param promoterId 达人带货id
* @return 结果
*/
WxChannelBaseResponse addPromoterV2(String promoterId) 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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,34 @@ public PromoterInfoResponse getPromoterInfo(String finderId) throws WxErrorExcep
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
public PromoterListResponse listPromoter(Integer pageIndex, Integer pageSize, Integer status)
throws WxErrorException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@
public class PromoterListResponse extends WxChannelBaseResponse {

private static final long serialVersionUID = 1411870432999885996L;
/** 达人finder_id列表 */
/** 达人finder_id列表,待废除后续以promoter_ids为准 */
@JsonProperty("finder_ids")
private List<String> finderIds;

/** 达人总数 */
@JsonProperty("total_num")
private Integer totalNum;

/** 后面是否还有(true: 还有内容; false: 已结束)*/
@JsonProperty("continue_flag")
private Boolean continueFlag;

/** 达人带货id列表 */
@JsonProperty("promoter_ids")
private List<String> promoterIds;
}