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

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	common/src/main/java/com/jpsoft/employment/modules/base/dao/PersonInfoDAO.java
#	common/src/main/java/com/jpsoft/employment/modules/base/service/PersonInfoService.java
#	common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PersonInfoServiceImpl.java
#	common/src/main/resources/mapper/base/PersonInfo.xml
#	common/src/main/resources/mapper/base/RecruitInformationInfo.xml
yanliming 1 год назад
Родитель
Сommit
a18d96f68a

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

@@ -23,4 +23,5 @@ public interface PersonInfoDAO {
 	PersonInfo findByPhone(String phone);
 	Integer dailyReportList(@Param("searchParams") Map<String, Object> searchParams);
 	Integer dailyPersonReg(@Param("searchParams") Map<String, Object> searchParams);
+	PersonInfo findByEnterpriseId(String enterpriseId);
 }

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

@@ -20,6 +20,7 @@ public interface PersonLoginLogDAO {
 	List<Map> dailyReport(Map<String, Object> searchParams, List<Sort> sortList);
 	Integer dailyReportList(@Param("searchParams") Map<String, Object> searchParams);
 	List<String> totalDailyReportList(@Param("searchParams") Map<String, Object> searchParams);
+	PersonLoginLog findTopByPersonId(String personId);
 	PersonLoginLog lastLogin(String personId);
 
 }

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

@@ -142,4 +142,10 @@ public class JobInformationInfo {
 	@Transient
 	@ApiModelProperty(value = "简历状态(1公开0隐藏")
 	private String jobStatus;
+
+	@Transient
+	@ApiModelProperty(value = "上次登陆时间")
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date lastLoginTime;
 }

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

@@ -110,4 +110,10 @@ public class RecruitInformationInfo {
 	@Transient
 	@ApiModelProperty(value = "未读数量")
 	private Integer isReadNumber;
+
+	@Transient
+	@ApiModelProperty(value = "企业用户上次登陆时间")
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date lastLoginTime;
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/PersonInfoService.java

@@ -21,4 +21,5 @@ public interface PersonInfoService {
 	PersonInfo findByPhone(String phone);
 	Integer dailyReportList(Map<String, Object> searchParams);
 	Integer dailyPersonReg(Map<String, Object> searchParams);
+	PersonInfo findByEnterpriseId(String enterpriseId);
 }

+ 1 - 1
common/src/main/java/com/jpsoft/employment/modules/base/service/PersonLoginLogService.java

@@ -19,5 +19,5 @@ public interface PersonLoginLogService {
 	List<String> totalDailyReportList(Map<String, Object> searchParams);
 	PersonLoginLog lastLogin(String personId);
 
-
+	PersonLoginLog findTopByPersonId(String personId);
 }

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PersonInfoServiceImpl.java

@@ -88,6 +88,11 @@ public class PersonInfoServiceImpl implements PersonInfoService {
 		return personInfoDAO.dailyReportList(searchParams);
 	}
 
+	@Override
+	public PersonInfo findByEnterpriseId(String enterpriseId){
+		return personInfoDAO.findByEnterpriseId(enterpriseId);
+	}
+
 	@Override
 	public Integer dailyPersonReg(Map<String, Object> searchParams){
 		return personInfoDAO.dailyPersonReg(searchParams);

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PersonLoginLogServiceImpl.java

@@ -89,6 +89,11 @@ public class PersonLoginLogServiceImpl implements PersonLoginLogService {
 		return personLoginLogDAO.totalDailyReportList(searchParams);
 	}
 
+	@Override
+	public PersonLoginLog findTopByPersonId(String personId){
+		return personLoginLogDAO.findTopByPersonId(personId);
+	}
+
 	@Override
 	public PersonLoginLog lastLogin(String personId){
 		return personLoginLogDAO.lastLogin(personId);

+ 10 - 0
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -206,4 +206,14 @@
 			]]>
 		</if>
 	</select>
+	<select id="findByEnterpriseId" parameterType="string" resultMap="PersonInfoMap">
+		SELECT
+		*
+		FROM
+		base_person_info
+		WHERE
+		enterprise_id = #{enterpriseId}
+		and del_flag = 0
+		limit 1
+	</select>
 </mapper>

+ 11 - 0
common/src/main/resources/mapper/base/PersonLoginLog.xml

@@ -138,6 +138,17 @@ id_,person_id,remark_,create_by,create_time,update_by,update_time,del_flag		from
         </where>
         GROUP BY DATE_FORMAT(create_time,"%Y年%m月%d日"),person_id
 	</select>
+    <select id="findTopByPersonId" parameterType="string" resultMap="PersonLoginLogMap">
+        SELECT
+        *
+        FROM
+        base_person_login_log
+        WHERE
+        del_flag = 0
+        and person_id = #{personId}
+        order by create_time desc
+        limit 1
+    </select>
     <select id="lastLogin" resultMap="PersonLoginLogMap">
 		select * from base_person_login_log
 		where del_flag=false and person_id=#{0}

+ 26 - 0
common/src/main/resources/mapper/base/RecruitInformationInfo.xml

@@ -195,6 +195,32 @@
 				base_recruit_information_info a
 				left join base_enterprise_info b on a.enterprise_id = b.id_
 		]]>
