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

Merge remote-tracking branch 'origin/master'

yanliming 2 лет назад
Родитель
Сommit
bc0c41e9b5

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

@@ -7,6 +7,7 @@ import java.math.BigDecimal;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.data.annotation.Transient;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -71,4 +72,15 @@ public class PersonInfo {
 
 	@ApiModelProperty(value = "年龄")
 	private Integer age;
+
+	@ApiModelProperty(value = "求职意向(1求职中,2已入职")
+	private String intention;
+
+	public String getIntention(){
+		String str = "1";
+		if(StringUtils.isNotEmpty(intention)){
+			str = intention;
+		}
+		return str;
+	}
 }

+ 8 - 0
common/src/main/resources/mapper/base/JobInformationInfo.xml

@@ -164,9 +164,11 @@
 				a.*
 			FROM
 				base_job_information_info a
+				left join base_person_info b on a.person_id = b.id_
 		]]>
 		<where>
 			a.del_flag=false
+			and b.del_flag = false
 			<if test="searchParams.serviceDesc != null">
 				and a.service_desc like #{searchParams.serviceDesc}
 			</if>
@@ -200,6 +202,12 @@
 			<if test="searchParams.status != null">
 				and a.status_ = #{searchParams.status}
 			</if>
+			<if test="searchParams.notIntention != null">
+				<![CDATA[
+				and ( b.intention_ != #{searchParams.notIntention}
+				or b.intention_ is null )
+				]]>
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 			${sort.name} ${sort.order}

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

@@ -21,6 +21,7 @@
 			<result property="updateBy" column="update_by" />
 			<result property="updateTime" column="update_time" />
 			<result property="delFlag" column="del_flag" />
+			<result property="intention" column="intention_" />
 			</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.PersonInfo">
 	<!--
@@ -30,7 +31,9 @@
 	-->
 	<![CDATA[
 		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)
+	    (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_)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -50,6 +53,7 @@
 ,#{updateBy,jdbcType=VARCHAR}
 ,#{updateTime,jdbcType= TIMESTAMP }
 ,#{delFlag,jdbcType= NUMERIC }
+,#{intention,jdbcType=VARCHAR}
 		)
 	]]>
 	</insert>
@@ -107,6 +111,9 @@
 				<if test="delFlag!=null">
 		del_flag=#{delFlag,jdbcType= NUMERIC },
 		</if>
+			<if test="intention!=null">
+				intention_=#{intention,jdbcType=VARCHAR},
+			</if>
 		</set>
 	where id_=#{id}
 	</update>

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

@@ -118,7 +118,7 @@ public class RecruitApiController {
     })
     public MessageResult<Map> findRecruitSearch(
             @RequestParam(value="status",defaultValue="0") String status,
-            @RequestParam(value="statusType",defaultValue="1") String statusType,
+            @RequestParam(value="statusType",defaultValue="") String statusType,
             @RequestParam(value="content",defaultValue="") String content,
             @RequestParam(value="industry",defaultValue="") String industry,
             @RequestParam(value="settlementMethod",defaultValue="") String settlementMethod,
@@ -193,6 +193,7 @@ public class RecruitApiController {
                 }
 
                 searchParams.put("status","1");
+                searchParams.put("notIntention","2");
                 Page<JobInformationInfo> page = jobInformationInfoService.pageSearchMobile(searchParams,pageIndex,pageSize,true,sortList);
                 for (JobInformationInfo jobInformationInfo:page) {
                     PersonInfo personInfo = personInfoService.get(jobInformationInfo.getPersonId());

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

@@ -428,6 +428,38 @@ public class UserApiController {
         return msgResult;
     }
 
+    @ApiOperation(value="修改求职意向(1求职中,2已入职")
+    @RequestMapping(value = "updateIntention",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "intention", value = "求职意向(1求职中,2已入职", required = false, paramType = "form"),
+    })
+    public MessageResult<Map> updateIntention(
+            @RequestParam(value="intention",defaultValue="1") String intention,
+            @RequestAttribute String subject){
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+        try {
+
+            PersonInfo personInfo = personInfoService.get(subject);
+            if (personInfo == null) {
+                throw new Exception("未登录");
+            }
+
+            personInfo.setIntention(intention);
+            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;
+    }
+
 
 
     public static void main(String[] args) {