package cn.stylefeng.guns.zjxl.cnotroller;

import cn.stylefeng.guns.zjxl.service.ZjxlCompanyCaseService;
import cn.stylefeng.guns.zjxlUtil.BaseController;
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.RestController;

/***
 * @ClassName: ZjxlCompanyCaseController
 * @Description:
 * @Auther: shi kejing
 * @Date: 2020/11/2 9:21
 */
@RestController
@Api(description = "公司官网主页")
@RequestMapping(value = "/zjxl/CompanyCase")
public class ZjxlCompanyCaseController extends BaseController {

    @Autowired
    private ZjxlCompanyCaseService companyCaseService;

    @RequestMapping(value = "/findCompanyCaseById", method = RequestMethod.GET)
    @ApiOperation(value = "根据Id查看CompanyCase")
    public String findCompanyCaseById(String id){
        try {
            return write(200,"查询成功","data",companyCaseService.findById(id));
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"查询失败");
        }
    }
}
