Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

jz.kai 3 лет назад
Родитель
Сommit
6fbf3e3f1c
25 измененных файлов с 983 добавлено и 79 удалено
  1. 22 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/MessageNoticeDAO.java
  2. 55 0
      common/src/main/java/com/jpsoft/employment/modules/base/entity/MessageNotice.java
  3. 21 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/MessageNoticeService.java
  4. 86 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/MessageNoticeServiceImpl.java
  5. 8 0
      common/src/main/java/com/jpsoft/employment/modules/common/dto/MessageResultBuilder.java
  6. 50 0
      common/src/main/java/com/jpsoft/employment/modules/common/dto/MessageResultSimple.java
  7. 12 4
      common/src/main/java/com/jpsoft/employment/modules/job/dao/RecruitmentCollectionDAO.java
  8. 9 0
      common/src/main/java/com/jpsoft/employment/modules/job/dao/RecruitmentDAO.java
  9. 1 0
      common/src/main/java/com/jpsoft/employment/modules/job/dao/ResumeDAO.java
  10. 10 0
      common/src/main/java/com/jpsoft/employment/modules/job/entity/ApproveStatusConstant.java
  11. 19 2
      common/src/main/java/com/jpsoft/employment/modules/job/service/RecruitmentCollectionService.java
  12. 9 0
      common/src/main/java/com/jpsoft/employment/modules/job/service/RecruitmentService.java
  13. 1 0
      common/src/main/java/com/jpsoft/employment/modules/job/service/ResumeService.java
  14. 11 5
      common/src/main/java/com/jpsoft/employment/modules/job/service/impl/RecruitmentCollectionServiceImpl.java
  15. 13 0
      common/src/main/java/com/jpsoft/employment/modules/job/service/impl/RecruitmentServiceImpl.java
  16. 9 0
      common/src/main/java/com/jpsoft/employment/modules/job/service/impl/ResumeServiceImpl.java
  17. 190 0
      common/src/main/resources/mapper/base/MessageNotice.xml
  18. 12 17
      common/src/main/resources/mapper/job/JobUser.xml
  19. 6 1
      common/src/main/resources/mapper/job/Recruitment.xml
  20. 76 29
      common/src/main/resources/mapper/job/RecruitmentCollection.xml
  21. 42 0
      common/src/main/resources/mapper/job/Resume.xml
  22. 2 0
      common/src/main/resources/mapper/job/UserBrowse.xml
  23. 2 0
      common/src/main/resources/mapper/job/UserCollection.xml
  24. 199 0
      web/src/main/java/com/jpsoft/employment/modules/mobile/controller/MessageNoticeApiController.java
  25. 118 21
      web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RecruiterApiController.java

+ 22 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/MessageNoticeDAO.java

@@ -0,0 +1,22 @@
+package com.jpsoft.employment.modules.base.dao;
+
+import java.util.List;
+
+import com.jpsoft.employment.modules.base.entity.MessageNotice;
+import org.springframework.stereotype.Repository;
+import java.util.Map;
+import com.jpsoft.employment.modules.common.dto.Sort;
+
+@Repository
+public interface MessageNoticeDAO {
+	int insert(MessageNotice entity);
+	int update(MessageNotice entity);
+	int exist(String id);
+	MessageNotice get(String id);
+	int delete(String id);
+	List<MessageNotice> list();
+	List<MessageNotice> search(Map<String, Object> searchParams, List<Sort> sortList);
+	List<MessageNotice> findByUserIdAndClassify(String userId,String classify);
+	List<MessageNotice> findByUserId(String userId);
+	MessageNotice findTopByUserIdAndClassify(String userId,String classify);
+}

+ 55 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/MessageNotice.java

@@ -0,0 +1,55 @@
+package com.jpsoft.employment.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+  描述:base_message_notice的实体类
+ */
+@Data
+@ApiModel(value = "base_message_notice的实体类")
+public class MessageNotice {
+        @ApiModelProperty(value = "ID")
+    private String id;
+        @ApiModelProperty(value = "标题")
+    private String title;
+        @ApiModelProperty(value = "内容")
+    private String content;
+        @ApiModelProperty(value = "收件人ID")
+    private String recipientId;
+        @ApiModelProperty(value = "审核状态是否")
+    private Boolean status;
+        @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+        @ApiModelProperty(value = "创建人")
+    private String createBy;
+    @ApiModelProperty(value = "创建人")
+    private String createByN;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+        @ApiModelProperty(value = "更新人")
+    private String updateBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+        @ApiModelProperty(value = "分类(字典:通知分类")
+    private String classify;
+        @ApiModelProperty(value = "类型:1站内通告,2微信")
+    private String type;
+        @ApiModelProperty(value = "点击超链接")
+    private String noticeLink;
+        @ApiModelProperty(value = "是否发送微信消息")
+    private Boolean sendWechat;
+        @ApiModelProperty(value = "消息模板code")
+    private String wechatCode;
+}

+ 21 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/MessageNoticeService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.employment.modules.base.service;
+
+import java.util.List;
+import java.util.Map;
+import com.github.pagehelper.Page;
+import com.jpsoft.employment.modules.base.entity.MessageNotice;
+import com.jpsoft.employment.modules.common.dto.Sort;
+import com.github.pagehelper.Page;
+
+public interface MessageNoticeService {
+	MessageNotice get(String id);
+	boolean exist(String id);
+	int insert(MessageNotice model);
+	int update(MessageNotice model);
+	int delete(String id);
+	List<MessageNotice> list();
+	Page<MessageNotice> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+	List<MessageNotice> findByUserIdAndClassify(String userId,String classify);
+	List<MessageNotice> findByUserId(String userId);
+	MessageNotice findTopByUserIdAndClassify(String userId,String classify);
+}

+ 86 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/MessageNoticeServiceImpl.java

