package com.style24.admin.biz.web;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;

import com.style24.admin.biz.service.TsaDisplayService;
import com.style24.admin.support.controller.TsaBaseController;
import com.style24.persistence.domain.Category;

import lombok.extern.slf4j.Slf4j;

/**
 * 전시 Controller
 *
 * @author
 * @since 2020. 12. 16
 */
@Controller
@RequestMapping("/display")
@Slf4j
public class TsaDisplayController extends TsaBaseController {

	@Autowired
	private TsaDisplayService displayService;

	/**
	 * 카테고리관리 조회
	 *
	 * @param category
	 * @return
	 * @author eskim
	 * @since 2020. 12. 16
	 */
	@PostMapping("/category/list")
	@ResponseBody
	public Collection<Category> getCategoryList(@RequestBody Category category) {
		return displayService.getCategoryList(category);
	}

}
