|
@@ -0,0 +1,66 @@
|
|
|
|
|
+package com.sqx.modules.post.controller;
|
|
|
|
|
+
|
|
|
|
|
+import com.sqx.common.utils.Result;
|
|
|
|
|
+import com.sqx.modules.app.annotation.Login;
|
|
|
|
|
+import com.sqx.modules.post.entity.PostEntity;
|
|
|
|
|
+import com.sqx.modules.post.service.PostService;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+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;
|
|
|
|
|
+
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/app/post")
|
|
|
|
|
+public class PostController {
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private PostService postService;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Login
|
|
|
|
|
+ @GetMapping("getPostListOfUser")
|
|
|
|
|
+ @ApiOperation("获取岗位列表")
|
|
|
|
|
+ public Result getPostListOfUser(){
|
|
|
|
|
+ return Result.success().put("data",postService.getPostListOfUser());
|
|
|
|
|
+ }
|
|
|
|
|
+ @GetMapping("getPostListOne")
|
|
|
|
|
+ @ApiOperation("获取岗位详细信息")
|
|
|
|
|
+ public Result getPostListOne(Integer postId){
|
|
|
|
|
+ return Result.success().put("data",postService.getPostListOne(postId));
|
|
|
|
|
+ }
|
|
|
|
|
+ @PostMapping("addPost")
|
|
|
|
|
+ @ApiOperation("增加岗位")
|
|
|
|
|
+ public void addPost(PostEntity postEntity){
|
|
|
|
|
+ PostEntity postEntity1 = new PostEntity();
|
|
|
|
|
+ postEntity1.setPostType(postEntity.getPostType());
|
|
|
|
|
+ postEntity1.setPostImTag(postEntity.getPostImTag());
|
|
|
|
|
+ postEntity1.setEdu(postEntity.getEdu());
|
|
|
|
|
+ postEntity1.setAddress(postEntity.getAddress());
|
|
|
|
|
+ postEntity1.setExp(postEntity.getExp());
|
|
|
|
|
+ postEntity1.setCompanyId(postEntity.getCompanyId());
|
|
|
|
|
+ postEntity1.setStatus(postEntity.getStatus());
|
|
|
|
|
+ postEntity1.setCommentTag(postEntity.getCommentTag());
|
|
|
|
|
+ postEntity1.setIfDue(postEntity.getIfDue());
|
|
|
|
|
+ postEntity1.setRuleClassifyName(postEntity.getRuleClassifyName());
|
|
|
|
|
+ postEntity1.setUserId(postEntity.getUserId());
|
|
|
|
|
+ postEntity1.setWage(postEntity.getWage());
|
|
|
|
|
+ postEntity1.setWelfareTag(postEntity.getWelfareTag());
|
|
|
|
|
+ postEntity1.setWelfareDetails(postEntity.getWelfareDetails());
|
|
|
|
|
+ postEntity1.setDescribe(postEntity.getDescribe());
|
|
|
|
|
+ postService.updateById(postEntity1);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ @PostMapping("changePostStatus")
|
|
|
|
|
+ @ApiOperation("更改岗位状态岗位列表")
|
|
|
|
|
+ public void changePostStatus(Integer postId,Integer status){
|
|
|
|
|
+ PostEntity postEntity1 =postService.getById(postId);
|
|
|
|
|
+ postEntity1.setStatus(status);
|
|
|
|
|
+ postService.updateById(postEntity1);
|
|
|
|
|
+ }
|
|
|
|
|
+ @PostMapping("findPost")
|
|
|
|
|
+ @ApiOperation("查找岗位列表")
|
|
|
|
|
+ public Result finfPost(String address, String wage, String exp,String companyPeople,String key){
|
|
|
|
|
+ return Result.success().put("data",postService.findPost(address,wage,exp,companyPeople,key));
|
|
|
|
|
+ }
|
|
|
|
|
+}
|