Commit fb7d7562 by hongzhong

等保调整:ydlife登出日志记录

parent a000228d
...@@ -239,7 +239,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -239,7 +239,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
//保存用户的登录记录 //保存用户的登录记录
requestVO.setMessage(ZHBErrorConfig.getErrorInfo("800000")); requestVO.setMessage(ZHBErrorConfig.getErrorInfo("800000"));
requestVO.setName(customer.getName()); requestVO.setName(customer.getName());
aclCustomerLogDALService.saveCustomerLog(customerId,2,requestVO); Long loginLogId = aclCustomerLogDALService.saveCustomerLog(customerId,2,requestVO);
getOpenIdUrl(responseVO,customer); getOpenIdUrl(responseVO,customer);
responseVO.setCustomerId(customerId); responseVO.setCustomerId(customerId);
responseVO.setPractitionerId(practitionerId); responseVO.setPractitionerId(practitionerId);
...@@ -247,13 +247,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -247,13 +247,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
responseVO.setPractitionerBasicInfo(basicInfo); responseVO.setPractitionerBasicInfo(basicInfo);
responseVO.setLoginTimes(logTimes); responseVO.setLoginTimes(logTimes);
responseVO.setCanSeeSalaryList(practitionerInfo.getCanSeeSalaryList()); responseVO.setCanSeeSalaryList(practitionerInfo.getCanSeeSalaryList());
responseVO.setLoginLogId(loginLogId);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000"))); responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
// } // }
}else{ }else{
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830001"))); responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830001")));
requestVO.setMessage(ZHBErrorConfig.getErrorInfo("800000")); requestVO.setMessage(ZHBErrorConfig.getErrorInfo("800000"));
requestVO.setMobileNo(mobileNo); requestVO.setMobileNo(mobileNo);
aclCustomerLogDALService.saveCustomerLog(null,2,requestVO); Long loginLogId = aclCustomerLogDALService.saveCustomerLog(null,2,requestVO);
responseVO.setLoginLogId(loginLogId);
} }
return responseVO; return responseVO;
......
...@@ -13,6 +13,7 @@ public class PractitionerLoginResponseVO { ...@@ -13,6 +13,7 @@ public class PractitionerLoginResponseVO {
private Long canSeeSalaryList; private Long canSeeSalaryList;
private PractitionerLoginBasicInfo practitionerBasicInfo; private PractitionerLoginBasicInfo practitionerBasicInfo;
private CommonResult commonResult; private CommonResult commonResult;
private Long loginLogId;
public Long getCustomerId() { public Long getCustomerId() {
return customerId; return customerId;
...@@ -85,4 +86,12 @@ public class PractitionerLoginResponseVO { ...@@ -85,4 +86,12 @@ public class PractitionerLoginResponseVO {
public void setCanSeeSalaryList(Long canSeeSalaryList) { public void setCanSeeSalaryList(Long canSeeSalaryList) {
this.canSeeSalaryList = canSeeSalaryList; this.canSeeSalaryList = canSeeSalaryList;
} }
public Long getLoginLogId() {
return loginLogId;
}
public void setLoginLogId(Long loginLogId) {
this.loginLogId = loginLogId;
}
} }
...@@ -18,4 +18,6 @@ public interface AclCustomerLogMapper { ...@@ -18,4 +18,6 @@ public interface AclCustomerLogMapper {
int updateByPrimaryKey(AclCustomerLog record); int updateByPrimaryKey(AclCustomerLog record);
List<AclCustomerLog> findLogInfoByCustomerId(Long customerId); List<AclCustomerLog> findLogInfoByCustomerId(Long customerId);
}
\ No newline at end of file Long findLogInfoByMobileNo(String mobileNo);
}
...@@ -21,5 +21,10 @@ public interface AclCustomerLogDALService { ...@@ -21,5 +21,10 @@ public interface AclCustomerLogDALService {
* @param customerId 用户id * @param customerId 用户id
* @param plateFlag 1-在线平台 2-经纪 * @param plateFlag 1-在线平台 2-经纪
*/ */
void saveCustomerLog(Long customerId, int plateFlag, PractitionerLoginRequestVO requestVO); Long saveCustomerLog(Long customerId, int plateFlag, PractitionerLoginRequestVO requestVO);
/**
* 根据手机号查询最大的日志id
* @date: 2021/11/8
*/
Long findLogInfoByMobileNo(String mobileNo);
} }
...@@ -37,7 +37,7 @@ public class AclCustomerLogDALServiceImpl implements AclCustomerLogDALService { ...@@ -37,7 +37,7 @@ public class AclCustomerLogDALServiceImpl implements AclCustomerLogDALService {
* @param customerId 用户id * @param customerId 用户id
* @param plateFlag 1-在线平台 2-经纪 * @param plateFlag 1-在线平台 2-经纪
*/ */
public void saveCustomerLog(Long customerId, int plateFlag, PractitionerLoginRequestVO requestVO) { public Long saveCustomerLog(Long customerId, int plateFlag, PractitionerLoginRequestVO requestVO) {
AclCustomerLog customerLog = new AclCustomerLog(); AclCustomerLog customerLog = new AclCustomerLog();
customerLog.setCustomerId(customerId); customerLog.setCustomerId(customerId);
customerLog.setFromPlateform(plateFlag); customerLog.setFromPlateform(plateFlag);
...@@ -56,5 +56,11 @@ public class AclCustomerLogDALServiceImpl implements AclCustomerLogDALService { ...@@ -56,5 +56,11 @@ public class AclCustomerLogDALServiceImpl implements AclCustomerLogDALService {
customerLog.setCreatedAt(new Date()); customerLog.setCreatedAt(new Date());
customerLog.setCreatedBy(-1L); customerLog.setCreatedBy(-1L);
aclCustomerLogMapper.insert(customerLog); aclCustomerLogMapper.insert(customerLog);
return this.findLogInfoByMobileNo(requestVO.getMobileNo());
}
@Override
public Long findLogInfoByMobileNo(String mobileNo) {
return aclCustomerLogMapper.findLogInfoByMobileNo(mobileNo);
} }
} }
...@@ -165,4 +165,10 @@ ...@@ -165,4 +165,10 @@
created_by = #{createdBy,jdbcType=BIGINT} created_by = #{createdBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="findLogInfoByMobileNo" resultType="Long">
select max(id) from ag_acl_customer_log
where mobile_no = #{mobileNo,jdbcType=VARCHAR}
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment