Pārlūkot izejas kodu

Merge branch 'master' of
http://47.92.161.104:10080/shuzhan/jp-employment-server.git

Conflicts:
common/src/main/resources/mapper/job/RecruitmentCollection.xml
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RecruiterApiController.java

chenwen 3 gadi atpakaļ
vecāks
revīzija
f3ceba4314

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

@@ -18,4 +18,5 @@ public interface JobUserDAO {
 	int delete(String id);
 	List<JobUser> list();
 	List<JobUser> search(Map<String, Object> searchParams, List<Sort> sortList);
+	List<Map> foundInterestList(Map<String, Object> searchParams, List<Sort> sortList);
 }

+ 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);
 }

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

@@ -17,4 +17,5 @@ public interface JobUserService {
 	JobUser findByPhone(String phone);
 	List<JobUser> list();
 	Page<JobUser> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+	Page<Map> foundInterestList(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList);
 }

+ 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);
 }

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

@@ -78,4 +78,13 @@ public class JobUserServiceImpl implements JobUserService {
         
         return page;
 	}
+
+	@Override
+	public Page<Map> foundInterestList(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+		Page<Map> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+			jobUserDAO.foundInterestList(searchParams,sortList);
+		});
+
+		return page;
+	}
 }

+ 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;
+	}
 }

+ 31 - 0
common/src/main/resources/mapper/job/JobUser.xml

@@ -151,4 +151,35 @@
 	        ${sort.name} ${sort.order}
 	 	</foreach>
 	</select>
