12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- package com.hssx.ysofficial.controller;
- import com.hssx.ysofficial.entity.Cooperations;
- import com.hssx.ysofficial.mapper.CooperationsMapper;
- import com.hssx.ysofficial.service.CooperationsService;
- import com.hssx.ysofficial.utility.HttpRespMsg;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import org.springframework.web.multipart.MultipartFile;
- import javax.annotation.Resource;
- /**
- * <p>
- * the cooperations of client company and high school 前端控制器
- * </p>
- *
- * @author Reiskuchen
- * @since 2019-10-14
- */
- @RestController
- @RequestMapping("/cooperations")
- public class CooperationsController {
- @Autowired
- private CooperationsService cooperationsService;
- @RequestMapping("/getCooperations")
- public HttpRespMsg getCooperation(){
- return cooperationsService.getCooperations();
- }
- /**
- * 添加合作者
- * name 合作者名称
- * description 合作者描述
- * type 合作者种类 0-联合开发 1-材料供应商 2-芯片及PCB版合作伙伴 3-软件合作伙伴 4-投融资服务机构
- * multipartFile 合作者图片
- */
- @RequestMapping("/addCooperation")
- public HttpRespMsg addCooperation(
- Cooperations cooperations,
- MultipartFile multipartFile){
- return cooperationsService.addCooperations(cooperations, multipartFile);
- }
- @RequestMapping("/deleteCooperation")
- public HttpRespMsg deleteCooperation(Integer id){
- return cooperationsService.deleteCooperationsById(id);
- }
- @RequestMapping("/editCooperation")
- public HttpRespMsg editCooperation(
- Cooperations cooperations,
- MultipartFile multipartFile){
- return cooperationsService.editCooperations(cooperations, multipartFile);
- }
- @RequestMapping("/switchCooperationSticky")
- public HttpRespMsg switchCooperationSticky(Integer id){
- return cooperationsService.switchCooperationSticky(id);
- }
- }
|