12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- package com.smcic.api.operate.controller;
- import com.smcic.api.operate.entity.EnrollInfo;
- import com.smcic.api.operate.service.impl.EnrollInfoServiceImpl;
- import com.smcic.core.auth.LoginRequired;
- 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;
- import java.util.List;
- /**
- * <p>
- * 前端控制器
- * </p>
- *
- * @author syj
- * @since 2022-12-10
- */
- @RestController
- @RequestMapping("/operate/enroll")
- public class EnrollInfoController {
- @Resource
- private EnrollInfoServiceImpl enrollInfoService;
- @RequestMapping("/store")
- @LoginRequired
- public void upload(
- @RequestParam("name") String name,
- @RequestParam("phone") String phone,
- @RequestParam(value = "university", required = false, defaultValue = "") String university,
- @RequestParam(value = "isOnLine", required = false, defaultValue = "") String isOnLine,
- @RequestParam(value = "type", required = false, defaultValue = "") String type,
- @RequestParam(value = "introduction", required = false, defaultValue = "") String introduction,
- @RequestParam(value = "operateId", required = false, defaultValue = "2") Integer operateId,
- @RequestParam(value = "workTitle", required = false, defaultValue = "") String workTitle,
- @RequestParam(value = "file", required = false) MultipartFile file) {
- enrollInfoService.store(phone, name, university, isOnLine, type, operateId, introduction, workTitle, file);
- }
- @RequestMapping("list")
- @LoginRequired
- public List<EnrollInfo> list(@RequestParam(value = "type", required = false, defaultValue = "") String type,
- @RequestParam(value = "operateId", required = false, defaultValue = "2") Integer operateId,
- @RequestParam(value = "phone", required = false, defaultValue = "") String phone){
- return enrollInfoService.list(type, operateId, phone);
- }
- @RequestMapping("rank")
- @LoginRequired
- public List<EnrollInfo> rank(@RequestParam(value = "type", required = false, defaultValue = "") String type,
- @RequestParam(value = "operateId", required = false, defaultValue = "2") Integer operateId,
- @RequestParam(value = "phone", required = false, defaultValue = "") String phone){
- return enrollInfoService.rank(type, operateId, phone);
- }
- }
|