Your Name 8 maanden geleden
bovenliggende
commit
85c396ee8c
23 gewijzigde bestanden met toevoegingen van 207 en 47 verwijderingen
  1. 6 2
      src/main/java/com/sqx/modules/app/controller/UserBrowseController.java
  2. 3 6
      src/main/java/com/sqx/modules/chat/controller/ChatController.java
  3. 15 0
      src/main/java/com/sqx/modules/chat/entity/ChatConversation.java
  4. 1 0
      src/main/java/com/sqx/modules/chat/service/ChatConversationService.java
  5. 38 1
      src/main/java/com/sqx/modules/chat/service/impl/ChatConversationServiceImpl.java
  6. 2 4
      src/main/java/com/sqx/modules/firstLogin/control/UserFirstRegistController.java
  7. 1 1
      src/main/java/com/sqx/modules/firstLogin/entity/HrEntity.java
  8. 1 0
      src/main/java/com/sqx/modules/firstLogin/service/HrService.java
  9. 8 0
      src/main/java/com/sqx/modules/firstLogin/service/impl/HrServiceImpl.java
  10. 2 2
      src/main/java/com/sqx/modules/intention/controller/AppIntentionController.java
  11. 7 2
      src/main/java/com/sqx/modules/post/controller/PostController.java
  12. 1 1
      src/main/java/com/sqx/modules/post/controller/ViewPostController.java
  13. 11 4
      src/main/java/com/sqx/modules/resumes/controller/PostPushController.java
  14. 5 4
      src/main/java/com/sqx/modules/resumes/controller/app/AppPostPushController.java
  15. 1 1
      src/main/java/com/sqx/modules/resumes/dao/PostPushDao.java
  16. 10 0
      src/main/java/com/sqx/modules/resumes/entity/Company.java
  17. 9 1
      src/main/java/com/sqx/modules/resumes/entity/PostPush.java
  18. 1 1
      src/main/java/com/sqx/modules/resumes/service/PostPushService.java
  19. 36 8
      src/main/java/com/sqx/modules/resumes/service/impl/PostPushServiceImpl.java
  20. 22 5
      src/main/java/com/sqx/modules/sendRecord/controller/SendRecordController.java
  21. 2 0
      src/main/java/com/sqx/modules/sendRecord/service/SendRecordService.java
  22. 22 0
      src/main/java/com/sqx/modules/sendRecord/service/impl/SendRecordServiceImpl.java
  23. 3 4
      src/main/resources/mapper/resumes/PostPushDao.xml

+ 6 - 2
src/main/java/com/sqx/modules/app/controller/UserBrowseController.java

@@ -5,6 +5,8 @@ import com.sqx.common.utils.Result;
 import com.sqx.modules.app.annotation.Login;
 import com.sqx.modules.app.entity.UserBrowse;
 import com.sqx.modules.app.service.UserBrowseService;
+import com.sqx.modules.chat.entity.ChatConversation;
+import com.sqx.modules.chat.service.ChatConversationService;
 import com.sqx.modules.resumes.entity.PostPush;
 import com.sqx.modules.resumes.entity.Resumes;
 import io.swagger.annotations.Api;