@@ -0,0 +1,86 @@
+package com.jpsoft.employment.modules.base.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Resource;
+
+import com.jpsoft.employment.modules.base.dao.MessageNoticeDAO;
+import com.jpsoft.employment.modules.base.entity.MessageNotice;
+import com.jpsoft.employment.modules.base.service.MessageNoticeService;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.employment.modules.common.dto.Sort;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="messageNoticeService")
+public class MessageNoticeServiceImpl implements MessageNoticeService {
+	@Resource(name="messageNoticeDAO")
+	private MessageNoticeDAO messageNoticeDAO;
+
+	@Override
+	public MessageNotice get(String id) {
+		// TODO Auto-generated method stub
+		return messageNoticeDAO.get(id);
+	}
+
+	@Override
+	public int insert(MessageNotice model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return messageNoticeDAO.insert(model);
+	}
+
+	@Override
+	public int update(MessageNotice model) {
+		// TODO Auto-generated method stub
+		return messageNoticeDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return messageNoticeDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = messageNoticeDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<MessageNotice> list() {
+		// TODO Auto-generated method stub
+		return messageNoticeDAO.list();
+	}
+		
+	@Override
+	public Page<MessageNotice> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<MessageNotice> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            messageNoticeDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<MessageNotice> findByUserIdAndClassify(String userId,String classify){
+		return messageNoticeDAO.findByUserIdAndClassify(userId,classify);
+	}
+
+	@Override
+	public List<MessageNotice> findByUserId(String userId){
+		return messageNoticeDAO.findByUserId(userId);
+	}
+
+	@Override
+	public MessageNotice findTopByUserIdAndClassify(String userId,String classify){
+		return messageNoticeDAO.findTopByUserIdAndClassify(userId,classify);
+	}
+}

+ 8 - 0
common/src/main/java/com/jpsoft/employment/modules/common/dto/MessageResultBuilder.java

@@ -9,4 +9,12 @@ public class MessageResultBuilder {
     public static <T>  MessageResult<T> error(String msg){
         return new MessageResult<T>(false,msg,null,500);
     }
+    
+    public static  MessageResultSimple success(Object data){
+        return new MessageResultSimple(true,null,data,200);
+    }
+
+    public static  MessageResultSimple failed(String msg){
+        return new MessageResultSimple(false,msg,null,500);
+    }
 }

+ 50 - 0
common/src/main/java/com/jpsoft/employment/modules/common/dto/MessageResultSimple.java

@@ -0,0 +1,50 @@
+package com.jpsoft.employment.modules.common.dto;
+
+public class MessageResultSimple {
+	private boolean result;
+	private String message;
+	private Object data;
+	private int code = 200;
+
+	public MessageResultSimple() {
+	}
+
+	public MessageResultSimple(boolean result, String message, Object data, int code) {
+		this.result = result;
+		this.message = message;
+		this.data = data;
+		this.code = code;
+	}
+
+	public boolean isResult() {
+		return result;
+	}
+
+	public void setResult(boolean result) {
+		this.result = result;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+
+	public Object getData() {
+		return data;
+	}
+
+	public void setData(Object data) {
+		this.data = data;
+	}
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+}

+ 12 - 4
common/src/main/java/com/jpsoft/employment/modules/job/dao/RecruitmentCollectionDAO.java

@@ -1,13 +1,13 @@
 package com.jpsoft.employment.modules.job.dao;
 
 import java.util.List;
+import java.util.Map;
 
-import com.jpsoft.employment.modules.job.entity.ResumeVO;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
-import com.jpsoft.employment.modules.job.entity.RecruitmentCollection;
-import java.util.Map;
+
 import com.jpsoft.employment.modules.common.dto.Sort;
-import org.apache.ibatis.annotations.Param;
+import com.jpsoft.employment.modules.job.entity.RecruitmentCollection;
 
 @Repository
 public interface RecruitmentCollectionDAO {
@@ -33,4 +33,12 @@ public interface RecruitmentCollectionDAO {
 	 * @return
 	 */
 	List<Map<String,Object>> pagedLoadAllResumes(Map<String, Object> searchParams, List<Sort> sortList);
+	
+	/**
+	 * 招聘方:收藏的简历,取消收藏
+	 * @param resumeId
+	 * @param hrId
+	 * @return
+	 */
+	int updateCancelCollect(@Param("resumeId") String resumeId,@Param("hrId") String hrId);
 }

+ 9 - 0
common/src/main/java/com/jpsoft/employment/modules/job/dao/RecruitmentDAO.java

@@ -34,4 +34,13 @@ public interface RecruitmentDAO {
      * @return
      */
     Map<String,Object> rptMyRecruitmentCount(String hrId);
+    
+    /**
+	 * 招聘方职位管理:上下架操作
+	 * @param recruitmentId
+	 * @param publishTag
+	 * @param caller
+	 * @return
+	 */
+	int updateForPublish(@Param("recruitmentId") String recruitmentId,@Param("publishTag") String publishTag,@Param("caller") String caller);
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/job/dao/ResumeDAO.java

@@ -17,4 +17,5 @@ public interface ResumeDAO {
 	List<Resume> list();
 	List<Resume> search(@Param("searchParams") Map<String,Object> searchParams, @Param("sortList")List<Sort> sortList);
 	Resume findByUserId(String userId);
+	List<Map> foundJobManagement(@Param("searchParams") Map<String,Object> searchParams, @Param("sortList")List<Sort> sortList);
 }

+ 10 - 0
common/src/main/java/com/jpsoft/employment/modules/job/entity/ApproveStatusConstant.java

@@ -0,0 +1,10 @@
+package com.jpsoft.employment.modules.job.entity;
+
+public class ApproveStatusConstant {
+
+	public static final String UNCREATE="1";  //未创建
+	
+	public static final String APPROVING="2";  //审批中
+	
+	public static final String FINISH="3";  // 已审批
+}

+ 19 - 2
common/src/main/java/com/jpsoft/employment/modules/job/service/RecruitmentCollectionService.java

@@ -2,10 +2,10 @@ package com.jpsoft.employment.modules.job.service;
 
 import java.util.List;
 import java.util.Map;
-import com.jpsoft.employment.modules.job.entity.RecruitmentCollection;
+
 import com.github.pagehelper.Page;
 import com.jpsoft.employment.modules.common.dto.Sort;
-import com.jpsoft.employment.modules.job.entity.ResumeVO;
+import com.jpsoft.employment.modules.job.entity.RecruitmentCollection;
 
 public interface RecruitmentCollectionService {
 	RecruitmentCollection get(String id);
@@ -16,6 +16,15 @@ public interface RecruitmentCollectionService {
 	List<RecruitmentCollection> list();
 	Page<RecruitmentCollection> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 
+	/**
+	 * 招聘方:收藏的简历
+	 * @param searchParams
+	 * @param pageNumber
+	 * @param pageSize
+	 * @param count
+	 * @param sortList
+	 * @return
+	 */
 	Page<Map<String,Object>> pagedLoadCollectResumes(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList);
 
 	/**
@@ -28,4 +37,12 @@ public interface RecruitmentCollectionService {
 	 * @return
 	 */
 	Page<Map<String,Object>> pagedLoadAllResumes(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList);
+	
+	/**
+	 * 招聘方:收藏的简历,取消收藏
+	 * @param resumeId
+	 * @param hrId
+	 * @return
+	 */
+	boolean updateCancelCollect(String resumeId,String hrId);
 }

+ 9 - 0
common/src/main/java/com/jpsoft/employment/modules/job/service/RecruitmentService.java

@@ -34,4 +34,13 @@ public interface RecruitmentService {
 	 * @return
 	 */
 	Map<String,Object> rptMyRecruitmentCount(String hrId);
+	
+	/**
+	 * 招聘方职位管理:上下架操作
+	 * @param recruitmentId
+	 * @param publishTag
+	 * @param caller
+	 * @return
+	 */
+	boolean updateForPublish(String recruitmentId,String publishTag,String caller);
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/job/service/ResumeService.java

@@ -15,4 +15,5 @@ public interface ResumeService {
 	List<Resume> list();
 	Page<Resume> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 	Resume findByUserId(String userId);
+	Page<Map> foundJobManagement(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 }

+ 11 - 5
common/src/main/java/com/jpsoft/employment/modules/job/service/impl/RecruitmentCollectionServiceImpl.java

@@ -2,18 +2,18 @@ package com.jpsoft.employment.modules.job.service.impl;
 
 import java.util.List;
 import java.util.Map;
-import java.util.UUID;
+
 import javax.annotation.Resource;
 
-import com.jpsoft.employment.modules.job.entity.ResumeVO;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.job.dao.RecruitmentCollectionDAO;
 import com.jpsoft.employment.modules.job.entity.RecruitmentCollection;
 import com.jpsoft.employment.modules.job.service.RecruitmentCollectionService;
-import com.github.pagehelper.Page;
-import com.jpsoft.employment.modules.common.dto.Sort;
-import com.github.pagehelper.PageHelper;
 
 @Transactional
 @Component(value="recruitmentCollectionService")
@@ -87,4 +87,10 @@ public class RecruitmentCollectionServiceImpl implements RecruitmentCollectionSe
 
 		return page;
 	}
+
+	@Override
+	public boolean updateCancelCollect(String resumeId,String hrId) {
+		int num=recruitmentCollectionDAO.updateCancelCollect(resumeId,hrId);
+		return num>0;
+	}
 }

+ 13 - 0
common/src/main/java/com/jpsoft/employment/modules/job/service/impl/RecruitmentServiceImpl.java

@@ -8,7 +8,10 @@ import javax.annotation.Resource;
 import com.jpsoft.employment.modules.job.entity.RecruitmentVO;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Assert;
+
 import com.jpsoft.employment.modules.job.dao.RecruitmentDAO;
+import com.jpsoft.employment.modules.job.entity.ApproveStatusConstant;
 import com.jpsoft.employment.modules.job.entity.Recruitment;
 import com.jpsoft.employment.modules.job.service.RecruitmentService;
 import com.github.pagehelper.Page;
@@ -95,4 +98,14 @@ public class RecruitmentServiceImpl implements RecruitmentService {
 		return recruitmentDAO.rptMyRecruitmentCount(hrId);
 	}
 
+	@Override
+	public boolean updateForPublish(String recruitmentId, String publishTag,String caller) {
+		if("1".equals(publishTag)) {  //如果是上架操作,先进行审核状态判断,只有审核完才能上架
+			Recruitment  rec=recruitmentDAO.get(recruitmentId);
+			Assert.state(rec!=null&&ApproveStatusConstant.FINISH.equals(rec.getApproveStatus()),"只有审核完成的才能进行上架");
+		}
+		int num=recruitmentDAO.updateForPublish(recruitmentId, publishTag,caller);
+		return num>0;
+	}
+
 }

+ 9 - 0
common/src/main/java/com/jpsoft/employment/modules/job/service/impl/ResumeServiceImpl.java

@@ -72,4 +72,13 @@ public class ResumeServiceImpl implements ResumeService {
         
         return page;
 	}
+
+	@Override
+	public Page<Map> foundJobManagement(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+		Page<Map> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+			resumeDAO.foundJobManagement(searchParams,sortList);
+		});
+
+		return page;
+	}
 }

+ 190 - 0
common/src/main/resources/mapper/base/MessageNotice.xml

@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.employment.modules.base.dao.MessageNoticeDAO">
+	<resultMap id="MessageNoticeMap" type="com.jpsoft.employment.modules.base.entity.MessageNotice">
+		<id property="id" column="id_" />
+			<result property="title" column="title_" />
+			<result property="content" column="content_" />
+			<result property="recipientId" column="recipient_id" />
+			<result property="status" column="status_" />
+			<result property="delFlag" column="del_flag" />
+			<result property="createBy" column="create_by" />
+			<result property="createByN" column="create_by_name" />
+			<result property="createTime" column="create_time" />
+			<result property="updateBy" column="update_by" />
+			<result property="updateTime" column="update_time" />
+			<result property="classify" column="classify_" />
+			<result property="type" column="type_" />
+			<result property="noticeLink" column="notice_link" />
+			<result property="sendWechat" column="send_wechat" />
+			<result property="wechatCode" column="wechat_code" />
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.MessageNotice">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into base_message_notice
+	    (id_,title_,content_,recipient_id,status_,del_flag,create_by,create_time,update_by,update_time,classify_,type_,notice_link,send_wechat,wechat_code)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{title,jdbcType=VARCHAR}
+,#{content,jdbcType= NUMERIC }
+,#{recipientId,jdbcType= NUMERIC }
+,#{status,jdbcType= NUMERIC }
+,#{delFlag,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{classify,jdbcType=VARCHAR}
+,#{type,jdbcType=VARCHAR}
+,#{noticeLink,jdbcType=VARCHAR}
+,#{sendWechat,jdbcType= NUMERIC }
+,#{wechatCode,jdbcType=VARCHAR}
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from base_message_notice where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.MessageNotice">
+		update base_message_notice
+		<set>
+				<if test="title!=null">
+		title_=#{title,jdbcType=VARCHAR},
+		</if>
+				<if test="content!=null">
+		content_=#{content,jdbcType= NUMERIC },
+		</if>
+				<if test="recipientId!=null">
+		recipient_id=#{recipientId,jdbcType= NUMERIC },
+		</if>
+				<if test="status!=null">
+		status_=#{status,jdbcType= NUMERIC },
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="classify!=null">
+		classify_=#{classify,jdbcType=VARCHAR},
+		</if>
+				<if test="type!=null">
+		type_=#{type,jdbcType=VARCHAR},
+		</if>
+				<if test="noticeLink!=null">
+		notice_link=#{noticeLink,jdbcType=VARCHAR},
+		</if>
+				<if test="sendWechat!=null">
+		send_wechat=#{sendWechat,jdbcType= NUMERIC },
+		</if>
+				<if test="wechatCode!=null">
+		wechat_code=#{wechatCode,jdbcType=VARCHAR},
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="MessageNoticeMap">
+		select * from base_message_notice where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from base_message_notice where id_=#{0}
+	</select>
+	<select id="list" resultMap="MessageNoticeMap">
+		select * from base_message_notice
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="MessageNoticeMap">
+		<![CDATA[
+			select
+				a.*,
+				b.real_name AS create_by_name
+			from base_message_notice a
+			LEFT JOIN sys_user b ON a.create_by = b.id_
+		]]>
+		<where>
+			a.del_flag=0
+			<if test="searchParams.id != null">
+				and a.ID_ like #{searchParams.id}
+			</if>
+			<if test="searchParams.recipientId != null">
+				and a.recipient_id = #{searchParams.recipientId}
+			</if>
+			<if test="searchParams.recipientIdAndNull != null">
+				and (a.recipient_id = #{searchParams.recipientId}
+				or a.recipient_id is null)
+			</if>
+			<if test="searchParams.classify != null">
+				and a.classify_ = #{searchParams.classify}
+			</if>
+			<if test="searchParams.type != null">
+				and a.type_ = #{searchParams.type}
+			</if>
+			<if test="searchParams.status != null">
+				and a.status_ = #{searchParams.status}
+			</if>
+			<if test="searchParams.title != null">
+				and a.title_ like #{searchParams.title}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+	<select id="findByUserIdAndClassify" resultMap="MessageNoticeMap">
+		SELECT
+			*
+		FROM
+			base_message_notice
+		WHERE
+			del_flag = 0
+			AND classify_ = #{classify}
+			AND ( recipient_id = #{userId} OR recipient_id IS NULL )
+			AND status_ = '1'
+			AND type_ = '1'
+	</select>
+
+	<select id="findByUserId" resultMap="MessageNoticeMap">
+		SELECT
+			*
+		FROM
+			base_message_notice
+		WHERE
+			del_flag = 0
+			AND recipient_id = #{userId}
+			AND status_ = '1'
+			AND type_ = '1'
+	</select>
+
+	<select id="findTopByUserIdAndClassify" resultMap="MessageNoticeMap">
+		SELECT
+			*
+		FROM
+			base_message_notice
+		WHERE
+			del_flag = 0
+			AND classify_ = #{classify}
+			AND ( recipient_id = #{userId} OR recipient_id IS NULL )
+			AND status_ = '1'
+			AND type_ = '1'
+		ORDER BY
+			create_time
+		LIMIT 1
+	</select>
+</mapper>

+ 12 - 17
common/src/main/resources/mapper/job/JobUser.xml

@@ -155,27 +155,22 @@
 	<!--用于移动端接口:招聘方【对您感兴趣】-->
 	<select id="foundInterestList" parameterType="hashmap" resultType="map">
 		<![CDATA[
-			SELECT
-				jj.id_ jobUserId,
-				jj.real_name,
-				jj.head_image_url,
-			    jre.id_ id
+			SELECT DISTINCT
+			  jj.id_ jobUserId,
+			  jj.real_name name,
+			  jj.head_image_url headImage,
+			  jre.id_ id,
+			  su.id_ sysUseId
 			FROM
-				job_jobuser jj
-			LEFT JOIN job_resume jre ON jre.job_user_id = jj.id_
-			WHERE
-				jj.id_ IN (
-					SELECT
-						jub.job_user_id
-					FROM
-						sys_user su
-					LEFT JOIN job_recruitment jr ON su.company_id = jr.company_id
-					INNER JOIN job_user_browse jub ON jub.job_recruitment_id = jr.id_
-				)
+			  job_user_browse jub
+			INNER JOIN job_recruitment jr ON jub.job_recruitment_id = jr.id_
+			INNER JOIN sys_user su ON jr.company_id = su.company_id
+			INNER JOIN job_jobuser jj ON jub.job_user_id = jj.id_
+			LEFT JOIN job_resume jre ON jj.id_ = jre.job_user_id
 		]]>
 		<where>
 			<if test="searchParams.id != null">
-				and su.id_ like #{searchParams.id}
+				and su.id = #{searchParams.id}
 			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">

+ 6 - 1
common/src/main/resources/mapper/job/Recruitment.xml

@@ -260,6 +260,7 @@
 			SELECT
 			    jr.del_flag,
 			    jr.create_by,
+			    jr.id_  recruitmentId,
 				DATE_FORMAT(jr.update_time,'%c月%e日 %H:%i') updateTime,
 				jr.status_ status,
 				jr.approve_status approveStatus,
@@ -301,8 +302,12 @@
 
 	<!--招聘方个人中心主页:统计已发布的招聘,被浏览量(不包含已撤销的(已关闭的))-->
 	<select id="rptMyRecruitmentCount" parameterType="String" resultType="Map">
-		select count(1) jobCount,sum(reading_times) readTimes from job_recruitment where create_by=#{0} and status_='open'
+		select count(1) jobCount,sum(reading_times) readTimes from job_recruitment where create_by=#{0} and status_='1'
 	</select>
 
+	<!--招聘方职位管理 上下架管理-->
+	<update id="updateForPublish">
+		update job_recruitment  set status_=#{publishTag},update_time=now(),update_by=#{caller}   where id_=#{recruitmentId}
+	</update>
 
 </mapper>

+ 76 - 29
common/src/main/resources/mapper/job/RecruitmentCollection.xml

@@ -121,7 +121,7 @@ id_,create_by,create_time,update_by,update_time,del_flag,company_id,sys_user_id,
 		<![CDATA[
 			select  * from (select
 			c.sys_user_id hrId,
-			c.resume_id as resumeId,
+			c.resume_id resumeId,
 			ju.real_name  realName,
 			ju.head_image_url headImage,
 			ju.address_ address,
@@ -133,58 +133,89 @@ id_,create_by,create_time,update_by,update_time,del_flag,company_id,sys_user_id,
 			jobstaw.name_  jobStatus,
 			drmoneyw.name_ dreamMoney,
 			c.update_time collectionTime,
-			c.del_flag
+			c.del_flag,
+			r.education_,
+			r.work_exp,
+			r.dream_money,
+			r.job_status,
+			r.position_category_id
 			from job_recruitment_collection  c inner join job_resume  r on c.resume_id=r.id_
 			inner join job_jobuser ju on r.job_user_id=ju.id_ and ju.del_flag=0
 			left join job_work_category w on r.position_category_id=w.id_ and w.del_flag=0
-			left join sys_data_dictionary workExpw on r.work_exp=workExpw.value_ and workExpw.del_flag=0  and workExpw.parent_id='7724a25f-a781-46f4-b048-d9812108ff02'
-			left join sys_data_dictionary eduw on r.education_=eduw.value_ and eduw.del_flag=0  and eduw.parent_id='c1887d9d-e945-4875-be3f-905195cd8a8e'
-			left join sys_data_dictionary sexw on r.sex_=sexw.value_ and sexw.del_flag=0  and sexw.parent_id='0c3194dc-884d-4ea9-9966-dfb94f537f5c'
-			left join sys_data_dictionary jobstaw on ju.job_status=jobstaw.value_ and jobstaw.del_flag=0  and jobstaw.parent_id='e03f43d0-46f8-4696-a6f2-331d353dccd8'
-			left join sys_data_dictionary drmoneyw on r.dream_money=drmoneyw.value_ and drmoneyw.del_flag=0  and drmoneyw.parent_id='b5e4a52a-9f89-4e3b-976f-79207a40587d'
+			left join sys_data_dictionary workExpw on r.work_exp=workExpw.id_ and workExpw.del_flag=0  
+			left join sys_data_dictionary eduw on r.education_=eduw.id_ and eduw.del_flag=0 
+			left join sys_data_dictionary sexw on r.sex_=sexw.id_ and sexw.del_flag=0  
+			left join sys_data_dictionary jobstaw on r.job_status=jobstaw.id_ and jobstaw.del_flag=0  
+			left join sys_data_dictionary drmoneyw on r.dream_money=drmoneyw.id_ and drmoneyw.del_flag=0  
 			) tab
 		]]>
 		<where>
 			<if test="1==1">
 				and del_flag=0 and hrId = #{searchParams.recruiterId}
 			</if>
-			<if test="searchParams.positionName != null">
+			<if test="searchParams.positionName != null and searchParams.positionName !=''">
 				and positionCategoryName like #{searchParams.positionName}
 			</if>
+			<if test="searchParams.positionId != null and searchParams.positionId !=''">
+				and position_category_id in (select id_ from job_work_category  where instr(code_,#{searchParams.positionId})>0)
+			</if>
+			<if test="searchParams.education != null and searchParams.education != ''">
+				and education_ = #{searchParams.education}
+			</if>
+			<if test="searchParams.workExp != null and searchParams.workExp !='' ">
+				and work_exp = #{searchParams.workExp}
+			</if>
+			
+			<if test="searchParams.dreamMoney != null and searchParams.dreamMoney !=''">
+				and dream_money = #{searchParams.dreamMoney}
+			</if>
+			<if test="searchParams.jobStatus != null and searchParams.jobStatus != ''">
+				and job_status = #{searchParams.jobStatus}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 			${sort.name} ${sort.order}
 		</foreach>
 	</select>
+	
+	<!-- 用于移动端接口:招聘方【收藏简历】 取消收藏 -->
+	<update id="updateCancelCollect">
+		update job_recruitment_collection  set del_flag=1,update_time=now(),update_by=#{hrId} where resume_id=#{resumeId} and sys_user_id=#{hrId}
+	</update>
 
 	<!--用于移动端接口:招聘方【招聘主页】-->
 	<select id="pagedLoadAllResumes" parameterType="hashMap" resultType="Map">
 		<![CDATA[
 			select  * from (select
-			ju.real_name  realName,
-			ju.head_image_url headImage,
-			ju.address_ address,
-			year(now())-year(ju.birthday_)  age,
-			w.name_ positionCategoryName,
-			workExpw.name_   workExp,
-			eduw.name_  eduName,
-			sexw.name_   sex,
-			jobstaw.name_   jobStatus,
-			drmoneyw.name_  dreamMoney,
-			r.id_ as resumeId,
-			r.del_flag,
-			r.update_time,
-			rede.chat_status,
-			rerd.browse_count
+				ju.real_name  realName,
+				ju.head_image_url headImage,
+				ju.address_ address,
+				year(now())-year(ju.birthday_)  age,
+				w.name_ positionCategoryName,
+				workExpw.name_   workExp,
+				eduw.name_  eduName,
+				sexw.name_   sex,
+				jobstaw.name_   jobStatus,
+				drmoneyw.name_  dreamMoney,
+				r.id_ as resumeId,
+				r.del_flag,
+				r.update_time,
+				rede.chat_status,
+				rerd.browse_count,
+				r.education_,
+				r.work_exp,
+				r.dream_money,
+				r.job_status,
+				r.position_category_id
 			from job_resume  r
 			inner join job_jobuser ju on r.job_user_id=ju.id_ and ju.del_flag=0
 			left join job_resume_deliver rede on r.id_=rede.job_resume_id and rede.del_flag=0
 			left join job_work_category w on r.position_category_id=w.id_ and w.del_flag=0
-			left join sys_data_dictionary workExpw on r.work_exp=workExpw.value_ and workExpw.del_flag=0  and workExpw.parent_id='7724a25f-a781-46f4-b048-d9812108ff02'
-			left join sys_data_dictionary eduw on r.education_=eduw.value_ and eduw.del_flag=0  and eduw.parent_id='c1887d9d-e945-4875-be3f-905195cd8a8e'
-			left join sys_data_dictionary sexw on r.sex_=sexw.value_ and sexw.del_flag=0  and sexw.parent_id='0c3194dc-884d-4ea9-9966-dfb94f537f5c'
-			left join sys_data_dictionary jobstaw on ju.job_status=jobstaw.value_ and jobstaw.del_flag=0  and jobstaw.parent_id='e03f43d0-46f8-4696-a6f2-331d353dccd8'
-			left join sys_data_dictionary drmoneyw on r.dream_money=drmoneyw.value_ and drmoneyw.del_flag=0  and drmoneyw.parent_id='b5e4a52a-9f89-4e3b-976f-79207a40587d'
+			left join sys_data_dictionary workExpw on r.work_exp=workExpw.id_ and workExpw.del_flag=0  
+			left join sys_data_dictionary eduw on r.education_=eduw.id_ and eduw.del_flag=0  
+			left join sys_data_dictionary sexw on r.sex_=sexw.id_ and sexw.del_flag=0  
+			left join sys_data_dictionary jobstaw on r.job_status=jobstaw.id_ and jobstaw.del_flag=0
+			left join sys_data_dictionary drmoneyw on r.dream_money=drmoneyw.id_ and drmoneyw.del_flag=0 
 			left join (select count(1) browse_count,job_resume_id from job_user_browse_hr where del_flag=0 group by job_resume_id) rerd  on r.id_=rerd.job_resume_id
 			) tab
 		]]>
@@ -192,9 +223,25 @@ id_,create_by,create_time,update_by,update_time,del_flag,company_id,sys_user_id,
 			<if test="1==1">
 				<![CDATA[ and del_flag=0  and (chat_status is null or chat_status <>'5') ]]>  <!--非已入职的简历sys_data_dictionary where parent_id=5e048b6d-cb1d-4fd5-bc70-c94259960862-->
 			</if>
-			<if test="searchParams.positionName != null">
+			<if test="searchParams.positionName != null and searchParams.positionName !=''">
 				and positionCategoryName like #{searchParams.positionName}
 			</if>
+			<if test="searchParams.positionId != null and searchParams.positionId !=''">
+				and position_category_id in (select id_ from job_work_category  where instr(code_,#{searchParams.positionId})>0)
+			</if>
+			<if test="searchParams.education != null and searchParams.education != ''">
+				and education_ = #{searchParams.education}
+			</if>
+			<if test="searchParams.workExp != null and searchParams.workExp !='' ">
+				and work_exp = #{searchParams.workExp}
+			</if>
+			
+			<if test="searchParams.dreamMoney != null and searchParams.dreamMoney !=''">
+				and dream_money = #{searchParams.dreamMoney}
+			</if>
+			<if test="searchParams.jobStatus != null and searchParams.jobStatus != ''">
+				and job_status = #{searchParams.jobStatus}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 			${sort.name} ${sort.order}

+ 42 - 0
common/src/main/resources/mapper/job/Resume.xml

@@ -169,4 +169,46 @@
 		and del_flag = 0
 		limit 1
 	</select>
+
+	<!--用于移动端接口:招聘方【求职管理】-->
+	<select id="foundJobManagement" parameterType="hashmap" resultType="map">
+		<![CDATA[
+			SELECT DISTINCT
+			  jwc.name_ workName,
+			  sdda.name_ dreamMoney,
+			  sddb.name_ jobStatus,
+			  sddc.name_ sex,
+			  year(now())-year(jre.birthday_)  age,
+			  sddd.name_ workExp,
+			  sdde.name_ education,
+			  jj.head_image_url headImage,
+			  jj.real_name name,
+			  jre.dream_add dreamAdd,
+			  jre.approve_status approveStatus,
+              su.id_ sysUserId
+			FROM
+			  job_resume jre
+			LEFT JOIN job_work_category jwc ON jre.position_category_id = jwc.id_
+			LEFT JOIN sys_data_dictionary sdda ON jre.dream_money = sdda.id_
+			LEFT JOIN sys_data_dictionary sddb ON jre.job_status = sddb.id_
+			LEFT JOIN sys_data_dictionary sddc ON jre.sex_ = sddc.id_
+			LEFT JOIN sys_data_dictionary sddd ON jre.work_exp = sddd.id_
+			LEFT JOIN sys_data_dictionary sdde ON jre.education_ = sdde.id_
+			LEFT JOIN job_jobuser jj ON jre.job_user_id = jj.id_
+			LEFT JOIN job_resume_deliver jrd ON jre.id_ = jrd.job_resume_id
+			LEFT JOIN job_recruitment jr ON jrd.job_recruitment_id = jr.id_
+			INNER JOIN sys_user su ON jr.company_id = su.company_id
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and su.id = #{searchParams.id}
+			</if>
+			<if test="searchParams.type != null">
+				and jre.approve_status = #{searchParams.type}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+			${sort.name} ${sort.order}
+		</foreach>
+	</select>
 </mapper>

+ 2 - 0
common/src/main/resources/mapper/job/UserBrowse.xml

@@ -124,6 +124,7 @@
 			select
 			p.logo_  companyLogo,
 			p.area_  companyBelongArea,
+			bcity.city_name cityName,
 			pd.name_ companyScale,
 			p.name_  companyName,
 			waged.name_ wageTypeName,
@@ -138,6 +139,7 @@
 			left join sys_data_dictionary waged on j.wage_type=waged.id_ and waged.del_flag=0
 			left join base_company p on j.company_id=p.id_ and p.del_flag=0
 			left join sys_data_dictionary  pd on p.scale_=pd.id_ and pd.del_flag=0
+				left join base_city  as bcity on bcity.id_=j.area_
 		]]>
 		<where>
 			and job_user_id = #{searchParams.jobUserId}

+ 2 - 0
common/src/main/resources/mapper/job/UserCollection.xml

@@ -138,6 +138,7 @@
 			select
 			p.logo_  companyLogo,
 			p.area_  companyBelongArea,
+			bcity.city_name cityName,
 			pd.name_ companyScale,
 			p.name_  companyName,
 			waged.name_ wageTypeName,
@@ -152,6 +153,7 @@
 			left join sys_data_dictionary waged on j.wage_type=waged.id_ and waged.del_flag=0
 			left join base_company p on j.company_id=p.id_ and p.del_flag=0
 			left join sys_data_dictionary  pd on p.scale_=pd.id_ and pd.del_flag=0
+			left join base_city  as bcity on bcity.id_=j.area_
 		]]>
 		<where>
 			and job_user_id = #{searchParams.jobUserId}

+ 199 - 0
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/MessageNoticeApiController.java

@@ -0,0 +1,199 @@
+package com.jpsoft.employment.modules.mobile.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.Page;
+import com.jpsoft.employment.config.OSSConfig;
+import com.jpsoft.employment.modules.base.entity.MessageNotice;
+import com.jpsoft.employment.modules.base.entity.UserAuthenticationApprove;
+import com.jpsoft.employment.modules.base.service.MessageNoticeService;
+import com.jpsoft.employment.modules.base.service.UserAuthenticationApproveService;
+import com.jpsoft.employment.modules.common.dto.MessageResult;
+import com.jpsoft.employment.modules.common.dto.Sort;
+import com.jpsoft.employment.modules.common.utils.*;
+import com.jpsoft.employment.modules.job.entity.JobUser;
+import com.jpsoft.employment.modules.job.service.JobUserService;
+import com.jpsoft.employment.modules.job.service.ResumeDeliverService;
+import com.jpsoft.employment.modules.job.service.ResumeService;
+import com.jpsoft.employment.modules.job.service.UserCollectionService;
+import com.jpsoft.employment.modules.sys.entity.DataDictionary;
+import com.jpsoft.employment.modules.sys.entity.SysLog;
+import com.jpsoft.employment.modules.sys.entity.User;
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
+import com.jpsoft.employment.modules.sys.service.SysLogService;
+import com.jpsoft.employment.modules.sys.service.UserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.joda.time.DateTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import sun.misc.BASE64Decoder;
+
+import java.io.ByteArrayInputStream;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+@RestController
+@RequestMapping("/mobile/messageApi")
+@Api(description = "消息通知接口")
+@Slf4j
+public class MessageNoticeApiController {
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private JobUserService jobUserService;
+
+    @Autowired
+    private ValueOperations<String, Object> valueOperations;
+
+    @Autowired
+    private OSSConfig ossConfig;
+
+    @Autowired
+    private SysLogService sysLogService;
+
+    @Autowired
+    private MessageNoticeService messageNoticeService;
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+
+    @Autowired
+    private UserService userService;
+
+
+    @PostMapping("messageClassify")
+    @ApiOperation(value = "消息分类")
+    public MessageResult<List> messageClassify(
+            String token,
+            @RequestAttribute  String subject) {
+        MessageResult<List> messageResult = new MessageResult<>();
+        List<Map> resultList = new ArrayList<>();
+        try {
+            JobUser jobUser = jobUserService.get(subject);
+
+            if (jobUser == null) {
+                throw new Exception("未登录!");
+            }
+            List<DataDictionary> ddList = dataDictionaryService.findByCatalogName("消息分类");
+
+            for(DataDictionary dd :ddList){
+                Map<String, Object> mnMap = new HashMap<>();
+                MessageNotice mn = messageNoticeService.findTopByUserIdAndClassify(subject,dd.getValue());
+                mnMap.put("classify",dd.getName());
+                mnMap.put("classifyId",dd.getValue());
+                mnMap.put("newMessage",mn);
+                mnMap.put("num",0);
+
+                resultList.add(mnMap);
+            }
+
+            messageResult.setData(resultList);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage());
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+    @PostMapping("messageList")
+    @ApiOperation(value = "消息列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "classifyId", value = "消息分类ID", required = true, paramType = "query"),
+            @ApiImplicitParam(name = "pageIndex", value = "不传默认1", required = false, paramType = "query"),
+            @ApiImplicitParam(name = "pageSize", value = "不传默认5", required = false, paramType = "query"),
+    })
+    public MessageResult<Map> messageList(
+            String classifyId,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="5") int pageSize,
+            String token,
+            @RequestAttribute  String subject) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+            JobUser jobUser = jobUserService.get(subject);
+
+            if (jobUser == null) {
+                throw new Exception("未登录!");
+            }
+
+            List<Sort> sortList = new ArrayList<>();
+            sortList.add(new Sort("a.create_time","asc"));
+
+            Map<String,Object> searchParams = new HashMap<>();
+            //List<MessageNotice> mnList = messageNoticeService.findByUserIdAndClassify(subject,classifyId);
+
+            searchParams.put("recipientIdAndNull",subject);
+            searchParams.put("classify",classifyId);
+            searchParams.put("status","1");
+            searchParams.put("type","1");
+
+            Page<MessageNotice> page = messageNoticeService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+            messageResult.setData(PojoUtils.pageWrapper(page));
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage());
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+    @PostMapping("messageDetail")
+    @ApiOperation(value = "消息详细")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "messageId", value = "消息ID", required = true, paramType = "query"),
+    })
+    public MessageResult<MessageNotice> messageDetail(
+            String messageId,
+            String token,
+            @RequestAttribute  String subject) {
+        MessageResult<MessageNotice> messageResult = new MessageResult<>();
+
+        try {
+            JobUser jobUser = jobUserService.get(subject);
+
+            if (jobUser == null) {
+                throw new Exception("未登录!");
+            }
+
+            MessageNotice mc = messageNoticeService.get(messageId);
+            if(mc == null){
+                throw new Exception("查询错误!");
+            }
+
+            User createUser = userService.get(mc.getCreateBy());
+            mc.setCreateByN(createUser.getRealName());
+
+            messageResult.setData(mc);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage());
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+}

+ 118 - 21
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RecruiterApiController.java

@@ -6,8 +6,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestAttribute;
@@ -18,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
 import com.github.pagehelper.Page;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.dto.MessageResultBuilder;
+import com.jpsoft.employment.modules.common.dto.MessageResultSimple;
 import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.common.utils.MapUtils;
 import com.jpsoft.employment.modules.common.utils.PojoUtils;
@@ -25,6 +24,7 @@ import com.jpsoft.employment.modules.job.entity.RecruitmentVO;
 import com.jpsoft.employment.modules.job.service.JobUserService;
 import com.jpsoft.employment.modules.job.service.RecruitmentCollectionService;
 import com.jpsoft.employment.modules.job.service.RecruitmentService;
+import com.jpsoft.employment.modules.job.service.ResumeService;
 import com.jpsoft.employment.modules.job.service.UserBrowseHrService;
 import com.jpsoft.employment.modules.sys.entity.UserVO;
 import com.jpsoft.employment.modules.sys.service.UserService;
@@ -43,8 +43,7 @@ import lombok.extern.slf4j.Slf4j;
 @Api(tags = "移动端接口:招聘方相关接口")
 public class RecruiterApiController {
 
-    private Logger logger = LoggerFactory.getLogger(getClass());
-
+   
     @Autowired
     private RecruitmentService recruitmentService;
 
@@ -60,6 +59,9 @@ public class RecruiterApiController {
     @Autowired
     private JobUserService jobUserService;
 
+    @Autowired
+    private ResumeService resumeService;
+
 
     @PostMapping("getAboutMe")
     @ApiOperation(value = "招聘方['我的'主页]")
@@ -90,7 +92,7 @@ public class RecruiterApiController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "status", value = "招聘信息状态(publish:招聘中;approve:审核中;close:已下架)", required = true, paramType = "form")
     })
