Pu Zhibing
2024-11-27 0befca3e70b575c420e7a14fa113aeb74b8fbef8
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
@@ -4,6 +4,7 @@
import com.ruoyi.account.api.model.BalanceChangeRecord;
import com.ruoyi.account.service.BalanceChangeRecordService;
import com.ruoyi.account.vo.WalletVO;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.utils.SecurityUtils;
@@ -14,6 +15,7 @@
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
@Api("钱包")
@RestController
@@ -27,11 +29,11 @@
     */
    @GetMapping("detail")
    @ApiOperation(value = "钱包详情", notes = "钱包详情", tags = {"小程序-个人中心-我的钱包-钱包详情"})
    public AjaxResult detail() {
    public R<WalletVO> detail() {
        Long userId = SecurityUtils.getUserId();
        // TODO 查询钱包详情
        WalletVO walletVO = new WalletVO();
        return AjaxResult.success(walletVO);
        return R.ok(walletVO);
    }
    /**
@@ -39,9 +41,9 @@
     */
    @ApiOperation(value = "变更明细", notes = "变更明细", tags = {"小程序-个人中心-我的钱包-变更记录"})
    @GetMapping("change")
    public AjaxResult change() {
    public R<List<BalanceChangeRecord>> change() {
        Long userId = SecurityUtils.getUserId();
        return AjaxResult.success(balanceChangeRecordService.list(new LambdaQueryWrapper<BalanceChangeRecord>()
        return R.ok(balanceChangeRecordService.list(new LambdaQueryWrapper<BalanceChangeRecord>()
                .eq(BalanceChangeRecord::getAppUserId, userId)));
    }