From 559ee10df3622e4802ca5664b83b713cd3a75f97 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期一, 25 十一月 2024 11:42:40 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java | 62 +++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java new file mode 100644 index 0000000..e6c1e7f --- /dev/null +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java @@ -0,0 +1,62 @@ +package com.ruoyi.account.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.ruoyi.account.api.model.BalanceChangeRecord; +import com.ruoyi.account.service.BalanceChangeRecordService; +import com.ruoyi.account.vo.WalletVO; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.security.utils.SecurityUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@Api("钱包") +@RestController +@RequestMapping("wallet") +public class WalletController extends BaseController { + @Resource + private BalanceChangeRecordService balanceChangeRecordService; + + /** + * 钱包详情 + */ + @GetMapping("detail") + @ApiOperation(value = "钱包详情", notes = "钱包详情", tags = {"小程序-个人中心-我的钱包-钱包详情"}) + public AjaxResult detail() { + Long userId = SecurityUtils.getUserId(); + // TODO 查询钱包详情 + WalletVO walletVO = new WalletVO(); + return AjaxResult.success(walletVO); + } + + /** + * 变更明细 + */ + @ApiOperation(value = "变更明细", notes = "变更明细", tags = {"小程序-个人中心-我的钱包-变更记录"}) + @GetMapping("change") + public AjaxResult change() { + Long userId = SecurityUtils.getUserId(); + return AjaxResult.success(balanceChangeRecordService.list(new LambdaQueryWrapper<BalanceChangeRecord>() + .eq(BalanceChangeRecord::getAppUserId, userId))); + } + +// /** +// * 充值 +// */ +// @GetMapping("recharge") +// @ApiOperation(value = "充值", notes = "钱包充值") +// public AjaxResult recharge(@ApiParam(value = "充值金额", required = true) @RequestParam BigDecimal amount) { +// Long userId = SecurityUtils.getUserId(); +// String openId; +// // 商户号 +// String partnerTradeNo; +// // TODO 充值 +// return AjaxResult.success(); +// } + +} -- Gitblit v1.7.1