分销:增加提现接口
parent
bf92727b27
commit
62a4e8242b
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.user;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "用户 App - 分销用户信息 Response VO")
|
||||
@Data
|
||||
public class AppBrokerageUserRespVO {
|
||||
|
||||
@Schema(description = "可用的佣金,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "2408")
|
||||
private Integer brokeragePrice;
|
||||
|
||||
@Schema(description = "冻结的佣金,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "234")
|
||||
private Integer frozenBrokeragePrice;
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.brokerage.vo.withdraw;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.URL;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
@Schema(description = "用户 App - 分销提现创建 Request VO")
|
||||
@Data
|
||||
public class AppBrokerageWithdrawCreateReqVO {
|
||||
|
||||
// TODO @疯狂:参数校验逻辑,需要根据 type 进行不同的校验;感觉可以通过分组?
|
||||
|
||||
@Schema(description = "提现方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "提现账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456789") // 银行卡号/微信账号/支付宝账号
|
||||
private String accountNo;
|
||||
|
||||
@Schema(description = "收款码的图片", example = "https://www.iocoder.cn/1.png")
|
||||
@URL(message = "收款码的图片,必须是一个 URL")
|
||||
private String accountQrCodeUrl;
|
||||
|
||||
@Schema(description = "提现金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
|
||||
@Min(value = 1, message = "提现金额必须大于 1")
|
||||
private Integer price;
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.config.vo.AppTradeConfigRespVO;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
@Tag(name = "用户 App - 交易配置")
|
||||
@RestController
|
||||
@RequestMapping("/trade/config")
|
||||
@RequiredArgsConstructor
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class AppTradeConfigController {
|
||||
|
||||
@GetMapping("/get")
|
||||
public CommonResult<AppTradeConfigRespVO> getTradeConfig() {
|
||||
AppTradeConfigRespVO respVO = new AppTradeConfigRespVO();
|
||||
respVO.setBrokeragePosterUrls(asList(
|
||||
"https://api.java.crmeb.net/crmebimage/product/2020/08/03/755bf516b1ca4b6db3bfeaa4dd5901cdh71kob20re.jpg",
|
||||
"https://api.java.crmeb.net/crmebimage/maintain/2021/03/01/406d729b84ed4ec9a2171bfcf6fd0634ughzbz9kfi.jpg",
|
||||
"https://api.java.crmeb.net/crmebimage/maintain/2021/03/01/efb1e4e7fe604fe1988b4213ce08cb11tdsyijtd2r.jpg"
|
||||
));
|
||||
respVO.setBrokerageFrozenDays(10);
|
||||
respVO.setBrokerageWithdrawMinPrice(100);
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.config.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "用户 App - 交易配置 Response VO")
|
||||
@Data
|
||||
public class AppTradeConfigRespVO {
|
||||
|
||||
@Schema(description = "分销海报地址数组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<String> brokeragePosterUrls;
|
||||
|
||||
@Schema(description = "佣金冻结时间(天)", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
private Integer brokerageFrozenDays;
|
||||
|
||||
@Schema(description = "佣金提现最小金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
||||
private Integer brokerageWithdrawMinPrice;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue