Commit fb7d7562 by hongzhong

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

parent a000228d
......@@ -239,7 +239,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
//保存用户的登录记录
requestVO.setMessage(ZHBErrorConfig.getErrorInfo("800000"));
requestVO.setName(customer.getName());
aclCustomerLogDALService.saveCustomerLog(customerId,2,requestVO);
Long loginLogId = aclCustomerLogDALService.saveCustomerLog(customerId,2,requestVO);
getOpenIdUrl(responseVO,customer);
responseVO.setCustomerId(customerId);
responseVO.setPractitionerId(practitionerId);
......@@ -247,13 +247,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
responseVO.setPractitionerBasicInfo(basicInfo);
responseVO.setLoginTimes(logTimes);
responseVO.setCanSeeSalaryList(practitionerInfo.getCanSeeSalaryList());
responseVO.setLoginLogId(loginLogId);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
// }
}else{
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830001")));
requestVO.setMessage(ZHBErrorConfig.getErrorInfo("800000"));
requestVO.setMobileNo(mobileNo);
aclCustomerLogDALService.saveCustomerLog(null,2,requestVO);
Long loginLogId = aclCustomerLogDALService.saveCustomerLog(null,2,requestVO);
responseVO.setLoginLogId(loginLogId);
}
return responseVO;
......
......@@ -13,6 +13,7 @@ public class PractitionerLoginResponseVO {
private Long canSeeSalaryList;
private PractitionerLoginBasicInfo practitionerBasicInfo;
private CommonResult commonResult;
private Long loginLogId;
public Long getCustomerId() {
return customerId;
......@@ -85,4 +86,12 @@ public class PractitionerLoginResponseVO {
public void setCanSeeSalaryList(Long canSeeSalaryList) {
this.canSeeSalaryList = canSeeSalaryList;
}
public Long getLoginLogId() {
return loginLogId;
}
public void setLoginLogId(Long loginLogId) {
this.loginLogId = loginLogId;
}
}
......@@ -18,4 +18,6 @@ public interface AclCustomerLogMapper {
int updateByPrimaryKey(AclCustomerLog record);
List<AclCustomerLog> findLogInfoByCustomerId(Long customerId);
}
\ No newline at end of file
Long findLogInfoByMobileNo(String mobileNo);
}
......@@ -21,5 +21,10 @@ public interface AclCustomerLogDALService {
* @param customerId 用户id
* @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 {
* @param customerId 用户id
* @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();
customerLog.setCustomerId(customerId);
customerLog.setFromPlateform(plateFlag);
......@@ -56,5 +56,11 @@ public class AclCustomerLogDALServiceImpl implements AclCustomerLogDALService {
customerLog.setCreatedAt(new Date());
customerLog.setCreatedBy(-1L);
aclCustomerLogMapper.insert(customerLog);
return this.findLogInfoByMobileNo(requestVO.getMobileNo());
}
@Override
public Long findLogInfoByMobileNo(String mobileNo) {
return aclCustomerLogMapper.findLogInfoByMobileNo(mobileNo);
}
}
......@@ -165,4 +165,10 @@
created_by = #{createdBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findLogInfoByMobileNo" resultType="Long">
select max(id) from ag_acl_customer_log
where mobile_no = #{mobileNo,jdbcType=VARCHAR}
</select>
</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