Browse Source

fix: 岗位查询结束日期非空判定

zhangying 9 months ago
parent
commit
52d37670c0

+ 1 - 1
src/main/java/com/hz/employmentsite/services/impl/companyService/PostServiceImpl.java

@@ -90,7 +90,7 @@ public class PostServiceImpl implements PostService {
             for(PostVo curPost : list){
                 curPost.listLabel = labelCQuery.getPostLabelList(curPost.getPostID());
 
-                if(curPost.endTime.before(new Date())&&curPost.recordStatus.equals(1)){
+                if (curPost.endTime != null && curPost.endTime.before(new Date()) && curPost.recordStatus.equals(1)) {
                     var curPcPost = pcPostMapper.selectByPrimaryKey(curPost.getPostID());
                     curPcPost.setRecordStatus(0);
                     pcPostMapper.updateByPrimaryKey(curPcPost);