+		<where>
+			a.del_flag = 0
+			and b.del_flag = 0
+			<if test="searchParams.enterpriseId != null">
+				and a.enterprise_id = #{searchParams.enterpriseId}
+			</if>
+			<if test="searchParams.status != null">
+				and a.status_ = #{searchParams.status}
+			</if>
+			<if test="searchParams.settlementMethod != null">
+				and a.settlement_method = #{searchParams.settlementMethod}
+			</if>
+			<if test="searchParams.positionName != null">
+				and a.position_name like #{searchParams.positionName}
+			</if>
+			<if test="searchParams.content != null">
+				and (a.position_name like #{searchParams.content} or a.desc_ like #{searchParams.content} or b.name_ like #{searchParams.content})
+			</if>
+			<if test="searchParams.industry != null">
+				and a.industry_ = #{searchParams.industry}
+			</if>
+			<if test="searchParams.salaryForm != null">
+				and a.salary_form = #{searchParams.salaryForm}
+			</if>
+			<if test="searchParams.salaryStart != null">
+				<![CDATA[
         <where>
             a.del_flag = 0
             and b.del_flag = 0

+ 15 - 0
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RecruitApiController.java

@@ -61,6 +61,9 @@ public class RecruitApiController {
     private ShareWorksInfoService shareWorksInfoService;
     @Autowired
     private RecruitPersonRelationService recruitPersonRelationService;
+    @Autowired
+    private PersonLoginLogService personLoginLogService;
+
 
     @PostMapping("findRecruitHomePage")
     @ApiOperation(value = " 首页查询全部(公开接口)")
@@ -171,6 +174,14 @@ public class RecruitApiController {
                 for(RecruitInformationInfo recruitInformationInfo : page.getResult()){
                     recruitInformationInfo.setSettlementMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",recruitInformationInfo.getSettlementMethod()));
                     recruitInformationInfo.setIndustryN(dataDictionaryService.findNameByCatalogNameAndValue("意向行业",recruitInformationInfo.getIndustry()));
+
+                    PersonInfo personInfo = personInfoService.findByEnterpriseId(recruitInformationInfo.getEnterpriseId());
+                    if(personInfo!=null){
+                        PersonLoginLog personLoginLog = personLoginLogService.findTopByPersonId(personInfo.getId());
+                        if(personLoginLog != null){
+                            recruitInformationInfo.setLastLoginTime(personLoginLog.getCreateTime());
+                        }
+                    }
                 }
 
                 messageResult.setData(PojoUtils.pageWrapper(page));
@@ -204,6 +215,10 @@ public class RecruitApiController {
                         jobInformationInfo.setPersonName(personInfo.getRealName());
                         jobInformationInfo.setGender(personInfo.getGender());
                         jobInformationInfo.setAge(personInfo.getAge());
+                        PersonLoginLog personLoginLog = personLoginLogService.findTopByPersonId(personInfo.getId());
+                        if(personLoginLog != null){
+                            jobInformationInfo.setLastLoginTime(personLoginLog.getCreateTime());
+                        }
                     }
 
                     jobInformationInfo.setIntendedIndustriesN(dataDictionaryService.findNameByCatalogNameAndValue("意向行业",jobInformationInfo.getIntendedIndustries()));

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

@@ -539,6 +539,14 @@ public class UserApiController {
                 personLoginLog.setCreateTime(new Date());
                 personLoginLog.setPersonId(regUser.getId());
                 personLoginLogService.insert(personLoginLog);
+
+
+                //更新简历
+                JobInformationInfo jobInformationInfo = jobInformationInfoService.findByPersonId(regUser.getId());
+                if(jobInformationInfo != null) {
+                    jobInformationInfo.setUpdateTime(new Date());
+                    jobInformationInfoService.update(jobInformationInfo);
+                }
             }
             msgResult.setResult(true);
         } catch (Exception ex) {