From 6b3a3251bc06b081903dfe94134f034608c18ba4 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 18 十二月 2024 16:03:01 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/qijisheng --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java | 29 +++++++++++++++++++++++++---- 1 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java index e6d1b79..0b9afb2 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java @@ -6,17 +6,18 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.utils.StringUtils; +import com.ruoyi.common.security.service.TokenService; import com.ruoyi.other.api.domain.ShopWithdraw; import com.ruoyi.other.service.ShopService; import com.ruoyi.other.service.ShopWithdrawService; +import com.ruoyi.system.api.model.LoginUser; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.time.LocalDateTime; /** * <p> @@ -35,11 +36,13 @@ private ShopWithdrawService shopWithdrawService; @Resource private ShopService shopService; + @Resource + private TokenService tokenService; /** * 提现申请列表 */ - @RequestMapping("/list") + @GetMapping("/list") @ApiOperation("提现申请列表") public R<IPage<ShopWithdraw>> list(@ApiParam("页码") @RequestParam Integer pageNum, @ApiParam("每一页数据大小") Integer pageSize, @@ -51,6 +54,24 @@ return R.ok(page); } + /** + * 审核 + */ + @PostMapping("/audit") + @ApiOperation("审核") + public R<Void> audit(@RequestBody ShopWithdraw shopWithdraw) { + LoginUser loginUser = tokenService.getLoginUser(); + ShopWithdraw shopWithdraw1 = shopWithdrawService.getById(shopWithdraw.getId()); + shopWithdraw1.setAuditStatus(shopWithdraw.getAuditStatus()); + shopWithdraw1.setAuditUserId(loginUser.getUserid()); + shopWithdraw1.setAuditTime(LocalDateTime.now()); + shopWithdraw1.setAuditMsg(shopWithdraw.getAuditMsg()); + shopWithdrawService.updateById(shopWithdraw1); + return R.ok(); + } + + + } -- Gitblit v1.7.1