From fe9a9158be179ecf9b5f2033e28ebdeeffef7efe Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期二, 17 十二月 2024 16:32:56 +0800
Subject: [PATCH] 1
---
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/ShopWithdraw.java | 4 ++++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/ShopWithdraw.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/ShopWithdraw.java
index 4f31bf8..3807f84 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/ShopWithdraw.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/ShopWithdraw.java
@@ -78,5 +78,9 @@
@TableField("create_user_id")
private Long createUserId;
+ @ApiModelProperty(value = "门店名称")
+ @TableField(exist = false)
+ private String shopName;
+
}
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..9c75c2d 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,22 @@
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.other.api.domain.ShopWithdraw;
+import com.ruoyi.other.service.ShopService;
+import com.ruoyi.other.service.ShopWithdrawService;
+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 javax.annotation.Resource;
/**
* <p>
@@ -14,7 +28,29 @@
*/
@RestController
@RequestMapping("/shop-withdraw")
+@Api(tags = {"门店提现管理"})
public class ShopWithdrawController {
+ @Resource
+ private ShopWithdrawService shopWithdrawService;
+ @Resource
+ private ShopService shopService;
+
+ /**
+ * 提现申请列表
+ */
+ @RequestMapping("/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);
+ }
+
+
}
--
Gitblit v1.7.1