@@ -20,15 +22,18 @@ import org.springframework.web.bind.annotation.*;
 public class UserBrowseController {
     @Autowired
     private UserBrowseService userBrowseService;
+    @Autowired
+    private ChatConversationService chatConversationService;
 
     @ApiOperation("查询我的浏览记录")
     @GetMapping("/selectMyBrowseV2")
     public Result selectMyBrowseV2(Long userId, Integer page, Integer limit, UserBrowse userBrowse, PostPush postPush) {
         return Result.success().put("data", userBrowseService.selectMyBrowseV2(userId, page, limit, userBrowse, postPush));
     }
+    @Login
     @ApiOperation("查询我的浏览记录")
     @GetMapping("/selectMyBrowse")
-    public Result selectMyBrowse(Long userId, Integer page, Integer limit, UserBrowse userBrowse) {
+    public Result selectMyBrowse(@RequestAttribute("userId") Long userId, Integer page, Integer limit, UserBrowse userBrowse) {
         return Result.success().put("data", userBrowseService.selectMyBrowse(userId, page, limit, userBrowse));
     }
         @ApiOperation("删除浏览记录")
@@ -55,5 +60,4 @@ public class UserBrowseController {
     private Result deleteUserByBrowse(Long postPushId){
         return userBrowseService.remove(new QueryWrapper<UserBrowse>().eq("post_push_id", postPushId)) ? Result.success():Result.error();
     }
-
 }

+ 3 - 6
src/main/java/com/sqx/modules/chat/controller/ChatController.java

@@ -1,15 +1,14 @@
 package com.sqx.modules.chat.controller;
 
 import com.sqx.common.utils.Result;
+import com.sqx.modules.app.annotation.Login;
+import com.sqx.modules.chat.entity.ChatConversation;
 import com.sqx.modules.chat.service.ChatContentService;
 import com.sqx.modules.chat.service.ChatConversationService;
 import io.swagger.annotations.Api;
 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;
+import org.springframework.web.bind.annotation.*;
 
 @RestController
 @Api(value = "聊天", tags = {"聊天"})
@@ -44,6 +43,4 @@ public class ChatController {
 
 
 
-
-
 }

+ 15 - 0
src/main/java/com/sqx/modules/chat/entity/ChatConversation.java

@@ -4,6 +4,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.sqx.modules.app.entity.UserEntity;
+import com.sqx.modules.firstLogin.entity.HrEntity;
+import com.sqx.modules.resumes.entity.Company;
+import com.sqx.modules.resumes.entity.PostPush;
+import com.sqx.modules.resumes.entity.Resumes;
 import lombok.Data;
 
 
@@ -80,5 +85,15 @@ public class ChatConversation {
 
     @TableField(exist = false)
     private String messageType;
+    @TableField(exist = false)
+    private Resumes resumes;
+    @TableField(exist = false)
+    private UserEntity userEntity;
+    @TableField(exist = false)
+    private PostPush postPush;
+    @TableField(exist = false)
+    private HrEntity hr;
+    @TableField(exist = false)
+    private Company company;
 
 }

+ 1 - 0
src/main/java/com/sqx/modules/chat/service/ChatConversationService.java

@@ -21,4 +21,5 @@ public interface ChatConversationService extends IService<ChatConversation> {
 
     Result insertChatConversationByChatVideo(Long userId,ChatConversation chatConversation,String messageType);
 
+    Object getConversationList(Integer page,Integer limit,ChatConversation chatConversation);
 }

+ 38 - 1
src/main/java/com/sqx/modules/chat/service/impl/ChatConversationServiceImpl.java

@@ -1,6 +1,7 @@
 package com.sqx.modules.chat.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.sqx.common.utils.DateUtils;
@@ -13,6 +14,11 @@ import com.sqx.modules.chat.entity.ChatContent;
 import com.sqx.modules.chat.entity.ChatConversation;
 import com.sqx.modules.chat.service.ChatContentService;
 import com.sqx.modules.chat.service.ChatConversationService;
+import com.sqx.modules.firstLogin.service.HrService;
+import com.sqx.modules.resumes.entity.PostPush;
+import com.sqx.modules.resumes.service.CompanyService;
+import com.sqx.modules.resumes.service.PostPushService;
+import com.sqx.modules.resumes.service.ResumesService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -20,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.List;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 
@@ -31,6 +38,14 @@ public class ChatConversationServiceImpl extends ServiceImpl<ChatConversationDao
     private UserService userService;
     @Autowired
     private ChatContentService chatContentService;
+    @Autowired
+    private PostPushService postPushService;
+    @Autowired
+    private HrService hrService;
+    @Autowired
+    private CompanyService companyService;
+    @Autowired
+    private ResumesService resumesService;
 
 
     @Override
@@ -142,6 +157,28 @@ public class ChatConversationServiceImpl extends ServiceImpl<ChatConversationDao
         return Result.error("系统繁忙,请稍后再试");
     }
 
-
+    @Override
+    public Object getConversationList(Integer page,Integer limit ,ChatConversation chatConversation) {
+        Page<ChatConversation> pages;
+        if (page != null && limit != null) {
+            pages = new Page<>(page, limit);
+        } else {
+            pages = new Page<>();
+            pages.setSize(-1);
+        }
+        QueryWrapper<ChatConversation> wrapper = new QueryWrapper<>();
+        wrapper.eq("user_id",chatConversation.getUserId()).orderByAsc("update_time");
+        IPage<ChatConversation> selectPage = baseMapper.selectPage(pages,wrapper);
+        List<ChatConversation> chatConversations = selectPage.getRecords();
+        for (ChatConversation chatConversation1 : chatConversations){
+            PostPush postPush = postPushService.getById(chatConversation1.getPostPushId());
+            chatConversation1.setPostPush(postPush);
+            chatConversation1.setHr(hrService.getByUserId(String.valueOf(chatConversation1.getFocusedUserId())));
+            chatConversation1.setCompany(companyService.getById(postPush.getCompanyId()));
+            chatConversation1.setUserEntity(userService.getById(chatConversation1.getFocusedUserId()));
+            chatConversation1.setResumes(resumesService.getById(chatConversation1.getResumesId()));
+        }
+        return  selectPage;
+    }
 
 }

