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
feccc210
Commit
feccc210
authored
Mar 26, 2018
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码格式及log优化
parent
015803cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
75 deletions
+111
-75
HelloController.java
...group/xyqb/controller/external/index/HelloController.java
+10
-3
AppController.java
...antgroup/xyqb/controller/external/user/AppController.java
+95
-67
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+5
-5
AuthInfoController.java
...up/xyqb/controller/internal/login/AuthInfoController.java
+1
-0
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/index/HelloController.java
View file @
feccc210
package
cn
.
quantgroup
.
xyqb
.
controller
.
external
.
index
;
package
cn
.
quantgroup
.
xyqb
.
controller
.
external
.
index
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.util.IPUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
/**
/**
* Created by xuran on 2017/7/12.
* Created by xuran on 2017/7/12.
*/
*/
@RestController
@RestController
@Slf4j
@RequestMapping
(
"/hello"
)
@RequestMapping
(
"/hello"
)
public
class
HelloController
{
public
class
HelloController
{
@RequestMapping
(
"/hello"
)
@RequestMapping
(
"/hello"
)
public
String
hello
(){
public
String
hello
(
HttpServletRequest
request
)
{
String
ip
=
IPUtil
.
getRemoteIP
(
request
);
if
(
ip
.
startsWith
(
"192.168.12."
)){
log
.
error
(
"测试:"
,
new
Exception
(
"Sentry捕获异常"
));
}
return
"ok"
;
return
"ok"
;
}
}
}
}
src/main/java/cn/quantgroup/xyqb/controller/external/user/AppController.java
View file @
feccc210
package
cn
.
quantgroup
.
xyqb
.
controller
.
external
.
user
;
package
cn
.
quantgroup
.
xyqb
.
controller
.
external
.
user
;
import
cn.quantgroup.xyqb.aspect.accessable.IpValidator
;
import
cn.quantgroup.xyqb.aspect.accessable.IpValidator
;
import
cn.quantgroup.xyqb.aspect.logcaller.LogHttpCaller
;
import
cn.quantgroup.xyqb.controller.IBaseController
;
import
cn.quantgroup.xyqb.controller.IBaseController
;
import
cn.quantgroup.xyqb.entity.Merchant
;
import
cn.quantgroup.xyqb.entity.Merchant
;
import
cn.quantgroup.xyqb.entity.User
;
import
cn.quantgroup.xyqb.entity.User
;
...
@@ -25,18 +26,14 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -25,18 +26,14 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Objects
;
import
java.util.Optional
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.Random
;
import
java.util.Random
;
import
static
cn
.
quantgroup
.
xyqb
.
constant
.
UserConstant
.
USER_ERROR_OR_PASSWORD_ERROR
;
import
static
cn
.
quantgroup
.
xyqb
.
constant
.
UserConstant
.
USER_ERROR_OR_PASSWORD_ERROR
;
/**
/**
* 第三方用户免密登录
* @author mengfan.feng
* @author mengfan.feng
* @time 2015-10-27 11:41
* @time 2015-10-27 11:41
*/
*/
...
@@ -64,22 +61,38 @@ public class AppController implements IBaseController {
...
@@ -64,22 +61,38 @@ public class AppController implements IBaseController {
private
IUserBtRegisterService
userBtRegisterService
;
private
IUserBtRegisterService
userBtRegisterService
;
@Autowired
@Autowired
private
IUserRegisterService
userRegisterService
;
private
IUserRegisterService
userRegisterService
;
/**
/**
* 第三方用户登录
* 第三方用户免密登录
* 发现新手机号,自动执行注册
*
* @param phoneNo - 手机号
* @param idNo - 用户身份证号
* @param name - 用户姓名
* @param key - Merchant表name属性
* @param btRegisterChannelId - 白条注册渠道id
* @param registerFrom - 注册渠道
* @param channelId -
* @param appChannel -
* @param request
* @return Token和phoneNo
*/
*/
@LogHttpCaller
@IpValidator
@IpValidator
@RequestMapping
(
"/login"
)
@RequestMapping
(
"/login"
)
public
JsonResult
login
(
public
JsonResult
login
(
String
phoneNo
,
String
phoneNo
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
registerFrom
,
String
idNo
,
String
name
,
String
key
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
channelId
,
@RequestParam
(
required
=
false
)
Long
btRegisterChannelId
,
String
idNo
,
String
name
,
String
key
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appChannel
,
@RequestParam
(
required
=
false
)
Long
btRegisterChannelId
,
HttpServletRequest
request
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
registerFrom
,
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
channelId
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appChannel
,
HttpServletRequest
request
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
}
// Todo -- 截止2017-12-08 13:44:00只有52次调用记录,来自222(白条),最近一次:2017-11-11 12:15:53
// Todo -- 截止2017-12-08 13:44:00只有52次调用记录,来自222(白条),最近一次:2017-11-11 12:15:53
LOGGER
.
info
(
"第三方用户登录 login --> loginFrom:{},channelId:{},btRegisterChannelId:{} requestIp:{},idNo:{},name:{}"
,
registerFrom
,
channelId
,
btRegisterChannelId
,
IPUtil
.
getRemoteIP
(
request
),
idNo
,
name
);
LOGGER
.
info
(
"第三方用户登录
[AppController]
login --> loginFrom:{},channelId:{},btRegisterChannelId:{} requestIp:{},idNo:{},name:{}"
,
registerFrom
,
channelId
,
btRegisterChannelId
,
IPUtil
.
getRemoteIP
(
request
),
idNo
,
name
);
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
if
(
user
==
null
)
{
if
(
user
==
null
)
{
user
=
userRegisterService
.
register
(
registerFrom
,
phoneNo
,
idNo
,
name
,
channelId
,
btRegisterChannelId
);
user
=
userRegisterService
.
register
(
registerFrom
,
phoneNo
,
idNo
,
name
,
channelId
,
btRegisterChannelId
);
...
@@ -95,78 +108,51 @@ public class AppController implements IBaseController {
...
@@ -95,78 +108,51 @@ public class AppController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
"无效的商户"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"无效的商户"
,
null
);
}
}
LoginProperties
loginProperties
=
new
LoginProperties
();
LoginProperties
loginProperties
=
new
LoginProperties
();
loginProperties
.
setChannelId
(
channelId
);
loginProperties
.
setMerchantName
(
merchant
.
getName
());
loginProperties
.
setMerchantName
(
merchant
.
getName
());
loginProperties
.
setCreatedFrom
(
registerFrom
);
loginProperties
.
setAppChannel
(
appChannel
);
SessionStruct
sessionStruct
=
sessionService
.
createSessionAndPersist
(
user
,
loginProperties
);
AuthBean
bean
=
new
AuthBean
();
bean
.
setToken
(
sessionStruct
.
getSid
());
bean
.
setPhoneNo
(
phoneNo
);
LOGGER
.
info
(
"第三方用户登录成功 login --> loginFrom:{}, phoneNo:{},appChannel:{}"
,
registerFrom
,
phoneNo
,
appChannel
);
return
new
JsonResult
(
bean
);
}
/**
* 给app用
*/
@IpValidator
@RequestMapping
(
"/login2"
)
public
JsonResult
login2
(
String
phoneNo
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
registerFrom
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
channelId
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appChannel
,
HttpServletRequest
request
)
{
AuthBean
bean
=
new
AuthBean
();
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
LOGGER
.
info
(
"第三方用户登录 login2 --> loginFrom:{},channelId:{}, requestIp:{}"
,
registerFrom
,
channelId
,
IPUtil
.
getRemoteIP
(
request
));
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
if
(
user
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
if
(!
user
.
getEnable
())
{
return
JsonResult
.
buildErrorStateResult
(
"登录失败"
,
null
);
}
LoginProperties
loginProperties
=
new
LoginProperties
();
loginProperties
.
setChannelId
(
channelId
);
loginProperties
.
setChannelId
(
channelId
);
loginProperties
.
setCreatedFrom
(
registerFrom
);
loginProperties
.
setCreatedFrom
(
registerFrom
);
loginProperties
.
setAppChannel
(
appChannel
);
loginProperties
.
setAppChannel
(
appChannel
);
SessionStruct
sessionStruct
=
sessionService
.
createSessionAndPersist
(
user
,
loginProperties
);
SessionStruct
sessionStruct
=
sessionService
.
createSessionAndPersist
(
user
,
loginProperties
);
AuthBean
bean
=
new
AuthBean
();
bean
.
setToken
(
sessionStruct
.
getSid
());
bean
.
setToken
(
sessionStruct
.
getSid
());
bean
.
setPhoneNo
(
phoneNo
);
bean
.
setPhoneNo
(
phoneNo
);
LOGGER
.
info
(
"第三方用户登录成功 [AppController] login --> loginFrom:{}, phoneNo:{},appChannel:{}"
,
registerFrom
,
phoneNo
,
appChannel
);
LOGGER
.
info
(
"第三方用户登录成功 login2 --> loginFrom:{}, phoneNo:{},appChannel:{}"
,
registerFrom
,
phoneNo
,
appChannel
);
return
new
JsonResult
(
bean
);
return
new
JsonResult
(
bean
);
}
}
/**
/**
* 第三方用户登录并返回用户信息
* 第三方用户免密登录
* 发现新手机号,自动执行注册
*
* @param phoneNo - 手机号
* @param idNo - 用户身份证号
* @param name - 用户姓名
* @param key - Merchant表name属性
* @param btRegisterChannelId - 白条注册渠道id
* @param registerFrom - 注册渠道
* @param channelId -
* @param appChannel -
* @param request
* @return 用户信息
*/
*/
@LogHttpCaller
@IpValidator
@IpValidator
@RequestMapping
(
"/login_super"
)
@RequestMapping
(
"/login_super"
)
public
JsonResult
loginSuper
(
public
JsonResult
loginSuper
(
String
phoneNo
,
String
phoneNo
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
registerFrom
,
String
idNo
,
String
name
,
String
key
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
channelId
,
@RequestParam
(
required
=
false
)
Long
btRegisterChannelId
,
String
idNo
,
String
name
,
String
key
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appChannel
,
@RequestParam
(
required
=
false
)
Long
btRegisterChannelId
,
HttpServletRequest
request
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
registerFrom
,
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
channelId
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appChannel
,
HttpServletRequest
request
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
}
LOGGER
.
info
(
"第三方用户登录 [AppController] loginSuper --> loginFrom:{},phoneNo:{},appChannel:{},channelId:{},btRegisterChannelId:{} requestIp:{},idNo:{},name:{}"
,
registerFrom
,
phoneNo
,
appChannel
,
channelId
,
btRegisterChannelId
,
IPUtil
.
getRemoteIP
(
request
),
idNo
,
name
);
LOGGER
.
info
(
"第三方用户登录 loginSuper --> loginFrom:{},phoneNo:{},appChannel:{},channelId:{},btRegisterChannelId:{} requestIp:{},idNo:{},name:{}"
,
registerFrom
,
phoneNo
,
appChannel
,
channelId
,
btRegisterChannelId
,
IPUtil
.
getRemoteIP
(
request
),
idNo
,
name
);
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
if
(
user
==
null
)
{
if
(
user
==
null
)
{
user
=
userRegisterService
.
register
(
registerFrom
,
phoneNo
,
idNo
,
name
,
channelId
,
btRegisterChannelId
);
user
=
userRegisterService
.
register
(
registerFrom
,
phoneNo
,
idNo
,
name
,
channelId
,
btRegisterChannelId
);
}
}
if
(
user
==
null
)
{
if
(
user
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
...
@@ -179,12 +165,11 @@ public class AppController implements IBaseController {
...
@@ -179,12 +165,11 @@ public class AppController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
"无效的商户"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"无效的商户"
,
null
);
}
}
LoginProperties
loginProperties
=
new
LoginProperties
();
LoginProperties
loginProperties
=
new
LoginProperties
();
loginProperties
.
setChannelId
(
channelId
);
loginProperties
.
setMerchantName
(
merchant
.
getName
());
loginProperties
.
setMerchantName
(
merchant
.
getName
());
loginProperties
.
setChannelId
(
channelId
);
loginProperties
.
setCreatedFrom
(
registerFrom
);
loginProperties
.
setCreatedFrom
(
registerFrom
);
loginProperties
.
setAppChannel
(
appChannel
);
loginProperties
.
setAppChannel
(
appChannel
);
SessionStruct
sessionStruct
=
sessionService
.
createSessionAndPersist
(
user
,
loginProperties
);
SessionStruct
sessionStruct
=
sessionService
.
createSessionAndPersist
(
user
,
loginProperties
);
LoginInfo
loginInfo
=
new
LoginInfo
();
LoginInfo
loginInfo
=
new
LoginInfo
();
loginInfo
.
setUser
(
new
UserRet
(
user
));
loginInfo
.
setUser
(
new
UserRet
(
user
));
loginInfo
.
setToken
(
sessionStruct
.
getSid
());
loginInfo
.
setToken
(
sessionStruct
.
getSid
());
...
@@ -193,7 +178,7 @@ public class AppController implements IBaseController {
...
@@ -193,7 +178,7 @@ public class AppController implements IBaseController {
context
.
setCreatedFrom
(
sessionStruct
.
getValues
().
getLoginProperties
().
getCreatedFrom
());
context
.
setCreatedFrom
(
sessionStruct
.
getValues
().
getLoginProperties
().
getCreatedFrom
());
context
.
setAppChannel
(
appChannel
);
context
.
setAppChannel
(
appChannel
);
loginInfo
.
setLoginContext
(
context
);
loginInfo
.
setLoginContext
(
context
);
LOGGER
.
info
(
"第三方用户获取信息登录成功 loginSuper --> loginFrom:{}, phoneNo:{},appChannel:{},channelId:{}"
,
registerFrom
,
phoneNo
,
appChannel
,
channelId
);
LOGGER
.
info
(
"第三方用户获取信息登录成功
[AppController]
loginSuper --> loginFrom:{}, phoneNo:{},appChannel:{},channelId:{}"
,
registerFrom
,
phoneNo
,
appChannel
,
channelId
);
/*
/*
* 部分免密渠道登录统计,用户中心不需识别,由统计平台来过滤
* 部分免密渠道登录统计,用户中心不需识别,由统计平台来过滤
* 贷款导航(84660);壹账通H5(159384)
* 贷款导航(84660);壹账通H5(159384)
...
@@ -206,4 +191,47 @@ public class AppController implements IBaseController {
...
@@ -206,4 +191,47 @@ public class AppController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
""
,
loginInfo
);
return
JsonResult
.
buildSuccessResult
(
""
,
loginInfo
);
}
}
/**
* 第三方用户免密登录
* 发现新手机号不会执行注册
*
* @param phoneNo - 手机号
* @param registerFrom - 注册渠道
* @param channelId -
* @param appChannel -
* @param request
* @return Token和phoneNo
*/
@LogHttpCaller
@IpValidator
@RequestMapping
(
"/login2"
)
public
JsonResult
login2
(
String
phoneNo
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
registerFrom
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
channelId
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appChannel
,
HttpServletRequest
request
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
LOGGER
.
info
(
"第三方用户登录 [AppController] login2 --> loginFrom:{},channelId:{}, requestIp:{}"
,
registerFrom
,
channelId
,
IPUtil
.
getRemoteIP
(
request
));
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
if
(
user
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
if
(!
user
.
getEnable
())
{
return
JsonResult
.
buildErrorStateResult
(
"登录失败"
,
null
);
}
LoginProperties
loginProperties
=
new
LoginProperties
();
loginProperties
.
setChannelId
(
channelId
);
loginProperties
.
setCreatedFrom
(
registerFrom
);
loginProperties
.
setAppChannel
(
appChannel
);
SessionStruct
sessionStruct
=
sessionService
.
createSessionAndPersist
(
user
,
loginProperties
);
AuthBean
bean
=
new
AuthBean
();
bean
.
setToken
(
sessionStruct
.
getSid
());
bean
.
setPhoneNo
(
phoneNo
);
LOGGER
.
info
(
"第三方用户登录成功 [AppController] login2 --> loginFrom:{}, phoneNo:{},appChannel:{}"
,
registerFrom
,
phoneNo
,
appChannel
);
return
new
JsonResult
(
bean
);
}
}
}
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
feccc210
...
@@ -672,11 +672,11 @@ public class InnerController implements IBaseController {
...
@@ -672,11 +672,11 @@ public class InnerController implements IBaseController {
return
null
;
return
null
;
}
}
UserAssociationModel
bean
=
new
UserAssociationModel
();
UserAssociationModel
bean
=
new
UserAssociationModel
();
bean
.
setId
(
user
.
getId
());
bean
.
setUuid
(
user
.
getUuid
());
bean
.
setUuid
(
user
.
getUuid
());
bean
.
setRegisterFrom
(
user
.
getRegisteredFrom
());
bean
.
setRegisterFrom
(
user
.
getRegisteredFrom
());
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
user
.
getId
());
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
user
.
getId
());
if
(!
Objects
.
isNull
(
userDetail
))
{
if
(!
Objects
.
isNull
(
userDetail
))
{
bean
.
setId
(
userDetail
.
getUserId
());
bean
.
setPhoneNo
(
userDetail
.
getPhoneNo
());
bean
.
setPhoneNo
(
userDetail
.
getPhoneNo
());
bean
.
setName
(
userDetail
.
getName
());
bean
.
setName
(
userDetail
.
getName
());
bean
.
setIdNo
(
userDetail
.
getIdNo
());
bean
.
setIdNo
(
userDetail
.
getIdNo
());
...
@@ -687,7 +687,7 @@ public class InnerController implements IBaseController {
...
@@ -687,7 +687,7 @@ public class InnerController implements IBaseController {
if
(!
Objects
.
isNull
(
userBtRegister
))
{
if
(!
Objects
.
isNull
(
userBtRegister
))
{
bean
.
setMerchantId
(
userBtRegister
.
getRegisterBtMerchantId
());
bean
.
setMerchantId
(
userBtRegister
.
getRegisterBtMerchantId
());
}
}
UserExtInfo
extInfo
=
userExtInfoService
.
findByUserId
(
user
Detail
.
getUser
Id
());
UserExtInfo
extInfo
=
userExtInfoService
.
findByUserId
(
user
.
get
Id
());
if
(!
Objects
.
isNull
(
extInfo
))
{
if
(!
Objects
.
isNull
(
extInfo
))
{
if
(
null
==
extInfo
.
getEducationEnum
())
{
if
(
null
==
extInfo
.
getEducationEnum
())
{
bean
.
setEducationEnum
(
cn
.
quantgroup
.
user
.
enums
.
EducationEnum
.
UNKNOWN
.
getName
());
bean
.
setEducationEnum
(
cn
.
quantgroup
.
user
.
enums
.
EducationEnum
.
UNKNOWN
.
getName
());
...
@@ -705,11 +705,11 @@ public class InnerController implements IBaseController {
...
@@ -705,11 +705,11 @@ public class InnerController implements IBaseController {
bean
.
setMarryStatus
(
extInfo
.
getMarryStatus
().
getDescription
());
bean
.
setMarryStatus
(
extInfo
.
getMarryStatus
().
getDescription
());
}
}
}
}
Address
address
=
addressService
.
findByUserId
(
user
Detail
.
getUser
Id
());
Address
address
=
addressService
.
findByUserId
(
user
.
get
Id
());
if
(!
Objects
.
isNull
(
address
))
{
if
(!
Objects
.
isNull
(
address
))
{
bean
.
putAddressList
(
Arrays
.
asList
(
address
));
bean
.
putAddressList
(
Arrays
.
asList
(
address
));
}
}
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
user
Detail
.
getUser
Id
(),
true
);
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
user
.
get
Id
(),
true
);
if
(!
Objects
.
isNull
(
address
))
{
if
(!
Objects
.
isNull
(
address
))
{
bean
.
putContactList
(
contacts
);
bean
.
putContactList
(
contacts
);
}
}
...
@@ -720,7 +720,7 @@ public class InnerController implements IBaseController {
...
@@ -720,7 +720,7 @@ public class InnerController implements IBaseController {
@RequestMapping
(
"/user-association/search/userId"
)
@RequestMapping
(
"/user-association/search/userId"
)
public
JsonResult
findUserAssociationModelByUserId
(
Long
userId
)
{
public
JsonResult
findUserAssociationModelByUserId
(
Long
userId
)
{
if
(
Objects
.
isNull
(
userId
)
||
userId
<
1
)
{
if
(
Objects
.
isNull
(
userId
)
||
userId
<
1
)
{
return
JsonResult
.
buildErrorStateResult
(
"
"
,
""
);
return
JsonResult
.
buildErrorStateResult
(
"
params invalid"
,
null
);
}
}
UserAssociationModel
bean
=
null
;
UserAssociationModel
bean
=
null
;
User
user
=
userService
.
findById
(
userId
);
User
user
=
userService
.
findById
(
userId
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/login/AuthInfoController.java
View file @
feccc210
...
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
* 查询已登录信息
* Created by Miraculous on 2016/12/30.
* Created by Miraculous on 2016/12/30.
*/
*/
@RestController
@RestController
...
...
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