|
@@ -1,21 +1,21 @@
|
|
|
package com.sqx.modules.firstLogin.control;
|
|
package com.sqx.modules.firstLogin.control;
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.sqx.common.utils.Result;
|
|
import com.sqx.common.utils.Result;
|
|
|
import com.sqx.modules.app.annotation.Login;
|
|
import com.sqx.modules.app.annotation.Login;
|
|
|
import com.sqx.modules.firstLogin.entity.Department;
|
|
import com.sqx.modules.firstLogin.entity.Department;
|
|
|
|
|
+import com.sqx.modules.firstLogin.entity.Edu;
|
|
|
import com.sqx.modules.firstLogin.entity.PostSkill;
|
|
import com.sqx.modules.firstLogin.entity.PostSkill;
|
|
|
import com.sqx.modules.firstLogin.entity.WorkExp;
|
|
import com.sqx.modules.firstLogin.entity.WorkExp;
|
|
|
import com.sqx.modules.firstLogin.service.DepartmentService;
|
|
import com.sqx.modules.firstLogin.service.DepartmentService;
|
|
|
|
|
+import com.sqx.modules.firstLogin.service.EduService;
|
|
|
import com.sqx.modules.firstLogin.service.WorkExpService;
|
|
import com.sqx.modules.firstLogin.service.WorkExpService;
|
|
|
import com.sqx.modules.firstLogin.service.PostSkillService;
|
|
import com.sqx.modules.firstLogin.service.PostSkillService;
|
|
|
import com.sqx.modules.resumes.entity.Resumes;
|
|
import com.sqx.modules.resumes.entity.Resumes;
|
|
|
import com.sqx.modules.resumes.service.ResumesService;
|
|
import com.sqx.modules.resumes.service.ResumesService;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/app/userFirst" )
|
|
@RequestMapping("/app/userFirst" )
|
|
@@ -28,11 +28,14 @@ public class UserFirstRegistController {
|
|
|
private WorkExpService workExpService;
|
|
private WorkExpService workExpService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private PostSkillService postSkillService;
|
|
private PostSkillService postSkillService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private EduService eduService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Login
|
|
@Login
|
|
|
@PostMapping("regist")
|
|
@PostMapping("regist")
|
|
|
@ApiOperation("初次加载信息")
|
|
@ApiOperation("初次加载信息")
|
|
|
- public void userFirstRegist(Long userId, String minWage, String maxWages, String city,Integer ifExp){
|
|
|
|
|
|
|
+ public void userFirstRegist(Long userId, String minWage, String maxWages, String city, Integer ifExp) {
|
|
|
Resumes resumes1 = resumesService.selectResumesByUserId(userId);
|
|
Resumes resumes1 = resumesService.selectResumesByUserId(userId);
|
|
|
resumes1.setCity(city);
|
|
resumes1.setCity(city);
|
|
|
resumes1.setIfExp(ifExp);
|
|
resumes1.setIfExp(ifExp);
|
|
@@ -40,46 +43,99 @@ public class UserFirstRegistController {
|
|
|
resumes1.setMaxWage(maxWages);
|
|
resumes1.setMaxWage(maxWages);
|
|
|
resumesService.updateById(resumes1);
|
|
resumesService.updateById(resumes1);
|
|
|
}
|
|
}
|
|
|
- @PostMapping ("getDepartment" )
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("getDepartment")
|
|
|
@ApiOperation("获取工作部门列表")
|
|
@ApiOperation("获取工作部门列表")
|
|
|
- public Result getDepartment(Department department){
|
|
|
|
|
|
|
+ public Result getDepartment(Department department) {
|
|
|
|
|
|
|
|
- return Result.success().put("data",departmentService.getDepartmentList(department));
|
|
|
|
|
-}
|
|
|
|
|
- @GetMapping ("getPostSkill" )
|
|
|
|
|
|
|
+ return Result.success().put("data", departmentService.getDepartmentList(department));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("getPostSkill")
|
|
|
@ApiOperation("获取专业技能")
|
|
@ApiOperation("获取专业技能")
|
|
|
- public Result getPostSkill(PostSkill postSkill){
|
|
|
|
|
- return Result.success().put("data",postSkillService.getPostSkill(postSkill));
|
|
|
|
|
|
|
+ public Result getPostSkill(PostSkill postSkill) {
|
|
|
|
|
+ return Result.success().put("data", postSkillService.getPostSkill(postSkill));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("workExp")
|
|
@PostMapping("workExp")
|
|
|
@ApiOperation("工作经验")
|
|
@ApiOperation("工作经验")
|
|
|
- public void workExp(Long userId,WorkExp workExp){
|
|
|
|
|
- Resumes resumes1 = resumesService.selectResumesByUserId(userId);
|
|
|
|
|
- WorkExp workExp1 = new WorkExp();
|
|
|
|
|
- resumes1.setWorkExpId(Math.toIntExact(workExp1.getWorkExpId()));
|
|
|
|
|
- resumesService.updateById(resumes1);
|
|
|
|
|
- workExp1.setType(workExp.getType());
|
|
|
|
|
- workExp1.setDepartment(workExp.getDepartment());
|
|
|
|
|
- workExp1.setPostSkills(workExp.getPostSkills());
|
|
|
|
|
- workExp1.setPostLevel(workExp.getPostLevel());
|
|
|
|
|
- workExp1.setWorkContent(workExp.getWorkContent());
|
|
|
|
|
- workExp1.setWorkAchieve(workExp.getWorkAchieve());
|
|
|
|
|
- workExp1.setIndustry(workExp.getIndustry());
|
|
|
|
|
- workExpService.updateById(workExp1);
|
|
|
|
|
-}
|
|
|
|
|
-@PostMapping("registe")
|
|
|
|
|
-@ApiOperation("补充详细信息")
|
|
|
|
|
- public void registe(Resumes resumes){
|
|
|
|
|
- Resumes resumes1 = resumesService.selectResumesByUserId(resumes.getUserId());
|
|
|
|
|
- resumes1.setPicture(resumes.getPicture());
|
|
|
|
|
- resumes1.setResumesName(resumes.getResumesName());
|
|
|
|
|
- resumes1.setResumesSex(resumes.getResumesSex());
|
|
|
|
|
- resumes1.setResumesPhone(resumes.getResumesPhone());
|
|
|
|
|
- resumes1.setBirthday(resumes.getBirthday());
|
|
|
|
|
- resumes1.setResumesStatus(resumes.getResumesStatus());
|
|
|
|
|
- resumes1.setEdu(resumes.getEdu());
|
|
|
|
|
- resumes1.setAdv(resumes.getAdv());
|
|
|
|
|
- resumesService.updateById(resumes1);
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ public Result workExp(@RequestBody WorkExp workExp) {
|
|
|
|
|
+ workExpService.save(workExp);
|
|
|
|
|
+ return Result.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("registe")
|
|
|
|
|
+ @ApiOperation("补充详细信息")
|
|
|
|
|
+ public void registe(Resumes resumes) {
|
|
|
|
|
+ Resumes resumes1 = resumesService.selectResumesByUserId(resumes.getUserId());
|
|
|
|
|
+ resumes1.setPicture(resumes.getPicture());
|
|
|
|
|
+ resumes1.setResumesName(resumes.getResumesName());
|
|
|
|
|
+ resumes1.setResumesSex(resumes.getResumesSex());
|
|
|
|
|
+ resumes1.setResumesPhone(resumes.getResumesPhone());
|
|
|
|
|
+ resumes1.setBirthday(resumes.getBirthday());
|
|
|
|
|
+ resumes1.setResumesStatus(resumes.getResumesStatus());
|
|
|
|
|
+ resumes1.setAdv(resumes.getAdv());
|
|
|
|
|
+ resumesService.updateById(resumes1);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("addEdu")
|
|
|
|
|
+ @ApiOperation("增加学历")
|
|
|
|
|
+ public Result addEdu(@RequestBody Edu edu) {
|
|
|
|
|
+ eduService.save(edu);
|
|
|
|
|
+ return Result.success();
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("selectEdu")
|
|
|
|
|
+ @ApiOperation("查找学历")
|
|
|
|
|
+ public Result selectEdu(Integer userId) {
|
|
|
|
|
+ QueryWrapper<Edu> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
+ queryWrapper.eq("user_id", userId).eq("is_use",1);
|
|
|
|
|
+ queryWrapper.orderByAsc("start_time");
|
|
|
|
|
+ return Result.success().put("data", eduService.getBaseMapper().selectList(queryWrapper));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("selectWorkExp")
|
|
|
|
|
+ @ApiOperation("查找工作经历")
|
|
|
|
|
+ public Result selectWorkExp(Integer userId) {
|
|
|
|
|
+ QueryWrapper<WorkExp> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
+ queryWrapper.eq("user_id", userId).eq("is_use",1);
|
|
|
|
|
+ queryWrapper.orderByAsc("work_start_time");
|
|
|
|
|
+ return Result.success().put("data", workExpService.getBaseMapper().selectList(queryWrapper));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("updateWorkExp")
|
|
|
|
|
+ @ApiOperation("更新工作经历")
|
|
|
|
|
+ public Result updateWorkExp(@RequestBody WorkExp workExp) {
|
|
|
|
|
+
|
|
|
|
|
+ workExpService.updateById(workExp);
|
|
|
|
|
+ return Result.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("updateEdu")
|
|
|
|
|
+ @ApiOperation("更新教育经历")
|
|
|
|
|
+ public Result updateEdu(@RequestBody Edu edu) {
|
|
|
|
|
+
|
|
|
|
|
+ eduService.updateById(edu);
|
|
|
|
|
+ return Result.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("deleteWorkExp")
|
|
|
|
|
+ @ApiOperation("删除工作经历")
|
|
|
|
|
+ public Result deleteExp(Integer workExpId) {
|
|
|
|
|
+ WorkExp workExp = workExpService.getById(workExpId);
|
|
|
|
|
+ workExp.setIsUse(0);
|
|
|
|
|
+ workExpService.saveOrUpdate(workExp);
|
|
|
|
|
+ return Result.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("deleteEdu")
|
|
|
|
|
+ @ApiOperation("删除教育经历")
|
|
|
|
|
+ public Result deleteEdu( Integer eduId) {
|
|
|
|
|
+ Edu edu = eduService.getById(eduId);
|
|
|
|
|
+ edu.setIsUse(0);
|
|
|
|
|
+ eduService.saveOrUpdate(edu);
|
|
|
|
|
+ return Result.success();
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|