Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
965350b4
Commit
965350b4
authored
Mar 16, 2018
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部分渠道免密登陆上报统计--仅限KA--xyqb--用户中心login_super接口
parent
73189d4d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
10 deletions
+30
-10
AppController.java
...antgroup/xyqb/controller/external/user/AppController.java
+14
-6
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+2
-4
UserStatistics.java
src/main/java/cn/quantgroup/xyqb/model/UserStatistics.java
+14
-0
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/AppController.java
View file @
965350b4
...
...
@@ -4,10 +4,7 @@ import cn.quantgroup.xyqb.aspect.accessable.IpValidator;
import
cn.quantgroup.xyqb.controller.IBaseController
;
import
cn.quantgroup.xyqb.entity.Merchant
;
import
cn.quantgroup.xyqb.entity.User
;
import
cn.quantgroup.xyqb.model.AuthBean
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.LoginProperties
;
import
cn.quantgroup.xyqb.model.UserRet
;
import
cn.quantgroup.xyqb.model.*
;
import
cn.quantgroup.xyqb.model.session.LoginInfo
;
import
cn.quantgroup.xyqb.model.session.SessionStruct
;
import
cn.quantgroup.xyqb.repository.IUserRepository
;
...
...
@@ -20,6 +17,7 @@ import cn.quantgroup.xyqb.service.user.IUserBtRegisterService;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.util.IPUtil
;
import
cn.quantgroup.xyqb.util.MqUtils
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -29,6 +27,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.Random
;
import
static
cn
.
quantgroup
.
xyqb
.
constant
.
UserConstant
.
USER_ERROR_OR_PASSWORD_ERROR
;
...
...
@@ -190,9 +190,17 @@ public class AppController implements IBaseController {
context
.
setCreatedFrom
(
sessionStruct
.
getValues
().
getLoginProperties
().
getCreatedFrom
());
context
.
setAppChannel
(
appChannel
);
loginInfo
.
setLoginContext
(
context
);
LOGGER
.
info
(
"第三方用户获取信息登录成功 loginSuper --> loginFrom:{}, phoneNo:{},appChannel:{},channelId:{}"
,
registerFrom
,
phoneNo
,
appChannel
,
channelId
);
/*
* 部分免密渠道登录统计
* 贷款导航(84660);壹账通H5(159384)
*/
Long
_registerFrom
=
Optional
.
ofNullable
(
user
.
getRegisteredFrom
()).
orElse
(
registerFrom
);
if
(
Objects
.
equals
(
_registerFrom
,
84660L
)
||
Objects
.
equals
(
_registerFrom
,
159384L
)){
UserStatistics
statistics
=
new
UserStatistics
(
user
,
null
,
4
,
channelId
);
//增加登陆统计发送
MqUtils
.
sendLoanVest
(
statistics
);
}
return
JsonResult
.
buildSuccessResult
(
""
,
loginInfo
);
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
965350b4
...
...
@@ -21,11 +21,9 @@ import cn.quantgroup.xyqb.util.encrypt.MD5Util;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.DeserializationFeature
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.SerializationFeature
;
import
com.fasterxml.jackson.databind.util.JSONWrappedObject
;
import
com.google.common.base.MoreObjects
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.Maps
;
...
...
@@ -660,7 +658,7 @@ public class InnerController implements IBaseController {
bean
.
setName
(
userDetail
.
getName
());
bean
.
setIdNo
(
userDetail
.
getIdNo
());
bean
.
setQq
(
userDetail
.
getQq
());
bean
.
setGender
(
Optional
.
ofNullable
(
userDetail
.
getGender
()).
orElse
(
cn
.
quantgroup
.
xyqb
.
model
.
Gender
.
UNKNOWN
).
getName
());
bean
.
setGender
(
Optional
.
ofNullable
(
userDetail
.
getGender
()).
orElse
(
Gender
.
UNKNOWN
).
getName
());
}
UserBtRegister
userBtRegister
=
userBtRegisterService
.
findByUserId
(
user
.
getId
());
if
(!
Objects
.
isNull
(
userBtRegister
))
{
...
...
@@ -742,7 +740,7 @@ public class InnerController implements IBaseController {
bean
.
setName
(
userDetail
.
getName
());
bean
.
setIdNo
(
userDetail
.
getIdNo
());
bean
.
setQq
(
userDetail
.
getQq
());
bean
.
setGender
(
Optional
.
ofNullable
(
userDetail
.
getGender
()).
orElse
(
cn
.
quantgroup
.
xyqb
.
model
.
Gender
.
UNKNOWN
).
getName
());
bean
.
setGender
(
Optional
.
ofNullable
(
userDetail
.
getGender
()).
orElse
(
Gender
.
UNKNOWN
).
getName
());
if
(
null
!=
address
)
{
bean
.
setProvince
(
address
.
getProvince
());
bean
.
setCity
(
address
.
getCity
());
...
...
src/main/java/cn/quantgroup/xyqb/model/UserStatistics.java
View file @
965350b4
...
...
@@ -9,8 +9,19 @@ import lombok.Data;
*/
@Data
public
class
UserStatistics
{
/**
* 用户唯一标识
*/
private
String
uuid
;
/**
* 注册渠道号
*/
private
Long
registerFrom
;
/**
* 维度
* 形如:"app|app名称|平台|应用市场名字"
* 示例:"dimension":"app|shandiandai|IOS|sdd-Appstore"
*/
private
String
dimension
;
/**
* 1-登录
...
...
@@ -19,6 +30,9 @@ public class UserStatistics {
* 4-免密登录
*/
private
int
action
;
/**
*
*/
private
Long
channel
;
public
UserStatistics
()
{
...
...
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