Pu Zhibing
2024-12-17 1d4473f81abe4ef200f23b781756a7da689dc718
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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>
 *  前端控制器
 * </p>
 *
 * @author luodangjia
 * @since 2024-11-20
 */
@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);
    }
 
 
}