Commit b5cacf8e by hongzhong

等保调整,经纪人登录日志

parent 419951a9
...@@ -237,7 +237,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -237,7 +237,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
List<AclCustomerLog> customerLogList = aclCustomerLogDALService.findLogInfoByCustomerId(customerId); List<AclCustomerLog> customerLogList = aclCustomerLogDALService.findLogInfoByCustomerId(customerId);
int logTimes = (customerLogList.isEmpty()) ? 0 : customerLogList.size(); int logTimes = (customerLogList.isEmpty()) ? 0 : customerLogList.size();
//保存用户的登录记录 //保存用户的登录记录
aclCustomerLogDALService.saveCustomerLog(customerId,2); requestVO.setMessage(ZHBErrorConfig.getErrorInfo("800000"));
requestVO.setName(customer.getName());
aclCustomerLogDALService.saveCustomerLog(customerId,2,requestVO);
getOpenIdUrl(responseVO,customer); getOpenIdUrl(responseVO,customer);
responseVO.setCustomerId(customerId); responseVO.setCustomerId(customerId);
responseVO.setPractitionerId(practitionerId); responseVO.setPractitionerId(practitionerId);
...@@ -249,6 +251,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -249,6 +251,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
// } // }
}else{ }else{
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830001"))); responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830001")));
requestVO.setMessage(ZHBErrorConfig.getErrorInfo("800000"));
requestVO.setMobileNo(mobileNo);
aclCustomerLogDALService.saveCustomerLog(null,2,requestVO);
} }
return responseVO; return responseVO;
} }
......
...@@ -4,6 +4,8 @@ public class PractitionerLoginRequestVO { ...@@ -4,6 +4,8 @@ public class PractitionerLoginRequestVO {
private String mobileNo; private String mobileNo;
private String name; private String name;
private String email; private String email;
private String fromSystemName;
private String message;
public String getMobileNo() { public String getMobileNo() {
return mobileNo; return mobileNo;
...@@ -28,4 +30,20 @@ public class PractitionerLoginRequestVO { ...@@ -28,4 +30,20 @@ public class PractitionerLoginRequestVO {
public void setEmail(String email) { public void setEmail(String email) {
this.email = email; this.email = email;
} }
public String getFromSystemName() {
return fromSystemName;
}
public void setFromSystemName(String fromSystemName) {
this.fromSystemName = fromSystemName;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
} }
...@@ -46,6 +46,10 @@ public class AclCustomerLog implements Serializable { ...@@ -46,6 +46,10 @@ public class AclCustomerLog implements Serializable {
private Date createdAt; private Date createdAt;
private Long createdBy; private Long createdBy;
private String fromSystemName;
private String loginName;
private String mobileNo;
private String message;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
package com.yd.dal.service.customer; package com.yd.dal.service.customer;
import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
import com.yd.dal.entity.customer.AclCustomerLog; import com.yd.dal.entity.customer.AclCustomerLog;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -20,5 +21,5 @@ public interface AclCustomerLogDALService { ...@@ -20,5 +21,5 @@ public interface AclCustomerLogDALService {
* @param customerId 用户id * @param customerId 用户id
* @param plateFlag 1-在线平台 2-经纪 * @param plateFlag 1-在线平台 2-经纪
*/ */
void saveCustomerLog(Long customerId, int plateFlag); void saveCustomerLog(Long customerId, int plateFlag, PractitionerLoginRequestVO requestVO);
} }
package com.yd.dal.service.customer.impl; package com.yd.dal.service.customer.impl;
import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
import com.yd.dal.entity.customer.AclCustomerLog; import com.yd.dal.entity.customer.AclCustomerLog;
import com.yd.dal.mapper.customer.AclCustomerLogMapper; import com.yd.dal.mapper.customer.AclCustomerLogMapper;
import com.yd.dal.service.customer.AclCustomerLogDALService; import com.yd.dal.service.customer.AclCustomerLogDALService;
...@@ -34,12 +35,20 @@ public class AclCustomerLogDALServiceImpl implements AclCustomerLogDALService { ...@@ -34,12 +35,20 @@ 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) { public void 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);
customerLog.setFromSystemName(null != requestVO.getFromSystemName() ? requestVO.getFromSystemName().toUpperCase():"");
customerLog.setMobileNo(requestVO.getMobileNo());
customerLog.setLoginTime(new Date()); customerLog.setLoginTime(new Date());
if(null ==customerId){
customerLog.setIsSuccess(2);
}else{
customerLog.setIsSuccess(1); customerLog.setIsSuccess(1);
}
customerLog.setLoginName(requestVO.getName());
customerLog.setMessage(requestVO.getMessage());
customerLog.setCreatedAt(new Date()); customerLog.setCreatedAt(new Date());
customerLog.setCreatedBy(-1L); customerLog.setCreatedBy(-1L);
aclCustomerLogMapper.insert(customerLog); aclCustomerLogMapper.insert(customerLog);
......
...@@ -39,11 +39,12 @@ ...@@ -39,11 +39,12 @@
</delete> </delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclCustomerLog" useGeneratedKeys="true"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclCustomerLog" useGeneratedKeys="true">
insert into ag_acl_customer_log (customer_id, session_id, from_ip, insert into ag_acl_customer_log (customer_id, session_id, from_ip,
from_plateform, from_hostname, login_time, from_plateform, from_hostname, login_time, from_system_name,mobile_no,message,login_name,
logout_time, is_success, created_at, logout_time, is_success, created_at,
created_by) created_by)
values (#{customerId,jdbcType=BIGINT}, #{sessionId,jdbcType=VARCHAR}, #{fromIp,jdbcType=VARCHAR}, values (#{customerId,jdbcType=BIGINT}, #{sessionId,jdbcType=VARCHAR}, #{fromIp,jdbcType=VARCHAR},
#{fromPlateform,jdbcType=INTEGER}, #{fromHostname,jdbcType=VARCHAR}, #{loginTime,jdbcType=TIMESTAMP}, #{fromPlateform,jdbcType=INTEGER}, #{fromHostname,jdbcType=VARCHAR}, #{loginTime,jdbcType=TIMESTAMP},
#{fromSystemName,jdbcType=VARCHAR}, #{mobileNo,jdbcType=VARCHAR}, #{message,jdbcType=VARCHAR},#{loginName,jdbcType=VARCHAR},
#{logoutTime,jdbcType=TIMESTAMP}, #{isSuccess,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{logoutTime,jdbcType=TIMESTAMP}, #{isSuccess,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}) #{createdBy,jdbcType=BIGINT})
</insert> </insert>
......
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