+ 2 - 4
src/main/java/com/sqx/modules/firstLogin/control/UserFirstRegistController.java

@@ -165,8 +165,7 @@ public class UserFirstRegistController {
     @Login
     @PostMapping("deleteWorkExp")
     @ApiOperation("删除工作经历")
-    public Result deleteExp(Integer workExpId) {
-        WorkExp workExp = workExpService.getById(workExpId);
+    public Result deleteExp(@RequestBody WorkExp workExp) {
         workExp.setIsUse(0);
         workExpService.saveOrUpdate(workExp);
         return Result.success();
@@ -174,8 +173,7 @@ public class UserFirstRegistController {
     @Login
     @PostMapping("deleteEdu")
     @ApiOperation("删除教育经历")
-    public Result deleteEdu( Integer eduId) {
-        Edu edu = eduService.getById(eduId);
+    public Result deleteEdu( @RequestBody Edu edu) {
         edu.setIsUse(0);
         eduService.saveOrUpdate(edu);
         return Result.success();

+ 1 - 1
src/main/java/com/sqx/modules/firstLogin/entity/HrEntity.java

@@ -15,6 +15,6 @@ public class HrEntity implements Serializable {
     private  Integer hrId;
     private  Integer userId;
     private  String  hrImg;
-    private  String  hrName;
+    private  String  hrPosition;
 
 }

+ 1 - 0
src/main/java/com/sqx/modules/firstLogin/service/HrService.java

@@ -4,4 +4,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.sqx.modules.firstLogin.entity.HrEntity;
 
 public interface HrService extends IService<HrEntity> {
+    HrEntity getByUserId(String userId);
 }

+ 8 - 0
src/main/java/com/sqx/modules/firstLogin/service/impl/HrServiceImpl.java

@@ -1,5 +1,6 @@
 package com.sqx.modules.firstLogin.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.sqx.modules.firstLogin.dao.HrDao;
 import com.sqx.modules.firstLogin.entity.HrEntity;
@@ -8,4 +9,11 @@ import org.springframework.stereotype.Service;
 
 @Service
 public class HrServiceImpl extends ServiceImpl<HrDao, HrEntity> implements HrService {
+
+    @Override
+    public HrEntity getByUserId(String userId) {
+        QueryWrapper<HrEntity> queryWrapper =new QueryWrapper<>();
+        queryWrapper.eq("user_id",userId);
+        return  baseMapper.selectOne(queryWrapper);
+    }
 }

+ 2 - 2
src/main/java/com/sqx/modules/intention/controller/AppIntentionController.java

@@ -66,8 +66,8 @@ public class AppIntentionController {
     @Login
     @ApiOperation("删除求职意向")
     @PostMapping(value = "deleteIntention")
-    public Result deleteIntention(Long intentionId) {
-        return intentionService.removeById(intentionId) ? Result.success() : Result.error();
+    public Result deleteIntention(@RequestBody Intention intention) {
+        return intentionService.removeById(intention.getIntentionId()) ? Result.success() : Result.error();
     }
 }
 

+ 7 - 2
src/main/java/com/sqx/modules/post/controller/PostController.java

@@ -27,13 +27,19 @@ public class PostController {
         return Result.success().put("data", postService.getPostListOfUser());
     }
     @Login
-    @GetMapping("getPostListOnly")
+    @GetMapping("getPostOnly")
     @ApiOperation("获取岗位详细信息")
     public Result getPostListOne(Integer postId,@RequestAttribute("userId") Long userId) {
         viewPostService.addViewPost(postId,userId);
         return Result.success().put("data", postService.getPostListOne(postId));
     }
     @Login
+    @GetMapping("getPostOnlyHr")
+    @ApiOperation("获取岗位详细信息")
+    public Result getPostListOneByHr(Integer postId) {
+        return Result.success().put("data", postService.getPostListOne(postId));
+    }
+    @Login
     @PostMapping("addPost")
     @ApiOperation("增加岗位")
     public void addPost(@RequestAttribute("userId") Long userId,@RequestBody PostEntity postEntity) {
@@ -70,5 +76,4 @@ public class PostController {
         queryWrapper.eq("user_id",userId);
         return Result.success().put("data", postService.getBaseMapper().selectList(queryWrapper));
     }
-
 }

+ 1 - 1
src/main/java/com/sqx/modules/post/controller/ViewPostController.java

@@ -57,7 +57,7 @@ public class ViewPostController {
         return Result.success();
     }
     @Login
-    @GetMapping("gerPushost")
+    @GetMapping("gerPushPost")
     @ApiOperation("获取收藏的岗位列表")
     public Result getPushPost(@RequestAttribute("userId") Long userId) {
         return  Result.success().put("data",viewPostService.getPushPost(userId));

+ 11 - 4
src/main/java/com/sqx/modules/resumes/controller/PostPushController.java

@@ -2,6 +2,7 @@ package com.sqx.modules.resumes.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.sqx.common.utils.Result;
+import com.sqx.modules.app.annotation.Login;
 import com.sqx.modules.resumes.entity.PostPush;
 import com.sqx.modules.resumes.service.PostPushService;
 import com.sqx.modules.utils.EasyPoi.ExcelUtils;
@@ -37,8 +38,8 @@ public class PostPushController {
 
     @GetMapping("/getPostPushList")
     @ApiOperation("获取发布的招聘岗位列表")
-    public Result getPostPushList(Integer page, Integer limit, Long userId, PostPush postPush, Integer screen) {
-        return postPushService.getPostPushList(page, limit, null, null, userId, postPush, screen);
+    public Result getPostPushList(Integer page, Integer limit, Long userId, PostPush postPush, Integer screen,Integer isDue) {
+        return postPushService.getPostPushList(page, limit, null, null, userId, postPush, screen,isDue);
     }
 
     @PostMapping("/deletePostPush")
@@ -85,11 +86,17 @@ public class PostPushController {
         return Result.success();
     }
 
-    @GetMapping("/selectPostPushDetails")
+   /* @GetMapping("/selectPostPushDetails")
     @ApiOperation("查询招聘信息详情")
     public Result selectPostPushDetails(Long postPushId) {
         return Result.success().put("data", postPushService.selectPostPushDetails(null, postPushId, null, null));
-    }
+    }*/
+    @Login
+    @GetMapping("/selectPostPushDetails")
+    @ApiOperation("查询招聘信息详情")
+    public Result selectPostPushDetails(@RequestAttribute("userId")Long userId, Long postPushId) {
+         return Result.success().put("data", postPushService.selectPostPushDetails(userId, postPushId, null, null));
+     }
 
     @GetMapping("/closeOrOpen")
     @ApiOperation("关闭或打开招聘")

+ 5 - 4
src/main/java/com/sqx/modules/resumes/controller/app/AppPostPushController.java

@@ -30,8 +30,8 @@ public class AppPostPushController {
 
     @GetMapping("/getPostPushList")
     @ApiOperation("获取发布的招聘岗位列表")
-    public Result getPostPushList(Integer page, Integer limit, Long userId, PostPush postPush, Integer screen) {
-        return postPushService.getPostPushList(page, limit, null, null, userId, postPush, screen);
+    public Result getPostPushList(Integer page, Integer limit, Long userId, PostPush postPush, Integer screen,Integer isDue) {
+        return postPushService.getPostPushList(page, limit, null, null, userId, postPush, screen,isDue);
     }
 
     @GetMapping("/selectPostPushDetails")
@@ -65,14 +65,15 @@ public class AppPostPushController {
     /**
      * -----------------------------------------上面是企业接口,下面是用户接口------------------------------------------------
      */
+    @Login
     @GetMapping("/userGetPostPushList")
     @ApiOperation("用户获取招聘岗位列表")
-    public Result userGetPostPushList(Integer page, Integer limit,Double lng,Double lat, Long userId, PostPush postPush, Integer screen) {
+    public Result userGetPostPushList(Integer page, Integer limit,Double lng,Double lat, @RequestAttribute("userId") Long userId, PostPush postPush, Integer screen,Integer isDue) {
         if (StringUtils.isNotBlank(postPush.getRuleClassifyName()) && userId != null) {
             recordService.saveRecord(userId, postPush.getRuleClassifyName());
         }
         postPush.setStatus(2);
-        return postPushService.getPostPushList(page, limit, lng, lat,  userId, postPush, screen);
+        return postPushService.getPostPushList(page, limit, lng, lat,  userId, postPush, screen,isDue);
     }
 
     @ApiOperation("获取所有有职位的省")

+ 1 - 1
src/main/java/com/sqx/modules/resumes/dao/PostPushDao.java

@@ -22,7 +22,7 @@ public interface PostPushDao extends BaseMapper<PostPush> {
     int insertPostPush(PostPush postPush);
 
 
-    IPage<PostPush> getPostPushList(@Param("page") Page<PostPush> page, @Param("lng") Double lng, @Param("lat") Double lat, @Param("postPush") PostPush postPush, @Param("industry") String[] industry, @Param("education") String[] education, @Param("experience") String[] experience, @Param("companyPeople") String[] companyPeople, @Param("salaryRange") String[] salaryRange, @Param("userId") Long userId, @Param("screen") Integer screen);
+    IPage<PostPush> getPostPushList(@Param("page") Page<PostPush> page, @Param("lng") Double lng, @Param("lat") Double lat, @Param("postPush") PostPush postPush, @Param("industry") String[] industry, @Param("education") String[] education, @Param("experience") String[] experience, @Param("companyPeople") String[] companyPeople, @Param("salaryRange") String[] salaryRange, @Param("screen") Integer screen,@Param("isDue")Integer isDue);
 
     IPage<PostDetails> selectPostList(Page<PostPush> page, Integer ruleClassifyId, String address, Long userId);
 

+ 10 - 0
src/main/java/com/sqx/modules/resumes/entity/Company.java

@@ -149,6 +149,16 @@ public class Company implements Serializable {
     @TableField(exist = false)
     List<PostPush> postPushList;
 
+    private String companyAllName;
+    private String addressDetail;
+    private String companyDevelop;
+    private String workTime;
+    private String workRestTime;
+    private String workOverTime;
+    private String Welfare;
+    private String companyPeopleDevelop;
+    private String photos;
+    private String workDescribe;
 
     public Company() {
     }

+ 9 - 1
src/main/java/com/sqx/modules/resumes/entity/PostPush.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.sqx.modules.app.entity.UserEntity;
+import com.sqx.modules.firstLogin.entity.HrEntity;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -206,7 +207,6 @@ public class PostPush implements Serializable {
     @TableField(exist = false)
     private String companyName;
 
-    @TableField(exist = false)
     private String userId;
 
     @TableField(exist = false)
@@ -221,12 +221,20 @@ public class PostPush implements Serializable {
     @TableField(exist = false)
     private UserEntity user;
 
+    @TableField(exist = false)
+    private HrEntity hr;
+
     @TableField(exist = false)
     private Integer counts;
 
     @TableField(exist = false)
     private Integer num;
 
+    private Integer isDue;
+    private String  welfareTag;
+    private Integer type;
+    private String salaryTimes;
+
     public PostPush() {
     }
 }

+ 1 - 1
src/main/java/com/sqx/modules/resumes/service/PostPushService.java

@@ -35,7 +35,7 @@ public interface PostPushService extends IService<PostPush> {
      */
     Result cancelPostPush(Long userId, Long postPushId, int type);
 
-    Result getPostPushList(Integer page, Integer limit, Double lng, Double lat, Long userId, PostPush postPush, Integer screen);
+    Result getPostPushList(Integer page, Integer limit, Double lng, Double lat, Long userId, PostPush postPush, Integer screen,Integer isDue);
 
     List<LetterCity> getCityList(String city);
 

+ 36 - 8
src/main/java/com/sqx/modules/resumes/service/impl/PostPushServiceImpl.java

@@ -17,6 +17,7 @@ import com.sqx.modules.app.service.UserMoneyService;
 import com.sqx.modules.app.service.UserService;
 import com.sqx.modules.common.entity.CommonInfo;
 import com.sqx.modules.common.service.CommonInfoService;
+import com.sqx.modules.firstLogin.service.HrService;
 import com.sqx.modules.myCollection.entity.MyCollection;
 import com.sqx.modules.myCollection.service.MyCollectionService;
 import com.sqx.modules.resumes.dao.PostPushDao;
@@ -68,6 +69,8 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
     @Autowired
     private RuleClassifyDao ruleClassifyDao;
     private ReentrantReadWriteLock reentrantReadWriteLock = new ReentrantReadWriteLock();
+    @Autowired
+    private HrService hrService;
 
     @Override
     public Result savePostPush(PostPush postPush, Long userId) {
@@ -253,7 +256,7 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
 
 
     @Override
-    public Result getPostPushList(Integer page, Integer limit, Double lng, Double lat, Long userId, PostPush postPush, Integer screen) {
+    public Result getPostPushList(Integer page, Integer limit, Double lng, Double lat, Long userId, PostPush postPush, Integer screen,Integer isDue) {
         Page<PostPush> pages;
         if (page != null && limit != null) {
             pages = new Page<>(page, limit);
@@ -267,15 +270,13 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
         String[] companyPeople = StringUtils.isNotBlank(postPush.getCompanyPeople()) ? postPush.getCompanyPeople().split(",") : null;
         String[] salaryRange = StringUtils.isNotBlank(postPush.getSalaryRange()) ? postPush.getSalaryRange().split(",") : null;
 
-
-        IPage<PostPush> selectPage = baseMapper.getPostPushList(pages, lng, lat, postPush, industry, education, experience, companyPeople, salaryRange, userId, screen);
+        IPage<PostPush> selectPage = baseMapper.getPostPushList(pages, lng, lat, postPush, industry, education, experience, companyPeople, salaryRange,screen,isDue);
         List<PostPush> records = selectPage.getRecords();
         for (PostPush record : records) {
             Company company = companyService.selectCompanyByCompanyId(record.getCompanyId());
-            if (company != null) {
-                record.setCompany(companyService.selectCompanyByUserId(company.getUserId()));
-                record.setUser(userService.selectUserById(company.getUserId()));
-            }
+            record.setCompany(company);
+            record.setUser(userService.getById(record.getUserId()));
+            record.setHr(hrService.getByUserId(record.getUserId()));
         }
         return Result.success().put("data", selectPage);
     }
@@ -366,7 +367,7 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
     }
 
 
-    @Override
+    /*@Override
     public PostPush selectPostPushDetails(Long userId, Long postPushId, Double lng, Double lat) {
         PostPush postPush = baseMapper.selectPostId(userId, postPushId, lng, lat);
         if (postPush != null) {
@@ -390,6 +391,33 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
         }
 
 
+        return postPush;
+    }*/
+    @Override
+    public PostPush selectPostPushDetails(Long userId, Long postPushId, Double lng, Double lat) {
+        PostPush postPush = baseMapper.selectById(postPushId);
+        if (postPush != null) {
+            Company company = companyService.selectCompanyByCompanyId(postPush.getCompanyId());
+            if (company != null) {
+                if (userId != null && !company.getUserId().equals(userId)) {
+                    int count = userBrowseService.count(new QueryWrapper<UserBrowse>().eq("user_id", userId).eq("post_push_id", postPushId));
+                    if (count == 0) {
+                        UserBrowse userBrowse = new UserBrowse();
+                        userBrowse.setUserId(userId);
+                        userBrowse.setBrowseType(1);
+                        userBrowse.setPostPushId(postPushId);
+                        userBrowse.setPostPushCompanyId(company.getCompanyId());
+                        userBrowse.setUpdateTime(LocalDateTime.now());
+                        userBrowseService.save(userBrowse);
+                    }
+                }
+                postPush.setCompany(company);
+                postPush.setUser(userService.getById(postPush.getUserId()));
+                postPush.setHr(hrService.getByUserId(postPush.getUserId()));
+            }
+        }
+
+
         return postPush;
     }
 

+ 22 - 5
src/main/java/com/sqx/modules/sendRecord/controller/SendRecordController.java

@@ -1,19 +1,21 @@
 package com.sqx.modules.sendRecord.controller;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.sqx.common.utils.Result;
 import com.sqx.modules.app.annotation.Login;
+import com.sqx.modules.chat.entity.ChatConversation;
+import com.sqx.modules.chat.service.ChatConversationService;
 import com.sqx.modules.resumes.entity.PostPush;
 import com.sqx.modules.resumes.entity.Resumes;
+import com.sqx.modules.resumes.service.PostPushService;
 import com.sqx.modules.sendRecord.entity.SendRecord;
 import com.sqx.modules.sendRecord.service.SendRecordService;
 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.RequestAttribute;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import java.time.LocalDateTime;
 
 /**
  * <p>
@@ -29,7 +31,17 @@ public class SendRecordController {
 
     @Autowired
     private SendRecordService recordService;
+    @Autowired
+    private SendRecordService sendRecordService;
+    @Autowired
+    private ChatConversationService chatConversationService;
 
+    @Login
+    @ApiOperation("新增一个投递")
+    @PostMapping(value = "addSendRecord")
+    public Result addSendRecord(@RequestAttribute("userId")Long userId,Long resumesId,Long postPushId){
+        return  sendRecordService.addSendRecord(userId,postPushId);
+    }
     @Login
     @ApiOperation("获取我的投递列表V2")
     @GetMapping(value = "getMyRecordListV2")
@@ -68,6 +80,11 @@ public class SendRecordController {
     public Result seeRecord(Long recordId) {
         return recordService.seeRecord(recordId);
     }
-
+    @Login
+    @ApiOperation("获取沟通过的岗位接口")
+    @GetMapping("getConversationList") public Result getConversationList(@RequestAttribute("userId")Long userId, Integer page, Integer limit, ChatConversation chatConversation){
+        chatConversation.setUserId(userId);
+        return Result.success().put("data", chatConversationService.getConversationList(page, limit, chatConversation));
+    }
 }
 

+ 2 - 0
src/main/java/com/sqx/modules/sendRecord/service/SendRecordService.java

@@ -27,4 +27,6 @@ public interface SendRecordService extends IService<SendRecord> {
     Result seeRecord(Long recordId);
 
     IPage<ResumesBrowseVo> getCompanyRecordListV2(Integer page, Integer limit, SendRecord sendRecord, Resumes resumes);
+
+    Result addSendRecord(Long userId, Long postPushId);
 }

+ 22 - 0
src/main/java/com/sqx/modules/sendRecord/service/impl/SendRecordServiceImpl.java

@@ -137,4 +137,26 @@ public class SendRecordServiceImpl extends ServiceImpl<SendRecordDao, SendRecord
         }
         return companyRecordList;
     }
+
+    @Override
+    public Result addSendRecord(Long userId, Long postPushId) {
+        QueryWrapper<SendRecord> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("user_id",userId).eq("post_push_id",postPushId);
+        SendRecord oldSendRecord = baseMapper.selectOne(queryWrapper);
+        if(oldSendRecord !=null){
+            return Result.error("已投递,请勿重复投递");
+        }else {
+            SendRecord sendRecord =new SendRecord();
+            PostPush postPush = postPushService.getById(postPushId);
+            sendRecord.setCompanyUserId(Long.valueOf(postPush.getUserId()));
+            sendRecord.setUserId(userId);
+            sendRecord.setPostPushId(postPushId);
+            sendRecord.setCompanyId(postPush.getCompanyId());
+            sendRecord.setIsSee(0);
+            sendRecord.setCreateTime(LocalDateTime.now());
+            sendRecord.setUpdateTime(LocalDateTime.now());
+            baseMapper.insert(sendRecord);
+            return Result.success();
+        }
+    }
 }

+ 3 - 4
src/main/resources/mapper/resumes/PostPushDao.xml

@@ -32,13 +32,12 @@
         company c
         WHERE p.company_id = c.company_id
 
-        <if test="userId!=null">
-            and p.company_id NOT IN(select company_id from shield_company s where s.user_id= #{userId} and
-            s.shield_type=1)
-        </if>
         <if test="postPush.companyId!=null">
             and p.company_id = #{postPush.companyId}
         </if>
+        <if test="isDue!=null">
+            and p.is_due = #{isDue}
+        </if>
         <if test="postPush.companyName!=null and postPush.companyName!=''">
             and c.company_name like concat("%",#{postPush.companyName},"%")
         </if>