package com.sqx.modules.shop.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.shop.service.ShopMessageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
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;

import java.math.BigDecimal;

@Api(tags={"管理端-商户管理"})
@RestController
@RequestMapping("/admin/shop")
public class AdminShopMessageController {

    @Autowired
    private ShopMessageService shopMessageService;

    @ApiOperation("审核商户入驻")
    @GetMapping(value = "/auditShopAuthentication")
    public Result auditShopAuthentication(Long shopId, Integer auditStatus, String auditReason){

        return shopMessageService.auditShopAuthentication(shopId, auditStatus, auditReason);
    }

    @ApiOperation("查看商户列表")
    @GetMapping(value = "selectShopList")
    public Result selectShopList(Integer page, Integer limit, String shopName, Integer status, Integer shopType){

        return shopMessageService.selectShopList(page, limit, shopName, status, shopType);
    }

    @ApiOperation("修改商户保证金")
    @GetMapping(value = "updateShopCashDeposit")
    public Result updateShopCashDeposit(Long shopId, BigDecimal money, Integer type){

        return shopMessageService.updateShopCashDeposit(shopId, money, type);
    }

    @ApiOperation("查看商户保证金明细")
    @GetMapping(value = "selectShopCashDepositList")
    public Result selectShopCashDepositList(Integer page, Integer limit, Long shopId){

        return shopMessageService.selectShopCashDepositList(page, limit, shopId);
    }

}
