|
|
@@ -1,11 +1,16 @@
|
|
|
package com.sqx.modules.resumes.controller.app;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.api.R;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.sqx.common.utils.Result;
|
|
|
import com.sqx.modules.app.annotation.Login;
|
|
|
+import com.sqx.modules.app.service.UserService;
|
|
|
+import com.sqx.modules.firstLogin.service.HrService;
|
|
|
import com.sqx.modules.record.service.RecordService;
|
|
|
import com.sqx.modules.resumes.entity.PostPush;
|
|
|
+import com.sqx.modules.resumes.service.CompanyService;
|
|
|
import com.sqx.modules.resumes.service.PostPushService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@@ -22,11 +27,18 @@ public class AppPostPushController {
|
|
|
private PostPushService postPushService;
|
|
|
@Autowired
|
|
|
private RecordService recordService;
|
|
|
+ @Autowired
|
|
|
+ private HrService hrService;
|
|
|
+ @Autowired
|
|
|
+ private CompanyService companyService;
|
|
|
+ @Autowired
|
|
|
+ private UserService userService;
|
|
|
|
|
|
@Login
|
|
|
@PostMapping("/savePostPush")
|
|
|
@ApiOperation("添加或修改招聘信息")
|
|
|
public Result savePostPush(@RequestBody PostPush postPush, @RequestAttribute("userId") Long userId) {
|
|
|
+ postPush.setUserId(String.valueOf(userId));
|
|
|
return postPushService.savePostPush(postPush, userId);
|
|
|
}
|
|
|
|
|
|
@@ -38,10 +50,10 @@ public class AppPostPushController {
|
|
|
}
|
|
|
return postPushService.getPostPushList(page, limit, null, null, userId, postPush, screen,isDue);
|
|
|
}
|
|
|
-
|
|
|
+ @Login
|
|
|
@GetMapping("/selectPostPushDetails")
|
|
|
@ApiOperation("查询招聘信息详情(通用)")
|
|
|
- public Result selectPostPushDetails(Long userId, Long postPushId,Double lng,Double lat) {
|
|
|
+ public Result selectPostPushDetails(@RequestAttribute("userId")Long userId, Long postPushId,Double lng,Double lat) {
|
|
|
return Result.success().put("data", postPushService.selectPostPushDetails(userId, postPushId,lng,lat));
|
|
|
}
|
|
|
|
|
|
@@ -135,5 +147,23 @@ public class AppPostPushController {
|
|
|
public Result getHotList(){
|
|
|
return Result.success().put("data",postPushService.getHotPost());
|
|
|
}
|
|
|
-
|
|
|
+ @Login
|
|
|
+ @GetMapping("getMyPostPush")
|
|
|
+ @ApiOperation("获取我发布的岗位")
|
|
|
+ public Result getMyPostPush(@RequestAttribute("userId")Long userId,Integer limit,Integer page){
|
|
|
+ Page<PostPush> pages;
|
|
|
+ if (page != null && limit != null) {
|
|
|
+ pages = new Page<>(page, limit);
|
|
|
+ } else {
|
|
|
+ pages = new Page<>();
|
|
|
+ pages.setSize(-1);
|
|
|
+ }
|
|
|
+ IPage<PostPush> selectPage =postPushService.getBaseMapper().selectPage(pages,new QueryWrapper<PostPush>().eq("user_id",userId));
|
|
|
+ for(PostPush postPush : pages.getRecords()){
|
|
|
+ postPush.setHr(hrService.getByUserId(String.valueOf(userId)));
|
|
|
+ postPush.setCompany(companyService.getById(postPush.getCompanyId()));
|
|
|
+ postPush.setUser(userService.getById(userId));
|
|
|
+ }
|
|
|
+ return Result.success().put("data",selectPage);
|
|
|
+ }
|
|
|
}
|