Переглянути джерело

Merge remote-tracking branch 'origin/master'

yanliming 1 рік тому
батько
коміт
07c8218498

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

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

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

@@ -83,4 +83,10 @@ public class PersonInfo {
 		}
 		return str;
 	}
+
+	@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">
 	<!--

+ 17 - 1
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">
 	<!--
@@ -161,7 +163,9 @@
 	<select id="searchMobile" parameterType="hashmap" resultMap="JobInformationInfoMap">
 		<![CDATA[
 			SELECT
-				a.*
+				a.*,
+				b.is_anonymous as is_anonymous,
+				b.job_status as job_status
 			FROM
 				base_job_information_info a
 				left join base_person_info b on a.person_id = b.id_
@@ -208,6 +212,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 ( b.job_status = #{searchParams.jobStatus}
+				or b.job_status is null )
+				]]>
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 			${sort.name} ${sort.order}

+ 11 - 1
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -22,6 +22,8 @@
 			<result property="updateTime" column="update_time" />
 			<result property="delFlag" column="del_flag" />
 			<result property="intention" column="intention_" />
+			<result property="isAnonymous" column="is_anonymous" />
+			<result property="jobStatus" column="job_status" />
 			</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.PersonInfo">
 	<!--
@@ -33,7 +35,7 @@
 		insert into base_person_info
 	    (id_,user_name,password_,real_name,phone_,id_card,open_id,photo_,gender_,age_,
 	    enterprise_id,status_,create_by,create_time,update_by,update_time,del_flag,
-	    intention_)
+	    intention_,is_anonymous,job_status)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -54,6 +56,8 @@
 ,#{updateTime,jdbcType= TIMESTAMP }
 ,#{delFlag,jdbcType= NUMERIC }
 ,#{intention,jdbcType=VARCHAR}
+,#{isAnonymous,jdbcType= NUMERIC }
+,#{jobStatus,jdbcType=VARCHAR}
 		)
 	]]>
 	</insert>
@@ -114,6 +118,12 @@
 			<if test="intention!=null">
 				intention_=#{intention,jdbcType=VARCHAR},
 			</if>
+			<if test="isAnonymous!=null">
+				is_anonymous=#{isAnonymous,jdbcType= NUMERIC },
+			</if>
+			<if test="jobStatus!=null">
+				job_status=#{jobStatus,jdbcType=VARCHAR},
+			</if>
 		</set>
 	where id_=#{id}
 	</update>

+ 9 - 7
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/JobApiController.java

@@ -276,17 +276,19 @@ public class JobApiController {
                 JobEnterpriseRelation jobEnterpriseRelation = jobEnterpriseRelationService.findByEnterpriseIdAndJobInformationId(user.getEnterpriseId(),id);
                 if(jobEnterpriseRelation != null) {
                     isInvite = true;
-                    if("1".equals(isRead)) {
-                        RecruitPersonRelation recruitPersonRelation = recruitPersonRelationService.get(rprId);
-                        if(recruitPersonRelation != null) {
-                            recruitPersonRelation.setIsRead(true);
-                            recruitPersonRelation.setUpdateTime(new Date());
-                            recruitPersonRelationService.update(recruitPersonRelation);
-                        }
+                }
+
+                if("1".equals(isRead)) {
+                    RecruitPersonRelation recruitPersonRelation = recruitPersonRelationService.get(rprId);
+                    if(recruitPersonRelation != null) {
+                        recruitPersonRelation.setIsRead(true);
+                        recruitPersonRelation.setUpdateTime(new Date());
+                        recruitPersonRelationService.update(recruitPersonRelation);
                     }
                 }
             }
 
+
             returnMap.put("jobInformationInfo",jobInformationInfo);
             returnMap.put("personInfo",personInfo);
             returnMap.put("isInvite",isInvite);

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

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

@@ -331,6 +331,9 @@ public class UserApiController {
                     DES3 des3 = new DES3();
                     personInfo.setPassword(des3.encrypt(jwtSecret,"123456"));
                     personInfo.setStatus("0");
+                    personInfo.setIsAnonymous(false);
+                    personInfo.setIntention("1");//求职中
+                    personInfo.setJobStatus("1");//显示简历
 
                     personInfoService.insert(personInfo);
 
@@ -471,6 +474,53 @@ public class UserApiController {
         return msgResult;
     }
 
+    @ApiOperation(value="修改求职意向(1求职中,2已入职")
+    @RequestMapping(value = "updatePerson",method = RequestMethod.POST)
+    @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<>();
+        try {
+
+            PersonInfo personInfo = personInfoService.get(subject);
+            if (personInfo == null) {
+                throw new Exception("未登录");
+            }
+
+            if(StringUtils.isNotEmpty(intention)){
+                personInfo.setIntention(intention);
+            }
+
+            if(isAnonymous != null){
+                personInfo.setIsAnonymous(isAnonymous);
+            }
+
+            if(StringUtils.isNotEmpty(jobStatus)){
+                personInfo.setJobStatus(jobStatus);
+            }
+
+            personInfo.setUpdateBy(subject);
+            personInfo.setUpdateTime(new Date());
+            personInfoService.update(personInfo);
+
+            msgResult.setResult(true);
+        }catch (Exception e){
+            msgResult.setResult(false);
+            msgResult.setMessage(e.getMessage());
+            e.printStackTrace();
+        }
+
+        return msgResult;
+    }
+
 
     @ApiOperation(value="保存登陆记录(免登陆")
     @RequestMapping(value = "saveLoginRecord",method = RequestMethod.POST)