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.CooperationTypeService;
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("commonCooperationController")
@RequestMapping("/api/biapp/common/cooperation")
public class CooperationTypeController {

    @Autowired
    private CooperationTypeService cooperationTypeService;


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