package com.upyuns.platform.rs.website.controller;

import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.upyuns.platform.rs.website.biz.CompanyInfoBiz;
import com.upyuns.platform.rs.website.dto.CommonInfoDto;
import com.upyuns.platform.rs.website.entity.CompanyInfo;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("companyInfo")
public class CompanyInfoController extends BaseController<CompanyInfoBiz,CompanyInfo> {

	@PostMapping(value = "addUpdate")
	public ObjectRestResponse addUpdate(@RequestBody CompanyInfo companyInfo) {
		return baseBiz.addUpdate(companyInfo);
	}

	@GetMapping(value = "getAll")
	public ObjectRestResponse getAll(CommonInfoDto commonInfoDto) {
		return baseBiz.getAll(commonInfoDto);
	}

	@GetMapping(value = "detail")
	public ObjectRestResponse getOne() {
		return baseBiz.getIndexShow();
	}
}