shuzhan il y a 2 ans
Parent
commit
24386f8234

+ 6 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/JobInformationInfo.java

@@ -135,4 +135,10 @@ public class JobInformationInfo {
 	@ApiModelProperty(value = "是否已读数量")
 	private Integer isReadNumber;
 
+	@Transient
+	@ApiModelProperty(value = "是否匿名")
+	private Boolean isAnonymous = false;
+
+	@ApiModelProperty(value = "简历状态(1公开0隐藏")
+	private String jobStatus;
 }

+ 0 - 1
common/src/main/resources/mapper/base/JobEnterpriseRelation.xml

@@ -14,7 +14,6 @@
 			<result property="delFlag" column="del_flag" />
 			<result property="recruitInformationId" column="recruit_information_id" />
 			<result property="isRead" column="is_read" />
-
 			</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.JobEnterpriseRelation">
 	<!--

+ 21 - 2
common/src/main/resources/mapper/base/JobInformationInfo.xml

@@ -22,6 +22,8 @@
 			<result property="delFlag" column="del_flag" />
 			<result property="browseNumber" column="browse_number" />
 			<result property="address" column="address_" />
+			<result property="isAnonymous" column="is_anonymous" />
+			<result property="jobStatus" column="job_status" />
 			</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.JobInformationInfo">
 	<!--
@@ -33,7 +35,7 @@
 		insert into base_job_information_info
 	    (id_,person_id,photo_,service_desc,Intended_industries,Intended_position,
 	    hope_salary,method_,work_experience,education_,status_,create_by,create_time,
-	    update_by,update_time,del_flag,browse_number,address_)
+	    update_by,update_time,del_flag,browse_number,address_,job_status)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -54,6 +56,7 @@
 ,#{delFlag,jdbcType= NUMERIC }
 ,#{browseNumber,jdbcType= NUMERIC }
 ,#{address,jdbcType=VARCHAR}
+,#{jobStatus,jdbcType=VARCHAR}
 		)
 	]]>
 	</insert>
@@ -114,6 +117,9 @@
 			<if test="address!=null">
 				address_=#{address,jdbcType=VARCHAR},
 			</if>
+			<if test="jobStatus!=null">
+				job_status=#{jobStatus,jdbcType=VARCHAR},
+			</if>
 		</set>
 	where id_=#{id}
 	</update>
@@ -161,7 +167,8 @@
 	<select id="searchMobile" parameterType="hashmap" resultMap="JobInformationInfoMap">
 		<![CDATA[
 			SELECT
-				a.*
+				a.*,
+				b.is_anonymous as is_anonymous
 			FROM
 				base_job_information_info a
 				left join base_person_info b on a.person_id = b.id_
@@ -208,6 +215,18 @@
 				or b.intention_ is null )
 				]]>
 			</if>
+			<if test="searchParams.intention != null">
+				<![CDATA[
+				and ( b.intention_ = #{searchParams.intention}
+				or b.intention_ is null )
+				]]>
+			</if>
+			<if test="searchParams.jobStatus != null">
+				<![CDATA[
+				and ( a.job_status = #{searchParams.jobStatus}
+				or a.job_status is null )
+				]]>
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 			${sort.name} ${sort.order}

+ 3 - 1
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RecruitApiController.java

@@ -194,7 +194,9 @@ public class RecruitApiController {
                 }
 
                 searchParams.put("status","1");
-                searchParams.put("notIntention","2");
+                //searchParams.put("notIntention","2");
+                searchParams.put("intention","1");//只显示公开的
+                searchParams.put("jobStatus","1");//只显示公开的
                 Page<JobInformationInfo> page = jobInformationInfoService.pageSearchMobile(searchParams,pageIndex,pageSize,true,sortList);
                 for (JobInformationInfo jobInformationInfo:page) {
                     PersonInfo personInfo = personInfoService.get(jobInformationInfo.getPersonId());

+ 9 - 0
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/UserApiController.java

@@ -476,10 +476,12 @@ public class UserApiController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "intention", value = "求职意向(1求职中,2已入职", required = false, paramType = "form"),
             @ApiImplicitParam(name = "isAnonymous", value = "是否匿名", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "jobStatus", value = "简历公开状态", required = false, paramType = "form"),
     })
     public MessageResult<Map> updatePerson(
             @RequestParam(value="intention",defaultValue="") String intention,
             @RequestParam(value="isAnonymous",defaultValue="") Boolean isAnonymous,
+            @RequestParam(value="jobStatus",defaultValue="") String jobStatus,
             @RequestAttribute String subject){
 
         MessageResult<Map> msgResult = new MessageResult<>();
@@ -498,6 +500,13 @@ public class UserApiController {
                 personInfo.setIsAnonymous(isAnonymous);
             }
 
+            if(StringUtils.isNotEmpty(jobStatus)){
+                JobInformationInfo jobInformationInfo = jobInformationInfoService.findByPersonId(personInfo.getId());
+                if(jobInformationInfo != null){
+                    jobInformationInfo.setJobStatus(jobStatus);
+                }
+            }
+
             personInfo.setUpdateBy(subject);
             personInfo.setUpdateTime(new Date());
             personInfoService.update(personInfo);