package com.ym.mec.web.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ym.mec.biz.service.CooperationOrganLinkmanService;
import com.ym.mec.common.controller.BaseController;

@RequestMapping("cooperationOrganLinkman")
@Api(tags = "合作单位联系人服务")
@RestController
public class CooperationOrganLinkmanController extends BaseController {

	@Autowired
	private CooperationOrganLinkmanService cooperationOrganLinkmanService;

	@ApiOperation(value = "查询合作单位联系人列表")
	@GetMapping("/query")
	@PreAuthorize("@pcs.hasPermissions('cooperationOrganLinkman/query')")
	public Object query(Integer cooperationOrganId) {
		return succeed(cooperationOrganLinkmanService.queryByCooperationOrganId(cooperationOrganId));
	}
}
