Browse Source

移动端求职接口修改

wkyy 4 years ago
parent
commit
2c129a560d

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/LabourServicesDAO.java

@@ -7,6 +7,7 @@ import org.springframework.stereotype.Repository;
 import java.util.Map;
 import com.jpsoft.employment.modules.common.dto.Sort;
 
+
 @Repository
 public interface LabourServicesDAO {
 	int insert(LabourServices entity);

+ 3 - 0
common/src/main/resources/mapper/base/LabourServices.xml

@@ -118,6 +118,9 @@
                   and approve_time <= #{searchParams.endTime}
                 ]]>
 			</if>
+			<if test="searchParams.type != null">
+				and type_ = #{searchParams.type}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 35 - 0
common/src/main/resources/mapper/job/Recruitment.xml

@@ -303,4 +303,39 @@ id_,company_id,title_,area_,address_,position_,position_message,requirements_,po
 	<select id="rptMyRecruitmentCount" parameterType="String" resultType="Map">
 		select count(1) recCount,sum(reading_times) readTimes from job_recruitment where create_by=#{0} and status_='open'
 	</select>
+
+	<!--招聘方职位管理-->
+	<select id="loadForRecruiter" parameterType="hashMap" resultType="RecruitmentVOMap">
+		<![CDATA[
+			SELECT
+				jr.*,
+				jwc.name_  position_name
+			FROM
+				job_recruitment jr
+			INNER JOIN job_work_category  jwc ON jr.position_ = jwc.id_
+			where jr.del_flag=0  and jwc.del_flag=0
+		]]>
+		<where>
+			<if test="searchParams.recruiter != null"> <!--按创建人(招聘人)过滤-->
+				and jr.create_by=#{searchParams.recruiter}
+			</if>
+	        <if test='searchParams.status =="publish"'> <!--按招聘状态过滤publish:已发布且审核完;approve:审核中;close:关闭下架-->
+				and jr.status_='open'  and jr.approve_status='94905388-a409-4096-a842-5128823250c5'
+			</if>
+	        <if test='searchParams.status =="approve"'>
+				and jr.status_='open' and jr.approve_status='eeba3cbf-80b3-4db9-a9e6-695f00c087b5'
+			</if>
+	        <if test='searchParams.status =="close"'>
+				and jr.status_='close'
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+			${sort.name} ${sort.order}
+		</foreach>
+	</select>
+
+	<!--招聘方个人中心主页:统计已发布的招聘,被浏览量(不包含已撤销的(已关闭的))-->
+	<select id="rptMyRecruitmentCount" parameterType="String" resultType="Map">
+		select count(1) recCount,sum(reading_times) readTimes from job_recruitment where create_by=#{0} and status_='open'
+	</select>
 </mapper>

+ 8 - 0
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/LabourApiController.java

@@ -2,14 +2,18 @@ package com.jpsoft.employment.modules.mobile.controller;
 
 import com.github.pagehelper.Page;
 import com.jpsoft.employment.modules.base.entity.LabourServices;
+import com.jpsoft.employment.modules.base.service.CompanyService;
 import com.jpsoft.employment.modules.base.service.LabourServicesService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 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.sys.entity.User;
 import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
 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;
@@ -36,6 +40,9 @@ public class LabourApiController {
     @Autowired
     private UserService userService;
 
+    @Autowired
+    private CompanyService companyService;
+
     @PostMapping("getLabourList")
     @ApiOperation(value = "劳务对接列表")
     public MessageResult<Map> getLabourList(
@@ -74,6 +81,7 @@ public class LabourApiController {
             searchParams.put("endTime", endTime);
         }
 
+
         Page<LabourServices> page = labourServicesService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
 
         for (LabourServices labourServices:page) {

+ 6 - 6
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RecruitmentApiController.java

@@ -96,8 +96,8 @@ public class RecruitmentApiController {
             searchParams.put("recruitmentPosition", recruitmentPosition+"%");
         }
 
-        searchParams.put("status", 3);
-        searchParams.put("approveStatus", "open");
+        searchParams.put("status", 1);
+        searchParams.put("approveStatus", 3);
 
         Page<Map> page = recruitmentService.foundPageList(searchParams,pageIndex,pageSize,true,sortList);
 
@@ -180,8 +180,8 @@ public class RecruitmentApiController {
         searchParams.put("relevantTitle", "%"+relevantTitle+"%");
         searchParams.put("notrelevantId", id);
 
-        searchParams.put("status", 3);
-        searchParams.put("approveStatus", "open");
+        searchParams.put("status", 1);
+        searchParams.put("approveStatus", 3);
 
         Page<Map> page = recruitmentService.foundPageList(searchParams,1,5,true,sortList);
 
@@ -209,8 +209,8 @@ public class RecruitmentApiController {
             searchParams.put("id", "%"+id+"%");
         }
 
-        searchParams.put("status", 3);
-        searchParams.put("approveStatus", "open");
+        searchParams.put("status", 1);
+        searchParams.put("approveStatus", 3);
 
         Page<Map> page = recruitmentService.foundPageList(searchParams,1,20,true,sortList);