小程序券主播授权管理
This commit is contained in:
parent
a48cf3f09d
commit
6fcd507fa7
|
|
@ -1,5 +1,6 @@
|
|||
package com.dyj.applet;
|
||||
|
||||
import com.dyj.applet.domain.TalentCouponLimit;
|
||||
import com.dyj.applet.domain.query.*;
|
||||
import com.dyj.applet.domain.vo.*;
|
||||
import com.dyj.applet.handler.*;
|
||||
|
|
@ -837,4 +838,43 @@ public class DyAppletClient extends BaseClient {
|
|||
public DySimpleResult<ConsumeCouponIdListVo> batchConsumeCoupon(BatchConsumeCouponQuery body){
|
||||
return new PromotionCouponHandler(configuration().getAgentByTenantId(tenantId,clientKey)).batchConsumeCoupon(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询主播发券配置信息
|
||||
* @param body 查询主播发券配置信息请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<TalentCouponLimit> queryTalentCouponLimit(QueryTalentCouponLimitQuery body){
|
||||
return new PromotionCouponHandler(configuration().getAgentByTenantId(tenantId,clientKey)).queryTalentCouponLimit(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改主播发券权限状态
|
||||
* @param body 修改主播发券权限状态请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<?> updateTalentCouponStatus(UpdateTalentCouponStatusQuery body){
|
||||
return new PromotionCouponHandler(configuration().getAgentByTenantId(tenantId,clientKey)).updateTalentCouponStatus(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新主播发券库存上限
|
||||
* @param body 更新主播发券库存上限请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<?> updateTalentCouponStock(UpdateTalentCouponStockQuery body){
|
||||
return new PromotionCouponHandler(configuration().getAgentByTenantId(tenantId,clientKey)).updateTalentCouponStock(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 主播发券权限配置
|
||||
* @param body 主播发券权限配置请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<?> setTalentCouponApi(SetTalentCouponApiQuery body){
|
||||
return new PromotionCouponHandler(configuration().getAgentByTenantId(tenantId,clientKey)).setTalentCouponApi(body);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,10 +4,8 @@ import com.dtflys.forest.annotation.BaseRequest;
|
|||
import com.dtflys.forest.annotation.JSONBody;
|
||||
import com.dtflys.forest.annotation.Post;
|
||||
import com.dtflys.forest.backend.ContentType;
|
||||
import com.dyj.applet.domain.query.BatchConsumeCouponQuery;
|
||||
import com.dyj.applet.domain.query.BatchRollbackConsumeCouponQuery;
|
||||
import com.dyj.applet.domain.query.BindUserToSidebarActivityQuery;
|
||||
import com.dyj.applet.domain.query.QueryCouponReceiveInfoQuery;
|
||||
import com.dyj.applet.domain.TalentCouponLimit;
|
||||
import com.dyj.applet.domain.query.*;
|
||||
import com.dyj.applet.domain.vo.ConsumeCouponIdListVo;
|
||||
import com.dyj.applet.domain.vo.QueryCouponReceiveInfoVo;
|
||||
import com.dyj.common.domain.DySimpleResult;
|
||||
|
|
@ -52,5 +50,35 @@ public interface PromotionCouponClient {
|
|||
@Post(value = "${batchConsumeCoupon}", interceptor = ClientTokenInterceptor.class)
|
||||
DySimpleResult<ConsumeCouponIdListVo> batchConsumeCoupon(@JSONBody BatchConsumeCouponQuery body);
|
||||
|
||||
/**
|
||||
* 查询主播发券配置信息
|
||||
* @param body 查询主播发券配置信息请求值
|
||||
* @return
|
||||
*/
|
||||
@Post(value = "${queryTalentCouponLimit}", interceptor = ClientTokenInterceptor.class)
|
||||
DySimpleResult<TalentCouponLimit> queryTalentCouponLimit(@JSONBody QueryTalentCouponLimitQuery body);
|
||||
|
||||
/**
|
||||
* 修改主播发券权限状态
|
||||
* @param body 修改主播发券权限状态请求值
|
||||
* @return
|
||||
*/
|
||||
@Post(value = "${updateTalentCouponStatus}", interceptor = ClientTokenInterceptor.class)
|
||||
DySimpleResult<?> updateTalentCouponStatus(@JSONBody UpdateTalentCouponStatusQuery body);
|
||||
|
||||
/**
|
||||
* 更新主播发券库存上限
|
||||
* @param body 更新主播发券库存上限请求值
|
||||
* @return
|
||||
*/
|
||||
@Post(value = "${updateTalentCouponStock}", interceptor = ClientTokenInterceptor.class)
|
||||
DySimpleResult<?> updateTalentCouponStock(@JSONBody UpdateTalentCouponStockQuery body);
|
||||
|
||||
/**
|
||||
* 主播发券权限配置
|
||||
* @param body 主播发券权限配置请求值
|
||||
* @return
|
||||
*/
|
||||
@Post(value = "${setTalentCouponApi}", interceptor = ClientTokenInterceptor.class)
|
||||
DySimpleResult<?> setTalentCouponApi(@JSONBody SetTalentCouponApiQuery body);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,126 @@
|
|||
package com.dyj.applet.domain;
|
||||
|
||||
/**
|
||||
* 主播发券配置信息
|
||||
*/
|
||||
public class TalentCouponLimit {
|
||||
|
||||
|
||||
/**
|
||||
* <p>账号类型,1:talent_account,2:open_id,与请求参数一致</p>
|
||||
*/
|
||||
private Integer account_type;
|
||||
/**
|
||||
* <p>小程序appid</p>
|
||||
*/
|
||||
private String app_id;
|
||||
/**
|
||||
* <p>奖励券授权张数,仅分享裂变时会返回</p> 选填
|
||||
*/
|
||||
private Long award_assigned_num;
|
||||
/**
|
||||
* <p>抖音开平券模板id</p>
|
||||
*/
|
||||
private String coupon_meta_id;
|
||||
/**
|
||||
* <p>用户open_id,account_type为2时填充该值,与请求参数一致</p> 选填
|
||||
*/
|
||||
private String open_id;
|
||||
/**
|
||||
* <p>券的<strong>发放场景</strong>,默认1:</p><ul><li style="line-height: 1.6;margin-top: 0px;margin-bottom: 0px;">取值1:直播间内发放</li><li style="line-height: 1.6;margin-top: 0px;margin-bottom: 0px;">取值2:接口发放</li><li style="line-height: 1.6;margin-top: 0px;margin-bottom: 0px;">取值3:平台活动发放</li><li style="line-height: 1.6;margin-top: 0px;margin-bottom: 0px;">取值4:IM场景发放</li></ul> 选填
|
||||
*/
|
||||
private Integer send_scene;
|
||||
/**
|
||||
* <p>当前主播的发券状态,1:上架(生效),2:下架(失效)</p>
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* <p>主播对于某个券模板的库存发放上限</p>
|
||||
*/
|
||||
private Long stock_limit;
|
||||
/**
|
||||
* <p>主播抖音号,account_type为1时填充该值,与请求参数一致</p> 选填
|
||||
*/
|
||||
private String talent_account;
|
||||
|
||||
public Integer getAccount_type() {
|
||||
return account_type;
|
||||
}
|
||||
|
||||
public TalentCouponLimit setAccount_type(Integer account_type) {
|
||||
this.account_type = account_type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getApp_id() {
|
||||
return app_id;
|
||||
}
|
||||
|
||||
public TalentCouponLimit setApp_id(String app_id) {
|
||||
this.app_id = app_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getAward_assigned_num() {
|
||||
return award_assigned_num;
|
||||
}
|
||||
|
||||
public TalentCouponLimit setAward_assigned_num(Long award_assigned_num) {
|
||||
this.award_assigned_num = award_assigned_num;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCoupon_meta_id() {
|
||||
return coupon_meta_id;
|
||||
}
|
||||
|
||||
public TalentCouponLimit setCoupon_meta_id(String coupon_meta_id) {
|
||||
this.coupon_meta_id = coupon_meta_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOpen_id() {
|
||||
return open_id;
|
||||
}
|
||||
|
||||
public TalentCouponLimit setOpen_id(String open_id) {
|
||||
this.open_id = open_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSend_scene() {
|
||||
return send_scene;
|
||||
}
|
||||
|
||||
public TalentCouponLimit setSend_scene(Integer send_scene) {
|
||||
this.send_scene = send_scene;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public TalentCouponLimit setStatus(Integer status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getStock_limit() {
|
||||
return stock_limit;
|
||||
}
|
||||
|
||||
public TalentCouponLimit setStock_limit(Long stock_limit) {
|
||||
this.stock_limit = stock_limit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTalent_account() {
|
||||
return talent_account;
|
||||
}
|
||||
|
||||
public TalentCouponLimit setTalent_account(String talent_account) {
|
||||
this.talent_account = talent_account;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
package com.dyj.applet.domain.query;
|
||||
|
||||
import com.dyj.common.domain.query.UserInfoQuery;
|
||||
|
||||
/**
|
||||
* 查询主播发券配置信息请求值
|
||||
*/
|
||||
public class QueryTalentCouponLimitQuery extends UserInfoQuery {
|
||||
|
||||
|
||||
/**
|
||||
* <p>账号类型:取值1时:talent_account 字段必填 取值2是:open_id 字段必填
|
||||
*/
|
||||
private Integer account_type;
|
||||
/**
|
||||
* <p>小程序appid</p>
|
||||
*/
|
||||
private String app_id;
|
||||
/**
|
||||
* <p>抖音开平券模板id</p>
|
||||
*/
|
||||
private String coupon_meta_id;
|
||||
|
||||
/**
|
||||
* <p>主播抖音号,account_type为1时必填</p> 选填
|
||||
*/
|
||||
private String talent_account;
|
||||
|
||||
|
||||
public Integer getAccount_type() {
|
||||
return account_type;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQuery setAccount_type(Integer account_type) {
|
||||
this.account_type = account_type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getApp_id() {
|
||||
return app_id;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQuery setApp_id(String app_id) {
|
||||
this.app_id = app_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCoupon_meta_id() {
|
||||
return coupon_meta_id;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQuery setCoupon_meta_id(String coupon_meta_id) {
|
||||
this.coupon_meta_id = coupon_meta_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTalent_account() {
|
||||
return talent_account;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQuery setTalent_account(String talent_account) {
|
||||
this.talent_account = talent_account;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static QueryTalentCouponLimitQueryBuilder builder(){
|
||||
return new QueryTalentCouponLimitQueryBuilder();
|
||||
}
|
||||
|
||||
|
||||
public static final class QueryTalentCouponLimitQueryBuilder {
|
||||
private Integer account_type;
|
||||
private String app_id;
|
||||
private String coupon_meta_id;
|
||||
private String talent_account;
|
||||
private String open_id;
|
||||
private Integer tenantId;
|
||||
private String clientKey;
|
||||
|
||||
private QueryTalentCouponLimitQueryBuilder() {
|
||||
}
|
||||
|
||||
public static QueryTalentCouponLimitQueryBuilder aQueryTalentCouponLimitQuery() {
|
||||
return new QueryTalentCouponLimitQueryBuilder();
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQueryBuilder accountType(Integer accountType) {
|
||||
this.account_type = accountType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQueryBuilder appId(String appId) {
|
||||
this.app_id = appId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQueryBuilder couponMetaId(String couponMetaId) {
|
||||
this.coupon_meta_id = couponMetaId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQueryBuilder talentAccount(String talentAccount) {
|
||||
this.talent_account = talentAccount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQueryBuilder openId(String openId) {
|
||||
this.open_id = openId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQueryBuilder tenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQueryBuilder clientKey(String clientKey) {
|
||||
this.clientKey = clientKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public QueryTalentCouponLimitQuery build() {
|
||||
QueryTalentCouponLimitQuery queryTalentCouponLimitQuery = new QueryTalentCouponLimitQuery();
|
||||
queryTalentCouponLimitQuery.setAccount_type(account_type);
|
||||
queryTalentCouponLimitQuery.setApp_id(app_id);
|
||||
queryTalentCouponLimitQuery.setCoupon_meta_id(coupon_meta_id);
|
||||
queryTalentCouponLimitQuery.setTalent_account(talent_account);
|
||||
queryTalentCouponLimitQuery.setOpen_id(open_id);
|
||||
queryTalentCouponLimitQuery.setTenantId(tenantId);
|
||||
queryTalentCouponLimitQuery.setClientKey(clientKey);
|
||||
return queryTalentCouponLimitQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
package com.dyj.applet.domain.query;
|
||||
|
||||
import com.dyj.common.domain.query.UserInfoQuery;
|
||||
|
||||
/**
|
||||
* 主播发券权限配置请求值
|
||||
*/
|
||||
public class SetTalentCouponApiQuery extends UserInfoQuery {
|
||||
|
||||
/**
|
||||
* <p>账号类型:取值1时:talent_account 字段必填 取值2是:open_id 字段必填
|
||||
*/
|
||||
private Integer account_type;
|
||||
/**
|
||||
* <p>小程序appid</p>
|
||||
*/
|
||||
private String app_id;
|
||||
/**
|
||||
* <p>分配给主播奖励券的库存数,仅券模板玩法含奖励券时必填</p> 选填
|
||||
*/
|
||||
private Long award_stock_limit;
|
||||
/**
|
||||
* <p>抖音开平券模板id(券模板创建接口返回)</p>
|
||||
*/
|
||||
private String coupon_meta_id;
|
||||
|
||||
/**
|
||||
* <p>分配给主播的券库存的发放上限,不得超过券模板最大库存。平台不会校验已授权所有主播的库存之和是否大于券模板总库存,但主播真实可发券数量受总库存影响。例如券模板库存1000,开发者授权给了A、B、C三位主播每人1000,当A、B主播实际每人发放500后,A、B、C三人均不能再发券。</p>
|
||||
*/
|
||||
private Long stock_limit;
|
||||
/**
|
||||
* <p>主播抖音号</p> 选填
|
||||
*/
|
||||
private String talent_account;
|
||||
|
||||
public Integer getAccount_type() {
|
||||
return account_type;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQuery setAccount_type(Integer account_type) {
|
||||
this.account_type = account_type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getApp_id() {
|
||||
return app_id;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQuery setApp_id(String app_id) {
|
||||
this.app_id = app_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getAward_stock_limit() {
|
||||
return award_stock_limit;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQuery setAward_stock_limit(Long award_stock_limit) {
|
||||
this.award_stock_limit = award_stock_limit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCoupon_meta_id() {
|
||||
return coupon_meta_id;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQuery setCoupon_meta_id(String coupon_meta_id) {
|
||||
this.coupon_meta_id = coupon_meta_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getStock_limit() {
|
||||
return stock_limit;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQuery setStock_limit(Long stock_limit) {
|
||||
this.stock_limit = stock_limit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTalent_account() {
|
||||
return talent_account;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQuery setTalent_account(String talent_account) {
|
||||
this.talent_account = talent_account;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static SetTalentCouponApiQueryBuilder builder(){
|
||||
return new SetTalentCouponApiQueryBuilder();
|
||||
}
|
||||
|
||||
public static final class SetTalentCouponApiQueryBuilder {
|
||||
private Integer account_type;
|
||||
private String app_id;
|
||||
private Long award_stock_limit;
|
||||
private String coupon_meta_id;
|
||||
private Long stock_limit;
|
||||
private String talent_account;
|
||||
private String open_id;
|
||||
private Integer tenantId;
|
||||
private String clientKey;
|
||||
|
||||
private SetTalentCouponApiQueryBuilder() {
|
||||
}
|
||||
|
||||
public static SetTalentCouponApiQueryBuilder aSetTalentCouponApiQuery() {
|
||||
return new SetTalentCouponApiQueryBuilder();
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQueryBuilder accountType(Integer accountType) {
|
||||
this.account_type = accountType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQueryBuilder appId(String appId) {
|
||||
this.app_id = appId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQueryBuilder award_stock_limit(Long award_stock_limit) {
|
||||
this.award_stock_limit = award_stock_limit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQueryBuilder couponMetaId(String couponMetaId) {
|
||||
this.coupon_meta_id = couponMetaId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQueryBuilder stockLimit(Long stockLimit) {
|
||||
this.stock_limit = stockLimit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQueryBuilder talentAccount(String talentAccount) {
|
||||
this.talent_account = talentAccount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQueryBuilder openId(String openId) {
|
||||
this.open_id = openId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQueryBuilder tenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQueryBuilder clientKey(String clientKey) {
|
||||
this.clientKey = clientKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SetTalentCouponApiQuery build() {
|
||||
SetTalentCouponApiQuery setTalentCouponApiQuery = new SetTalentCouponApiQuery();
|
||||
setTalentCouponApiQuery.setAccount_type(account_type);
|
||||
setTalentCouponApiQuery.setApp_id(app_id);
|
||||
setTalentCouponApiQuery.setAward_stock_limit(award_stock_limit);
|
||||
setTalentCouponApiQuery.setCoupon_meta_id(coupon_meta_id);
|
||||
setTalentCouponApiQuery.setStock_limit(stock_limit);
|
||||
setTalentCouponApiQuery.setTalent_account(talent_account);
|
||||
setTalentCouponApiQuery.setOpen_id(open_id);
|
||||
setTalentCouponApiQuery.setTenantId(tenantId);
|
||||
setTalentCouponApiQuery.setClientKey(clientKey);
|
||||
return setTalentCouponApiQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
package com.dyj.applet.domain.query;
|
||||
|
||||
import com.dyj.common.domain.query.UserInfoQuery;
|
||||
|
||||
/**
|
||||
* 修改主播发券权限状态请求值
|
||||
*/
|
||||
public class UpdateTalentCouponStatusQuery extends UserInfoQuery {
|
||||
|
||||
|
||||
/**
|
||||
* 账号类型:
|
||||
取值1时:talent_account 字段必填
|
||||
取值2是:open_id 字段必填
|
||||
*/
|
||||
private Integer account_type;
|
||||
/**
|
||||
* 小程序appid
|
||||
*/
|
||||
private String app_id;
|
||||
/**
|
||||
* 抖音开平券模板id
|
||||
*/
|
||||
private String coupon_meta_id;
|
||||
|
||||
/**
|
||||
* 期望变更的主播发券状态,1:上架(生效),2:下架(失效)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 主播抖音号,account_type为1时必填 选填
|
||||
*/
|
||||
private String talent_account;
|
||||
|
||||
public Integer getAccount_type() {
|
||||
return account_type;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQuery setAccount_type(Integer account_type) {
|
||||
this.account_type = account_type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getApp_id() {
|
||||
return app_id;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQuery setApp_id(String app_id) {
|
||||
this.app_id = app_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCoupon_meta_id() {
|
||||
return coupon_meta_id;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQuery setCoupon_meta_id(String coupon_meta_id) {
|
||||
this.coupon_meta_id = coupon_meta_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQuery setStatus(Integer status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTalent_account() {
|
||||
return talent_account;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQuery setTalent_account(String talent_account) {
|
||||
this.talent_account = talent_account;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static UpdateTalentCouponStatusQueryBuilder builder(){
|
||||
return new UpdateTalentCouponStatusQueryBuilder();
|
||||
}
|
||||
|
||||
public static final class UpdateTalentCouponStatusQueryBuilder {
|
||||
private Integer account_type;
|
||||
private String app_id;
|
||||
private String coupon_meta_id;
|
||||
private Integer status;
|
||||
private String talent_account;
|
||||
private String open_id;
|
||||
private Integer tenantId;
|
||||
private String clientKey;
|
||||
|
||||
private UpdateTalentCouponStatusQueryBuilder() {
|
||||
}
|
||||
|
||||
public static UpdateTalentCouponStatusQueryBuilder anUpdateTalentCouponStatusQuery() {
|
||||
return new UpdateTalentCouponStatusQueryBuilder();
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQueryBuilder accountType(Integer accountType) {
|
||||
this.account_type = accountType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQueryBuilder appId(String appId) {
|
||||
this.app_id = appId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQueryBuilder couponMetaId(String couponMetaId) {
|
||||
this.coupon_meta_id = couponMetaId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQueryBuilder status(Integer status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQueryBuilder talentAccount(String talentAccount) {
|
||||
this.talent_account = talentAccount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQueryBuilder openId(String openId) {
|
||||
this.open_id = openId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQueryBuilder tenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQueryBuilder clientKey(String clientKey) {
|
||||
this.clientKey = clientKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStatusQuery build() {
|
||||
UpdateTalentCouponStatusQuery updateTalentCouponStatusQuery = new UpdateTalentCouponStatusQuery();
|
||||
updateTalentCouponStatusQuery.setAccount_type(account_type);
|
||||
updateTalentCouponStatusQuery.setApp_id(app_id);
|
||||
updateTalentCouponStatusQuery.setCoupon_meta_id(coupon_meta_id);
|
||||
updateTalentCouponStatusQuery.setStatus(status);
|
||||
updateTalentCouponStatusQuery.setTalent_account(talent_account);
|
||||
updateTalentCouponStatusQuery.setOpen_id(open_id);
|
||||
updateTalentCouponStatusQuery.setTenantId(tenantId);
|
||||
updateTalentCouponStatusQuery.setClientKey(clientKey);
|
||||
return updateTalentCouponStatusQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,212 @@
|
|||
package com.dyj.applet.domain.query;
|
||||
|
||||
import com.dyj.common.domain.query.UserInfoQuery;
|
||||
|
||||
/**
|
||||
* 更新主播发券库存上限请求值
|
||||
*/
|
||||
public class UpdateTalentCouponStockQuery extends UserInfoQuery {
|
||||
|
||||
|
||||
/**
|
||||
* <p>账号类型,1:talent_account,2:open_id</p>
|
||||
*/
|
||||
private Integer account_type;
|
||||
/**
|
||||
* <p>增减动作(暂不支持减少)</p><p>增加:increase</p>
|
||||
*/
|
||||
private String action;
|
||||
/**
|
||||
* <p>小程序appid</p>
|
||||
*/
|
||||
private String app_id;
|
||||
/**
|
||||
* <p>分配给主播奖励券的库存数,仅券模板玩法含奖励券时必填</p> 选填
|
||||
*/
|
||||
private Long award_number;
|
||||
/**
|
||||
* <p>抖音开平券模板id</p>
|
||||
*/
|
||||
private String coupon_meta_id;
|
||||
/**
|
||||
* <p>在当前基础上期望增减的库存上限数,与action配合使用,需大于0。例如action传increase、number传20时表示将主播发券库存在当前的基础上增加20。</p>
|
||||
*/
|
||||
private Long number;
|
||||
|
||||
/**
|
||||
* <p>主播抖音号,account_type为1时必填</p> 选填
|
||||
*/
|
||||
private String talent_account;
|
||||
/**
|
||||
* <p>幂等唯一键,对于重复的unique_key,本接口会返回上一次操作成功的结果,不会调整库存。</p><p>调用方对于失败重试的请求使用同一个unique_key,避免多次调整库存上限;对于不同的请求使用不同的unique_key</p>
|
||||
*/
|
||||
private String unique_key;
|
||||
|
||||
public Integer getAccount_type() {
|
||||
return account_type;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQuery setAccount_type(Integer account_type) {
|
||||
this.account_type = account_type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQuery setAction(String action) {
|
||||
this.action = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getApp_id() {
|
||||
return app_id;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQuery setApp_id(String app_id) {
|
||||
this.app_id = app_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getAward_number() {
|
||||
return award_number;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQuery setAward_number(Long award_number) {
|
||||
this.award_number = award_number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCoupon_meta_id() {
|
||||
return coupon_meta_id;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQuery setCoupon_meta_id(String coupon_meta_id) {
|
||||
this.coupon_meta_id = coupon_meta_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQuery setNumber(Long number) {
|
||||
this.number = number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTalent_account() {
|
||||
return talent_account;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQuery setTalent_account(String talent_account) {
|
||||
this.talent_account = talent_account;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUnique_key() {
|
||||
return unique_key;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQuery setUnique_key(String unique_key) {
|
||||
this.unique_key = unique_key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static UpdateTalentCouponStockQueryBuilder builder(){
|
||||
return new UpdateTalentCouponStockQueryBuilder();
|
||||
}
|
||||
|
||||
public static final class UpdateTalentCouponStockQueryBuilder {
|
||||
private Integer account_type;
|
||||
private String action;
|
||||
private String app_id;
|
||||
private Long award_number;
|
||||
private String coupon_meta_id;
|
||||
private Long number;
|
||||
private String talent_account;
|
||||
private String unique_key;
|
||||
private String open_id;
|
||||
private Integer tenantId;
|
||||
private String clientKey;
|
||||
|
||||
private UpdateTalentCouponStockQueryBuilder() {
|
||||
}
|
||||
|
||||
public static UpdateTalentCouponStockQueryBuilder anUpdateTalentCouponStockQuery() {
|
||||
return new UpdateTalentCouponStockQueryBuilder();
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder accountType(Integer accountType) {
|
||||
this.account_type = accountType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder action(String action) {
|
||||
this.action = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder appId(String appId) {
|
||||
this.app_id = appId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder awardNumber(Long awardNumber) {
|
||||
this.award_number = awardNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder couponMetaId(String couponMetaId) {
|
||||
this.coupon_meta_id = couponMetaId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder number(Long number) {
|
||||
this.number = number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder talentAccount(String talentAccount) {
|
||||
this.talent_account = talentAccount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder uniqueKey(String uniqueKey) {
|
||||
this.unique_key = uniqueKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder openId(String openId) {
|
||||
this.open_id = openId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder tenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQueryBuilder clientKey(String clientKey) {
|
||||
this.clientKey = clientKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateTalentCouponStockQuery build() {
|
||||
UpdateTalentCouponStockQuery updateTalentCouponStockQuery = new UpdateTalentCouponStockQuery();
|
||||
updateTalentCouponStockQuery.setAccount_type(account_type);
|
||||
updateTalentCouponStockQuery.setAction(action);
|
||||
updateTalentCouponStockQuery.setApp_id(app_id);
|
||||
updateTalentCouponStockQuery.setAward_number(award_number);
|
||||
updateTalentCouponStockQuery.setCoupon_meta_id(coupon_meta_id);
|
||||
updateTalentCouponStockQuery.setNumber(number);
|
||||
updateTalentCouponStockQuery.setTalent_account(talent_account);
|
||||
updateTalentCouponStockQuery.setUnique_key(unique_key);
|
||||
updateTalentCouponStockQuery.setOpen_id(open_id);
|
||||
updateTalentCouponStockQuery.setTenantId(tenantId);
|
||||
updateTalentCouponStockQuery.setClientKey(clientKey);
|
||||
return updateTalentCouponStockQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
package com.dyj.applet.handler;
|
||||
|
||||
import com.dyj.applet.domain.query.BatchConsumeCouponQuery;
|
||||
import com.dyj.applet.domain.query.BatchRollbackConsumeCouponQuery;
|
||||
import com.dyj.applet.domain.query.BindUserToSidebarActivityQuery;
|
||||
import com.dyj.applet.domain.query.QueryCouponReceiveInfoQuery;
|
||||
import com.dyj.applet.domain.TalentCouponLimit;
|
||||
import com.dyj.applet.domain.query.*;
|
||||
import com.dyj.applet.domain.vo.ConsumeCouponIdListVo;
|
||||
import com.dyj.applet.domain.vo.QueryCouponReceiveInfoVo;
|
||||
import com.dyj.common.config.AgentConfiguration;
|
||||
|
|
@ -58,4 +56,44 @@ public class PromotionCouponHandler extends AbstractAppletHandler {
|
|||
userInfoQuery(body);
|
||||
return getPromotionCouponClient().batchConsumeCoupon(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询主播发券配置信息
|
||||
* @param body 查询主播发券配置信息请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<TalentCouponLimit> queryTalentCouponLimit(QueryTalentCouponLimitQuery body){
|
||||
userInfoQuery(body);
|
||||
return getPromotionCouponClient().queryTalentCouponLimit(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改主播发券权限状态
|
||||
* @param body 修改主播发券权限状态请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<?> updateTalentCouponStatus(UpdateTalentCouponStatusQuery body){
|
||||
userInfoQuery(body);
|
||||
return getPromotionCouponClient().updateTalentCouponStatus(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新主播发券库存上限
|
||||
* @param body 更新主播发券库存上限请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<?> updateTalentCouponStock(UpdateTalentCouponStockQuery body){
|
||||
userInfoQuery(body);
|
||||
return getPromotionCouponClient().updateTalentCouponStock(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 主播发券权限配置
|
||||
* @param body 主播发券权限配置请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<?> setTalentCouponApi(SetTalentCouponApiQuery body){
|
||||
userInfoQuery(body);
|
||||
return getPromotionCouponClient().setTalentCouponApi(body);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,6 +169,26 @@ public enum DyAppletUrlPathEnum {
|
|||
* 用户核销券
|
||||
*/
|
||||
BATCH_CONSUME_COUPON("batchConsumeCoupon", "/api/promotion/v1/coupon/batch_consume_coupon/"),
|
||||
|
||||
/**
|
||||
* 查询主播发券配置信息
|
||||
*/
|
||||
QUERY_TALENT_COUPON_LIMIT("queryTalentCouponLimit", "/api/promotion/v1/coupon/get_talent_coupon/"),
|
||||
|
||||
/**
|
||||
* 修改主播发券权限状态
|
||||
*/
|
||||
UPDATE_TALENT_COUPON_STATUS("updateTalentCouponStatus", "/api/promotion/v1/coupon/update_talent_coupon_status/"),
|
||||
|
||||
/**
|
||||
* 更新主播发券库存上限
|
||||
*/
|
||||
UPDATE_TALENT_COUPON_STOCK("updateTalentCouponStock", "/api/promotion/v1/coupon/update_talent_coupon_stock/"),
|
||||
|
||||
/**
|
||||
* 主播发券权限配置
|
||||
*/
|
||||
SET_TALENT_COUPON_API("setTalentCouponApi", "/api/promotion/v1/coupon/set_talent_coupon/"),
|
||||
;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ package com.dyj.examples.applet;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.dyj.applet.DyAppletClient;
|
||||
import com.dyj.applet.domain.query.BatchConsumeCouponQuery;
|
||||
import com.dyj.applet.domain.query.BatchRollbackConsumeCouponQuery;
|
||||
import com.dyj.applet.domain.query.BindUserToSidebarActivityQuery;
|
||||
import com.dyj.applet.domain.query.QueryCouponReceiveInfoQuery;
|
||||
import com.dyj.applet.domain.query.*;
|
||||
import com.dyj.examples.DyJavaExamplesApplication;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
|
@ -73,4 +70,56 @@ public class PromotionCouponTest {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询主播发券配置信息
|
||||
*/
|
||||
@Test
|
||||
public void queryTalentCouponLimit(){
|
||||
DyAppletClient dyAppletClient = new DyAppletClient();
|
||||
System.out.println(
|
||||
JSON.toJSONString(
|
||||
dyAppletClient.queryTalentCouponLimit(QueryTalentCouponLimitQuery.builder().build())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改主播发券权限状态
|
||||
*/
|
||||
@Test
|
||||
public void updateTalentCouponStatus(){
|
||||
DyAppletClient dyAppletClient = new DyAppletClient();
|
||||
System.out.println(
|
||||
JSON.toJSONString(
|
||||
dyAppletClient.updateTalentCouponStatus(UpdateTalentCouponStatusQuery.builder().build())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新主播发券库存上限
|
||||
*/
|
||||
@Test
|
||||
public void updateTalentCouponStock(){
|
||||
DyAppletClient dyAppletClient = new DyAppletClient();
|
||||
System.out.println(
|
||||
JSON.toJSONString(
|
||||
dyAppletClient.updateTalentCouponStock(UpdateTalentCouponStockQuery.builder().build())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 主播发券权限配置
|
||||
*/
|
||||
@Test
|
||||
public void setTalentCouponApi(){
|
||||
DyAppletClient dyAppletClient = new DyAppletClient();
|
||||
System.out.println(
|
||||
JSON.toJSONString(
|
||||
dyAppletClient.setTalentCouponApi(SetTalentCouponApiQuery.builder().build())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue