package com.yeejoin.amos.boot.module.ys.biz.controller;

import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.ys.biz.service.CommonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;

import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author system_generator
 * @date 2024-09-24
 */
@RestController
@Api(tags = "公共接口")
@RequestMapping(value = "/common")
public class CommonController extends BaseController {

	@Autowired
	private CommonService commonService;

	@TycloudOperation(ApiLevel = UserType.AGENCY)
	@ApiOperation(httpMethod = "GET",value = "模板下载",  notes = "模板下载")
	@RequestMapping(value = "/templateDownload", method = RequestMethod.GET)
	public void queryForPage(HttpServletResponse response, @RequestParam(value = "path") String path) {
		commonService.templateDownload(response,path);
	}
}