-    public MessageResult<Map<String,Object>> loadOwnRecruitments(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+    public MessageResultSimple loadOwnRecruitments(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
                                                 @RequestParam(value="pageSize",defaultValue="20") int pageSize,
                                                 @RequestParam(value="status",defaultValue="publish") String status,
                                                 @RequestAttribute String subject
@@ -100,11 +102,33 @@ public class RecruiterApiController {
             List<Sort> sortList = new ArrayList<>();
             sortList.add(new Sort("updateTime","desc"));
             Page<RecruitmentVO> page = recruitmentService.loadForRecruiter(MapUtils.builder("recruiter",subject,"status",status),pageIndex,pageSize,true,sortList);
-            return MessageResultBuilder.ok(PojoUtils.pageWrapper(page));
+            return MessageResultBuilder.success(PojoUtils.pageWrapper(page));
         }
         catch(Exception ex){
             log.error(ex.getMessage());
-            return MessageResultBuilder.error(ex.getMessage());
+            return MessageResultBuilder.failed(ex.getMessage());
+        }
+    }
+    
+    @PostMapping("publishRecruitment")
+    @ApiOperation(value = "招聘方[职位管理上下架操作]")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "recruitmentId", value = "招聘记录ID", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "publishTag", value = "上下架操作[1:上架,0:下架]", required = true, paramType = "form")
+    })
+    public MessageResultSimple publishRecruitment(@RequestParam(value="recruitmentId",required = true) String recruitmentId,
+    		@RequestParam(value="publishTag",required = true) String publishTag,
+    		@RequestAttribute String subject
+    		){
+    	try{
+    		 Assert.state(StringUtils.isNotEmpty(recruitmentId),"缺少招聘记录参数");
+    		 Assert.state("1".equals(publishTag)||"0".equals(publishTag),"未选择上下架操作");
+    		 
+    		 return recruitmentService.updateForPublish(recruitmentId, publishTag,subject)?MessageResultBuilder.success("success"): MessageResultBuilder.failed("操作失败");
+    	}
+    	catch(Exception ex){
+            log.error(ex.getMessage());
+            return MessageResultBuilder.failed(ex.getMessage());
         }
     }
 