+
+	<!--用于移动端接口:招聘方【对您感兴趣】-->
+	<select id="foundInterestList" parameterType="hashmap" resultType="map">
+		<![CDATA[
+			SELECT
+				jj.id_ jobUserId,
+				jj.real_name,
+				jj.head_image_url,
+			    jre.id_ id
+			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_
+				)
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and su.id_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+			${sort.name} ${sort.order}
+		</foreach>
+	</select>
 </mapper>

+ 1 - 0
common/src/main/resources/mapper/job/RecruitmentCollection.xml

@@ -176,6 +176,7 @@ id_,create_by,create_time,update_by,update_time,del_flag,company_id,sys_user_id,
 			sexw.name_   sex,
 			jobstaw.name_   jobStatus,
 			drmoneyw.name_  dreamMoney,
+			r.id_ as resumeId,
 			r.del_flag,
 			r.update_time,
 			rede.chat_status,

+ 78 - 23
common/src/main/resources/mapper/job/Resume.xml

@@ -5,25 +5,29 @@
 <mapper namespace="com.jpsoft.employment.modules.job.dao.ResumeDAO">
 	<resultMap id="ResumeMap" type="com.jpsoft.employment.modules.job.entity.Resume">
 		<id property="id" column="id_" />
-			<result property="createBy" column="create_by" />
-			<result property="createTime" column="create_time" />
-			<result property="updateBy" column="update_by" />
-			<result property="updateTime" column="update_time" />
-			<result property="delFlag" column="del_flag" />
-			<result property="jobUserId" column="job_user_id" />
-			<result property="sex" column="sex_" />
-			<result property="positionCategoryId" column="position_category_id" />
-			<result property="workExp" column="work_exp" />
-			<result property="education" column="education_" />
-			<result property="dreamMoney" column="dream_money" />
-			<result property="dreamAdd" column="dream_add" />
-			<result property="birthday" column="birthday_" />
-			<result property="introduction" column="introduction_" />
-			<result property="status" column="status_" />
-			<result property="approveStatus" column="approve_status" />
-			<result property="jobStatus" column="job_status" />
-			<result property="resumeUrls" column="resume_urls" />
-			</resultMap>
+		<result property="createBy" column="create_by" />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy" column="update_by" />
+		<result property="updateTime" column="update_time" />
+		<result property="delFlag" column="del_flag" />
+		<result property="jobUserId" column="job_user_id" />
+		<result property="sex" column="sex_" />
+		<result property="positionCategoryId" column="position_category_id" />
+		<result property="workExp" column="work_exp" />
+		<result property="education" column="education_" />
+		<result property="dreamMoney" column="dream_money" />
+		<result property="dreamAdd" column="dream_add" />
+		<result property="birthday" column="birthday_" />
+		<result property="introduction" column="introduction_" />
+		<result property="status" column="status_" />
+		<result property="approveStatus" column="approve_status" />
+		<result property="jobStatus" column="job_status" />
+		<result property="resumeUrls" column="resume_urls" />
+		<!--外联字段-->
+		<result property="userPhoto" column="head_image_url" />
+		<result property="userName" column="real_name" />
+		<result property="userIsAuthentication" column="is_authentication" />
+	</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.job.entity.Resume">
 	<!--
 	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
@@ -132,12 +136,22 @@
 	</select>
 	<select id="search" parameterType="hashmap" resultMap="ResumeMap">
 		<![CDATA[
-			select * from job_resume
+			SELECT a.*,b.head_image_url,b.real_name,b.is_authentication FROM job_resume a
+			LEFT JOIN job_jobuser b ON a.job_user_id = b.id_
 		]]>
 		<where>
-			del_flag = 0
-			<if test="searchParams.id != null">
-				and ID_ like #{searchParams.id}
+			a.del_flag = 0
+			<if test="searchParams.positionCategoryId != null">
+				and a.position_category_id = #{searchParams.positionCategoryId}
+			</if>
+			<if test="searchParams.approveStatus != null">
+				and a.approve_status = #{searchParams.approveStatus}
+			</if>
+			<if test="searchParams.status != null">
+				and a.status_ = #{searchParams.status}
+			</if>
+			<if test="searchParams.name != null">
+				and b.real_name like #{searchParams.name}
 			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
@@ -151,4 +165,45 @@
 		and del_flag = 0
 		limit 1
 	</select>
+
+	<!--用于移动端接口:招聘方【求职管理】-->
+	<select id="foundJobManagement" parameterType="hashmap" resultType="map">
+		<![CDATA[
+			SELECT
+			  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
+			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_
+			LEFT JOIN sys_user su ON jr.company_id = su.company_id
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and su.id_ like #{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>

+ 1 - 6
web/src/main/java/com/jpsoft/employment/modules/job/controller/RecruitmentController.java

@@ -230,12 +230,7 @@ public class RecruitmentController {
 
             recruitment.setWorkYearName(dataDictionaryService.getName(recruitment.getWorkYear()));
             recruitment.setEducationName(dataDictionaryService.getName(recruitment.getEducation()));
-            if(recruitment.getIsDiscussPersonally()){
-                recruitment.setWageTypeName("面议");
-            }
-            else{
-                recruitment.setWageTypeName(dataDictionaryService.getName(recruitment.getWageType()));
-            }
+            recruitment.setWageTypeName(dataDictionaryService.getName(recruitment.getWageType()));
         }
 
         msgResult.setResult(true);

+ 22 - 13
web/src/main/java/com/jpsoft/employment/modules/job/controller/ResumeController.java

@@ -157,7 +157,7 @@ public class ResumeController {
     @ApiOperation(value="列表")
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
-            String id,
+            String positionCategoryId, String approveStatus, String status, String name,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             HttpServletRequest request){
@@ -166,20 +166,29 @@ public class ResumeController {
         Map<String,Object> searchParams = new HashMap<>();
 
         List<Sort> sortList = new ArrayList<>();
-        sortList.add(new Sort("id_","asc"));
+        sortList.add(new Sort("a.id_","asc"));
 
-        if (StringUtils.isNotEmpty(id)) {
-            searchParams.put("id","%" + id + "%");
+        if (StringUtils.isNotEmpty(positionCategoryId)) {
+            searchParams.put("positionCategoryId",positionCategoryId);
+        }
+        if (StringUtils.isNotEmpty(approveStatus)) {
+            searchParams.put("approveStatus",approveStatus);
+        }
+        if (StringUtils.isNotEmpty(status)) {
+            searchParams.put("status",status);
+        }
+        if (StringUtils.isNotEmpty(name)) {
+            searchParams.put("name","%" + name + "%");
         }
 
         Page<Resume> page = resumeService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
         for(Resume resume : page.getResult()){
-            JobUser jobUser = jobUserService.get(resume.getJobUserId());
-            if(jobUser != null) {
-                resume.setUserPhoto(jobUser.getHeadImageUrl());
-                resume.setUserName(jobUser.getRealName());
-                resume.setUserIsAuthentication(jobUser.getIsAuthentication());
-            }
+//            JobUser jobUser = jobUserService.get(resume.getJobUserId());
+//            if(jobUser != null) {
+//                resume.setUserPhoto(jobUser.getHeadImageUrl());
+//                resume.setUserName(jobUser.getRealName());
+//                resume.setUserIsAuthentication(jobUser.getIsAuthentication());
+//            }
 
             WorkCategory workCategory = workCategoryService.get(resume.getPositionCategoryId());
             if(workCategory != null) resume.setPositionCategoryName(workCategory.getName());
@@ -205,11 +214,11 @@ public class ResumeController {
 
         try {
             Resume resume = resumeService.get(id);
-            if(resume.getStatus().equals("0")) {
-                resume.setStatus("1");
+            if(resume.getStatus().equals("7a308001-f476-411a-8802-28992be86cb1")) {
+                resume.setStatus("89ad69d3-b9e5-4ea3-90bf-04a57fc3c48c");
             }
             else{
-                resume.setStatus("0");
+                resume.setStatus("7a308001-f476-411a-8802-28992be86cb1");
             }
             int affectCount = resumeService.update(resume);
 

+ 76 - 5
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;
@@ -23,8 +21,10 @@ import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.common.utils.MapUtils;
 import com.jpsoft.employment.modules.common.utils.PojoUtils;
 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;
@@ -36,6 +36,7 @@ import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 
+
 @Slf4j
 @RestController
 @RequestMapping("/mobile/recruiterApi")
@@ -55,6 +56,12 @@ public class RecruiterApiController {
     @Autowired
     private UserBrowseHrService  userBrowseHrService;
 
+    @Autowired
+    private JobUserService jobUserService;
+
+    @Autowired
+    private ResumeService resumeService;
+
 
     @PostMapping("getAboutMe")
     @ApiOperation(value = "招聘方['我的'主页]")
@@ -198,7 +205,71 @@ public class RecruiterApiController {
             return MessageResultBuilder.error(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,
+            @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("jre.create_time","desc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<Map> page = jobUserService.foundInterestList(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+    @PostMapping("loadJobManagement")
+    @ApiOperation(value = "招聘方[求职管理]")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", required = true, paramType = "query"),
+            @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;
+    }
+
 }