package org.springblade.gateway.shop_gateway.controller;

import io.swagger.annotations.ApiOperation;
import lombok.SneakyThrows;
import org.springblade.core.tool.api.R;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springblade.gateway.shop_gateway.entity.dto.ShopAuditDto;
import org.springblade.gateway.shop_gateway.service.IAppShopService;
import org.springblade.ldt.shop.entity.Audit;
import org.springblade.ldt.shop.entity.Shop;
import org.springblade.ldt.shop.service.IShopService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author cy-computer
 */
@RestController
@RequestMapping("/shop")
@Api(tags = "商户控制层")
@AllArgsConstructor
public class AppShopController {

	@Resource
	private IAppShopService appShopService;

	@PostMapping("submitAudit")
	@ApiOperation(value = "商户提交审核")
	@SneakyThrows
	public R submitAudit(@RequestBody ShopAuditDto shopAuditDto) {
		appShopService.submitAudit(shopAuditDto);
		return R.success("提交成功");
	}
}