@@ -112,11 +136,21 @@ public class RecruiterApiController {
     @PostMapping("loadCollectResumes")
     @ApiOperation(value = "招聘方[收藏简历]")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "positionName", value = "职位名称关键字", required = false, paramType = "form")
+            @ApiImplicitParam(name = "positionName", value = "职位名称关键字", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "positionId", value = "职位类别id值", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "education", value = "学历编码值", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "workExp", value = "工作经验编码值", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "dreamMoney", value = "期望月薪编码值", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "jobStatus", value = "工作状态编码值", required = false, paramType = "form")
     })
-    public MessageResult<Map> loadCollectResumes(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+    public MessageResultSimple loadCollectResumes(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
                                                 @RequestParam(value="pageSize",defaultValue="20") int pageSize,
                                                 @RequestParam(value="positionName",required = false) String positionName,
+                                                @RequestParam(value="positionId",required = false) String positionId,
+                                                @RequestParam(value="education",required = false) String education,
+                                                @RequestParam(value="workExp",required = false) String workExp,
+                                                @RequestParam(value="dreamMoney",required = false) String dreamMoney,
+                                                @RequestParam(value="jobStatus",required = false) String jobStatus,
                                                 @RequestAttribute String subject
     ) {
 
@@ -124,13 +158,32 @@ public class RecruiterApiController {
             List<Sort> sortList = new ArrayList<>();
             sortList.add(new Sort("collectionTime","desc"));
             positionName=StringUtils.isEmpty(positionName)?null:("%"+positionName+"%");
-            Page<Map<String,Object>> page = recruitmentCollectionService.pagedLoadCollectResumes(MapUtils.builder("recruiterId",subject,"positionName",positionName),pageIndex,pageSize,true,sortList);
-            return MessageResultBuilder.ok(PojoUtils.pageWrapper(page));
+            Map<String,Object> args=MapUtils.builder("recruiterId",subject,"positionId",positionId,"positionName",positionName,"education",education,"workExp",workExp,"dreamMoney",dreamMoney,"jobStatus",jobStatus);
+            Page<Map<String,Object>> page = recruitmentCollectionService.pagedLoadCollectResumes(args,pageIndex,pageSize,true,sortList);
+            return MessageResultBuilder.success(PojoUtils.pageWrapper(page));
         }
         catch(Exception ex){
             log.error(ex.getMessage());
-            return MessageResultBuilder.error(ex.getMessage());
+            return MessageResultBuilder.failed(ex.getMessage());
+        }
+    }
+    
+    @PostMapping("cancelCollectResume")
+    @ApiOperation(value = "招聘方[收藏简历] 取消收藏")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resumeId", value = "简历记录主键", required = true, paramType = "form")
+    })
+    public MessageResultSimple cancelCollectResume(@RequestParam(value="resumeId",required = true) String resumeId, @RequestAttribute String subject) {
+    	try{
+    		Assert.state(StringUtils.isNoneEmpty(subject),"缺少登录信息");
+    		recruitmentCollectionService.updateCancelCollect(resumeId,subject);
+    		return MessageResultBuilder.success("success");
+    	}
+        catch(Exception ex){
+            log.error(ex.getMessage());
+            return MessageResultBuilder.failed(ex.getMessage());
         }
+    
     }
 
 
