package com.xxfc.platform.uccn.rest.admin;

import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.uccn.biz.BannerBiz;
import com.xxfc.platform.uccn.dto.BannerDto;
import com.xxfc.platform.uccn.entity.Banner;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("banner")
public class BannerController extends BaseController<BannerBiz, Banner> {

	@PostMapping(value = "addUpdate")
	public ObjectRestResponse addUpdate(@RequestBody Banner banner) {
		return baseBiz.add(banner);
	}

	@GetMapping(value = "getList")
	public ObjectRestResponse getList(BannerDto bannerDto) {
		return baseBiz.selectList(bannerDto);
	}

	@GetMapping(value = "/app/unauth/getAll")
	public ObjectRestResponse getAll() {
		return baseBiz.getAll(1);
	}
}