
package com.tmerclub.cloud.multishop.controller.admin;

import com.tmerclub.cloud.common.database.dto.PageDTO;
import com.tmerclub.cloud.common.database.vo.PageVO;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.common.security.AuthUserContext;
import com.tmerclub.cloud.multishop.mongo.MongoShopWalletLogBO;
import com.tmerclub.cloud.multishop.service.ShopWalletLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商家提现申请信息
 *
 * @Author chiley
 * @Date 2022/6/30 17:23
 */
@RestController("adminShopRechargeController")
@RequestMapping("/mp/shopRecharge")
@Tag(name = "admin-商家充值记录信息")
public class ShopRechargeController {

    @Autowired
    private ShopWalletLogService shopWalletLogService;

    @GetMapping("/page")
    @Operation(summary = "分页获取商家充值记录信息", description = "分页获取商家充值记录信息")
    public ServerResponseEntity<PageVO<MongoShopWalletLogBO>> page(PageDTO pageDTO) {
        Long shopId = AuthUserContext.get().getTenantId();

        PageVO<MongoShopWalletLogBO> pageVO = shopWalletLogService.getRechargePageByShopId(pageDTO, shopId);
        return ServerResponseEntity.success(pageVO);
    }


}
