wallet:增加充值套餐
parent
3489144757
commit
16cea61435
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.pay.controller.app.wallet;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.recharge.AppPayWalletPackageRespVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "用户 APP - 钱包充值套餐")
|
||||
@RestController
|
||||
@RequestMapping("/pay/wallet-recharge-package")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class AppPayWalletRechargePackageController {
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得钱包充值套餐列表")
|
||||
public CommonResult<List<AppPayWalletPackageRespVO>> getWalletRechargePackageList() {
|
||||
// 只查询开启;需要按照 payPrice 排序;
|
||||
List<AppPayWalletPackageRespVO> list = new ArrayList<>();
|
||||
list.add(new AppPayWalletPackageRespVO().setId(1L).setName("土豆").setPayPrice(10).setBonusPrice(2));
|
||||
list.add(new AppPayWalletPackageRespVO().setId(2L).setName("番茄").setPayPrice(20).setBonusPrice(5));
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.pay.controller.app.wallet.vo.recharge;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "用户 APP - 用户充值套餐 Response VO")
|
||||
@Data
|
||||
public class AppPayWalletPackageRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
@Schema(description = "套餐名", requiredMode = Schema.RequiredMode.REQUIRED, example = "小套餐")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
private Integer payPrice;
|
||||
@Schema(description = "赠送金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
||||
private Integer bonusPrice;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue