Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
b5cacf8e
Commit
b5cacf8e
authored
Nov 03, 2021
by
hongzhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
等保调整,经纪人登录日志
parent
419951a9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
11 deletions
+48
-11
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+7
-1
yd-api/src/main/java/com/yd/api/practitioner/vo/login/PractitionerLoginRequestVO.java
+18
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclCustomerLog.java
+5
-2
yd-api/src/main/java/com/yd/dal/service/customer/AclCustomerLogDALService.java
+2
-1
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclCustomerLogDALServiceImpl.java
+11
-2
yd-api/src/main/resources/mapper/customer/AclCustomerLogMapper.xml
+5
-5
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
b5cacf8e
...
@@ -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
;
}
}
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/login/PractitionerLoginRequestVO.java
View file @
b5cacf8e
...
@@ -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
;
}
}
}
yd-api/src/main/java/com/yd/dal/entity/customer/AclCustomerLog.java
View file @
b5cacf8e
...
@@ -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
;
}
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/customer/AclCustomerLogDALService.java
View file @
b5cacf8e
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
);
}
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclCustomerLogDALServiceImpl.java
View file @
b5cacf8e
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
());
customerLog
.
setIsSuccess
(
1
);
if
(
null
==
customerId
){
customerLog
.
setIsSuccess
(
2
);
}
else
{
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
);
...
...
yd-api/src/main/resources/mapper/customer/AclCustomerLogMapper.xml
View file @
b5cacf8e
...
@@ -39,12 +39,13 @@
...
@@ -39,12 +39,13 @@
</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},
#{logoutTime,jdbcType=TIMESTAMP}, #{isSuccess,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{fromSystemName,jdbcType=VARCHAR}, #{mobileNo,jdbcType=VARCHAR}, #{message,jdbcType=VARCHAR},#{loginName,jdbcType=VARCHAR},
#{logoutTime,jdbcType=TIMESTAMP}, #{isSuccess,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT})
#{createdBy,jdbcType=BIGINT})
</insert>
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclCustomerLog"
useGeneratedKeys=
"true"
>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclCustomerLog"
useGeneratedKeys=
"true"
>
...
@@ -164,4 +165,4 @@
...
@@ -164,4 +165,4 @@
created_by = #{createdBy,jdbcType=BIGINT}
created_by = #{createdBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment