package org.springblade.gateway.yeepay_gateway.controller;

import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.gateway.yeepay_gateway.service.AppYeepayService;
import org.springblade.gateway.yeepay_gateway.vo.WechatConfigQueryVO;
import org.springblade.yeePay.entity.saas.WechatConfigAddDto;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: Silent
 * @Description
 * @Date: Created in 11:08 2021/11/12
 * @Modified By:
 */
@RestController
@AllArgsConstructor
@RequestMapping("app/yeepay")
public class AppYeepayController {
	private final AppYeepayService appYeepayService;

	@GetMapping("/getWechatConfigQuery")
	@ApiOperation(value = "商店公众号配置查询")
	public R<List<WechatConfigQueryVO>> getWechatConfigQuery() {
		return appYeepayService.getWechatConfigQuery();
	}

	@PostMapping("/wechatConfigAdd")
	@ApiOperation(value = "商店公众号配置")
	public R wechatConfigAdd(@RequestBody WechatConfigAddDto wechatConfigAddDto) {
		return appYeepayService.wechatConfigAdd(wechatConfigAddDto);
	}
}
