package cn.com.countrygarden.bi.main.controller.marketing.common;

import cn.com.countrygarden.bi.main.core.Response;
import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.service.common.ProjectTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller("commonProjectTypeController")
@RequestMapping("/api/biapp/common/project")
public class ProjectTypeController {

    @Autowired
    private ProjectTypeService typeService;


    /**
     * 获取项目类型列表
     *
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/type", produces = "application/json;charset=utf-8", method = RequestMethod.GET)
    public Result cooperationType() {
        return Response.response(typeService.findAll());
    }
}