@@ -138,12 +191,22 @@ public class RecruiterApiController {
     @ApiOperation(value = "招聘方[招聘主页]")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "positionName", value = "职位名称关键字", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "positionId", value = "职位类别id值", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "education", value = "学历编码值", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "workExp", value = "工作经验编码值", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "dreamMoney", value = "期望月薪编码值", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "jobStatus", value = "工作状态编码值", required = false, paramType = "form"),
             @ApiImplicitParam(name = "orderType", value = "排序类别[new:最新,hot:最热]", required = false, paramType = "form")
     })
-    public MessageResult<Map> loadAllResumes(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+    public MessageResultSimple loadAllResumes(@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
                                                  @RequestParam(value="pageSize",defaultValue="20") int pageSize,
                                                  @RequestParam(value="orderType",defaultValue="new") String orderType,
-                                                 @RequestParam(value="positionName",required = false) String positionName
+                                                 @RequestParam(value="positionName",required = false) String positionName,
+                                                 @RequestParam(value="positionId",required = false) String positionId,
+                                                 @RequestParam(value="education",required = false) String education,
+                                                 @RequestParam(value="workExp",required = false) String workExp,
+                                                 @RequestParam(value="dreamMoney",required = false) String dreamMoney,
+                                                 @RequestParam(value="jobStatus",required = false) String jobStatus
     ) {
 
         try{
@@ -155,20 +218,20 @@ public class RecruiterApiController {
                 sortList.add(new Sort("update_time","desc"));
             }
             positionName=StringUtils.isEmpty(positionName)?null:("%"+positionName+"%");
-            Page<Map<String,Object>> page = recruitmentCollectionService.pagedLoadAllResumes(MapUtils.builder("positionName",positionName),pageIndex,pageSize,true,sortList);
-            return MessageResultBuilder.ok(PojoUtils.pageWrapper(page));
+            Map<String,Object> args=MapUtils.builder("positionId",positionId,"positionName",positionName,"education",education,"workExp",workExp,"dreamMoney",dreamMoney,"jobStatus",jobStatus);
+            
+            Page<Map<String,Object>> page = recruitmentCollectionService.pagedLoadAllResumes(args,pageIndex,pageSize,true,sortList);
+            return MessageResultBuilder.success(PojoUtils.pageWrapper(page));
         }
         catch(Exception ex){
             log.error(ex.getMessage());
-            return MessageResultBuilder.error(ex.getMessage());
+            return MessageResultBuilder.failed(ex.getMessage());
         }
     }
 
+
     @PostMapping("loadInterestList")
     @ApiOperation(value = "招聘方[对您感兴趣]")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "id", required = false, paramType = "form")
-    })
     public MessageResult<Map> loadInterestList(
             String id,String token,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
@@ -181,7 +244,7 @@ public class RecruiterApiController {
         Map<String,Object> searchParams = new HashMap<>();
 
         List<Sort> sortList = new ArrayList<>();
-        sortList.add(new Sort("jre.create_time","desc"));
+        sortList.add(new Sort("jub.create_time","desc"));
 
         if (StringUtils.isNotEmpty(id)) {
             searchParams.put("id","%" + id + "%");
@@ -194,4 +257,38 @@ public class RecruiterApiController {
 
         return msgResult;
     }
+
+    @PostMapping("loadJobManagement")
+    @ApiOperation(value = "招聘方[求职管理]")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型(1:已投递,2:邀沟通,3:邀面试,4:邀入职,5:已入职,6:不合适)", required = false, paramType = "query")
+    })
+    public MessageResult<Map> loadJobManagement(
+            String id,String token,String type,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute  String subject) {
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("jrd.create_time","desc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        searchParams.put("type",type);
+
+        Page<Map> page = resumeService.foundJobManagement(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
 }