From f6e2f4ba4093e401475398e1bd3f7c2e8165b3cb Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期三, 18 十二月 2024 10:30:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 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 1c04ba7..4bdf64d 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
@@ -1,8 +1,26 @@
 package com.ruoyi.other.controller;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.time.LocalDateTime;
 
 /**
  * <p>
@@ -14,7 +32,49 @@
  */
 @RestController
 @RequestMapping("/shop-withdraw")
+@Api(tags = {"管理后台-门店管理-提现管理"})
 public class ShopWithdrawController {
 
+    @Resource
+    private ShopWithdrawService shopWithdrawService;
+    @Resource
+    private ShopService shopService;
+    @Resource
+    private TokenService tokenService;
+
+    /**
+     * 提现申请列表
+     */
+    @GetMapping("/list")
+    @ApiOperation("提现申请列表")
+    public R<IPage<ShopWithdraw>> list(@ApiParam("页码") @RequestParam Integer pageNum,
+                         @ApiParam("每一页数据大小") Integer pageSize,
+                         ShopWithdraw shopWithdraw) {
+
+        Page<ShopWithdraw> page = shopWithdrawService.page(Page.of(pageNum, pageSize), new LambdaQueryWrapper<ShopWithdraw>()
+                .like(StringUtils.isNotEmpty(shopWithdraw.getShopName()), ShopWithdraw::getShopName, shopWithdraw.getShopName()));
+        page.getRecords().forEach(item-> item.setShopName(shopService.getById(item.getShopId()).getName()));
+        return R.ok(page);
+    }
+
+    /**
+     * 审核
+     */
+    @RequestMapping("/audit")
+    @ApiOperation("审核")
+    public R<Void> audit(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