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
eaa6722d
Commit
eaa6722d
authored
May 31, 2018
by
徐小光
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/firstSlaveDBuse' into 'master'
swagger See merge request
!17
parents
e73393dd
20f2f3a1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
745 deletions
+59
-745
ImageCaptchaController.java
...b/controller/external/captcha/ImageCaptchaController.java
+2
-1
NewCaptchaController.java
...yqb/controller/external/captcha/NewCaptchaController.java
+2
-0
MotanUserServiceImpl.java
.../xyqb/controller/external/motan/MotanUserServiceImpl.java
+0
-712
UserQueryLogController.java
.../controller/external/querylog/UserQueryLogController.java
+4
-0
AppController.java
...antgroup/xyqb/controller/external/user/AppController.java
+3
-3
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+36
-22
UserCenterController.java
...controller/external/user/center/UserCenterController.java
+12
-0
UserController.java
...ntgroup/xyqb/controller/internal/user/UserController.java
+0
-7
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/captcha/ImageCaptchaController.java
View file @
eaa6722d
...
...
@@ -45,7 +45,7 @@ public class ImageCaptchaController {
* 默认匹配 GET /captcha, 提供4位数字和字母混合图片验证码
*/
@RequestMapping
(
value
=
"/captcha"
)
@ApiOperation
(
value
=
"
/captcha"
,
notes
=
"获取图形验证码接口, 会返回一个base64的图形验证码
"
)
@ApiOperation
(
value
=
"
获取验证码"
,
notes
=
"获取图形验证码接口, 会返回一个base64的图形验证码"
,
httpMethod
=
"GET
"
)
public
JsonResult
fetchCaptcha
(
HttpServletRequest
request
)
{
String
imageId
=
UUID
.
randomUUID
().
toString
();
BufferedImage
challenge
=
imageCaptchaService
.
getImageChallengeForID
(
Constants
.
IMAGE_CAPTCHA_KEY
+
imageId
,
request
.
getLocale
());
...
...
@@ -71,6 +71,7 @@ public class ImageCaptchaController {
*/
@CaptchaValidator
@RequestMapping
(
"/verification_image_code"
)
@ApiOperation
(
value
=
"验证图形验证码"
,
notes
=
"验证图形验证码"
,
httpMethod
=
"POST"
)
public
JsonResult
verificationImageCode
()
{
return
JsonResult
.
buildSuccessResult
(
""
,
null
);
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/captcha/NewCaptchaController.java
View file @
eaa6722d
...
...
@@ -8,6 +8,7 @@ import cn.quantgroup.xyqb.service.captcha.IQuantgroupCaptchaService;
import
cn.quantgroup.xyqb.util.IPUtil
;
import
cn.quantgroup.xyqb.util.PasswordUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -38,6 +39,7 @@ public class NewCaptchaController {
@RequestMapping
(
value
=
"/captcha/new"
)
@ApiOperation
(
value
=
"获取新图形验证码"
,
notes
=
"获取新图形验证码"
,
httpMethod
=
"POST"
)
public
JsonResult
getCaptcha
(
String
phoneNo
,
String
clientType
,
HttpServletRequest
request
)
{
String
remoteIp
=
IPUtil
.
getRemoteIP
(
request
);
log
.
info
(
"获取验证码, phoneNo:{}, clientType:{}, ip:{}, verifyType-qg:{}"
,
phoneNo
,
clientType
,
remoteIp
,
geetestClose
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/motan/MotanUserServiceImpl.java
deleted
100644 → 0
View file @
e73393dd
package
cn
.
quantgroup
.
xyqb
.
controller
.
external
.
motan
;
import
cn.quantgroup.motan.bean.*
;
import
cn.quantgroup.motan.retbean.*
;
import
cn.quantgroup.motan.service.UserMotanService
;
import
cn.quantgroup.motan.vo.UserSysResult
;
import
cn.quantgroup.user.enums.*
;
import
cn.quantgroup.xyqb.Constants
;
import
cn.quantgroup.xyqb.entity.*
;
import
cn.quantgroup.xyqb.model.IdCardInfo
;
import
cn.quantgroup.xyqb.model.IdType
;
import
cn.quantgroup.xyqb.model.LoginProperties
;
import
cn.quantgroup.xyqb.model.UserRet
;
import
cn.quantgroup.xyqb.model.session.LoginInfo
;
import
cn.quantgroup.xyqb.model.session.SessionStruct
;
import
cn.quantgroup.xyqb.service.api.IUserApiService
;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.merchant.IMerchantService
;
import
cn.quantgroup.xyqb.service.register.IUserRegisterService
;
import
cn.quantgroup.xyqb.service.session.ISessionService
;
import
cn.quantgroup.xyqb.service.user.*
;
import
cn.quantgroup.xyqb.service.user.vo.UserDetailVO
;
import
cn.quantgroup.xyqb.service.wechat.IWechatService
;
import
cn.quantgroup.xyqb.session.XyqbSessionContextHolder
;
import
cn.quantgroup.xyqb.util.PasswordUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.DeserializationFeature
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
java.sql.Timestamp
;
import
java.text.ParseException
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Random
;
import
java.util.stream.Collectors
;
import
static
cn
.
quantgroup
.
xyqb
.
constant
.
UserConstant
.
USER_ERROR_OR_PASSWORD_ERROR
;
/**
* Created by 11 on 2017/2/27.
*/
@Slf4j
public
class
MotanUserServiceImpl
implements
UserMotanService
{
private
static
final
ObjectMapper
MAPPER
=
new
ObjectMapper
();
private
final
static
Random
random
=
new
Random
();
static
{
MAPPER
.
configure
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
,
false
);
}
@Autowired
private
IIdCardService
idCardService
;
@Autowired
private
IUserService
userService
;
@Autowired
private
IUserDetailService
userDetailService
;
@Autowired
private
IMerchantService
merchantService
;
@Autowired
private
ISessionService
sessionService
;
@Autowired
private
IContactService
contactService
;
@Autowired
private
IAddressService
addressService
;
@Autowired
private
IUserExtInfoService
userExtInfoService
;
@Autowired
private
IWechatService
wechatService
;
@Autowired
private
IUserSpouseService
userSpouseService
;
@Autowired
private
IUserApiService
userApiService
;
@Autowired
private
IUserRegisterService
userRegisterService
;
@Override
public
UserSysResult
<
XUser
>
saveUserRelatedInfo
(
UserRelatedBean
userRelatedBean
)
{
return
null
;
}
@Override
public
UserSysResult
<
XUser
>
findUserByPhoneNo
(
String
phoneNo
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
returnErrorValue
(
"手机号格式不正确"
);
}
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
return
returnSuccessValue
(
fromUser
(
user
));
}
@Override
public
UserSysResult
<
XUser
>
findUserByUuid
(
String
uuid
)
{
if
(
StringUtils
.
isBlank
(
uuid
))
{
return
returnErrorValue
(
"参数不能为空"
);
}
User
user
=
userService
.
findByUuidInDb
(
uuid
);
return
returnSuccessValue
(
fromUser
(
user
));
}
@Override
public
UserSysResult
<
XUser
>
saveUser
(
UserBean
userBean
)
{
if
(
null
==
userBean
||
!
ValidationUtil
.
validatePhoneNo
(
userBean
.
getPhoneNo
()))
{
return
returnErrorValue
(
userBean
==
null
?
"要保存的用户对象不能为null"
:
"手机号不正确"
);
}
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
User
user
=
userService
.
findByPhoneWithCache
(
userBean
.
getPhoneNo
());
if
(
user
==
null
)
{
user
=
new
User
();
user
.
setCreatedAt
(
now
);
user
.
setPhoneNo
(
userBean
.
getPhoneNo
());
user
.
setEnable
(
true
);
String
password
=
userBean
.
getPassword
();
if
(
StringUtils
.
isBlank
(
password
))
{
password
=
String
.
valueOf
(
random
.
nextInt
(
899999
)
+
100000
);
}
user
.
setPassword
(
PasswordUtil
.
MD5
(
password
+
Constants
.
PASSWORD_SALT
));
}
else
{
if
(
StringUtils
.
isNotBlank
(
user
.
getPassword
()))
{
user
.
setPassword
(
PasswordUtil
.
MD5
(
userBean
.
getPassword
()
+
Constants
.
PASSWORD_SALT
));
}
}
user
.
setUpdatedAt
(
now
);
user
.
setUuid
(
userBean
.
getUuid
());
user
.
setRegisteredFrom
(
null
==
userBean
.
getRegisteredFrom
()
?
0L
:
userBean
.
getRegisteredFrom
());
User
saveUser
=
userService
.
saveUser
(
user
);
return
returnSuccessValue
(
fromUser
(
saveUser
));
}
@Override
public
UserSysResult
<
XUserDetail
>
findUserDetailByUserId
(
Long
userId
)
{
if
(
userId
==
null
||
userId
<
1
)
{
return
returnErrorValue
(
"参数必须是正整数"
);
}
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
XUserDetail
xUserDetail
=
fromUserDetail
(
userDetail
);
return
returnSuccessValue
(
xUserDetail
);
}
private
XUserDetail
fromUserDetail
(
UserDetail
userDetail
)
{
return
userDetail
==
null
?
null
:
userDetail
.
toXUserDetail
();
}
private
XUserDetail
fromUserDetailVO
(
UserDetailVO
userDetail
)
{
return
userDetail
==
null
?
null
:
userDetail
.
toXUserDetail
();
}
private
XUser
fromUser
(
User
user
)
{
return
user
==
null
?
null
:
user
.
toXUser
();
}
@Override
public
UserSysResult
<
XUser
>
findUserByUserId
(
Long
id
)
{
if
(
id
==
null
||
id
<
1
)
{
return
returnErrorValue
(
"参数必须是正整数"
);
}
User
user
=
userService
.
findById
(
id
);
return
returnSuccessValue
(
fromUser
(
user
));
}
@Override
public
UserSysResult
<
XUserDetail
>
findUserDetailByPhone
(
String
phoneNo
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
returnErrorValue
(
"手机号格式不正确"
);
}
UserDetail
userDetail
=
userDetailService
.
findByPhoneNo
(
phoneNo
);
return
returnSuccessValue
(
fromUserDetail
(
userDetail
));
}
@Override
public
UserSysResult
<
XUserDetail
>
updateUserDetail
(
UserDetailUpdateBean
userDetailUpdateBean
)
{
if
(
null
==
userDetailUpdateBean
)
{
return
returnErrorValue
(
"要保存的用户详情对象不能为null"
);
}
UserDetail
userDetail
=
new
UserDetail
();
if
(!
ValidationUtil
.
validateChinese
(
userDetailUpdateBean
.
getName
()))
{
return
returnErrorValue
(
"用户姓名错误"
);
}
IdCardInfo
info
=
null
;
try
{
info
=
idCardService
.
getIdCardInfo
(
userDetailUpdateBean
.
getIdNo
());
}
catch
(
ParseException
ex
)
{
log
.
error
(
"用户身份证号错误, idNo: {}"
,
userDetailUpdateBean
.
getIdNo
(),
ex
);
}
if
(
Objects
.
isNull
(
info
)
||
!
info
.
isValid
())
{
return
returnErrorValue
(
"身份证号码错误"
);
}
if
(
null
!=
userDetailUpdateBean
.
getId
()
&&
userDetailUpdateBean
.
getId
()
>
0L
)
{
userDetail
.
setId
(
userDetailUpdateBean
.
getId
());
}
userDetail
.
setUserId
(
userDetailUpdateBean
.
getUserId
());
userDetail
.
setName
(
userDetailUpdateBean
.
getName
());
userDetail
.
setPhoneNo
(
userDetailUpdateBean
.
getPhoneNo
());
userDetail
.
setIdNo
(
userDetailUpdateBean
.
getIdNo
());
Timestamp
time
=
new
Timestamp
(
System
.
currentTimeMillis
());
userDetail
.
setCreatedAt
(
time
);
userDetail
.
setUpdatedAt
(
time
);
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
userDetail
.
setGender
(
info
.
getGender
());
userDetail
.
setEmail
(
userDetailUpdateBean
.
getEmail
());
userDetail
=
userDetailService
.
saveUserDetail
(
userDetail
);
if
(
userDetail
!=
null
)
{
XUserDetail
xUserDetail
=
convertObject
(
JSON
.
toJSONString
(
userDetail
),
new
TypeReference
<
XUserDetail
>()
{
});
return
returnSuccessValue
(
xUserDetail
);
}
return
returnErrorValue
(
"保存失败"
);
}
@Override
public
UserSysResult
<
XUserDetail
>
saveUserDetail
(
UserDetailSaveBean
userDetailSaveBean
)
{
if
(
userDetailSaveBean
==
null
)
{
return
returnErrorValue
(
"数据不能为空"
);
}
Long
userId
=
userDetailSaveBean
.
getUserId
();
if
(
userId
==
null
||
userId
==
0L
)
{
return
returnErrorValue
(
"用户id为空"
);
}
if
(
StringUtils
.
isBlank
(
userDetailSaveBean
.
getPhoneNo
()))
{
return
returnErrorValue
(
"用户手机号为空"
);
}
if
(
StringUtils
.
isBlank
(
userDetailSaveBean
.
getName
()))
{
return
returnErrorValue
(
"用户名为空"
);
}
if
(
StringUtils
.
isBlank
(
userDetailSaveBean
.
getIdNo
()))
{
return
returnErrorValue
(
"用户身份证为空"
);
}
if
(!
ValidationUtil
.
validateChinese
(
userDetailSaveBean
.
getName
()))
{
return
returnErrorValue
(
"用户姓名错误"
);
}
IdCardInfo
info
=
null
;
try
{
info
=
idCardService
.
getIdCardInfo
(
userDetailSaveBean
.
getIdNo
());
}
catch
(
ParseException
ex
)
{
log
.
error
(
"用户身份证号错误, idNo: {}"
,
userDetailSaveBean
.
getIdNo
(),
ex
);
}
if
(
Objects
.
isNull
(
info
)
||
!
info
.
isValid
())
{
return
returnErrorValue
(
"身份证号码错误"
);
}
Timestamp
time
=
new
Timestamp
(
System
.
currentTimeMillis
());
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
if
(
userDetail
==
null
)
{
userDetail
=
new
UserDetail
();
userDetail
.
setUserId
(
userId
);
userDetail
.
setCreatedAt
(
time
);
userDetail
.
setUpdatedAt
(
time
);
}
else
{
userDetail
.
setUpdatedAt
(
time
);
}
userDetail
.
setName
(
userDetailSaveBean
.
getName
());
userDetail
.
setPhoneNo
(
userDetailSaveBean
.
getPhoneNo
());
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
userDetail
.
setGender
(
info
.
getGender
());
userDetail
.
setIdNo
(
userDetailSaveBean
.
getIdNo
());
userDetail
.
setEmail
(
userDetailSaveBean
.
getEmail
());
userDetail
=
userDetailService
.
saveUserDetail
(
userDetail
);
if
(
userDetail
!=
null
)
{
return
returnSuccessValue
(
fromUserDetail
(
userDetail
));
}
return
returnErrorValue
(
"操作失败"
);
}
@Override
public
UserSysResult
<
XLoginInfo
>
appLoginAndFetchLoginInfo
(
AppLoginParam
appLoginParam
,
String
requestIp
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
appLoginParam
.
getPhoneNo
()))
{
return
returnErrorValue
(
"账户或者密码错误"
);
}
log
.
info
(
"第三方用户登录, loginFrom:{}, requestIp:{}"
,
appLoginParam
.
getRegisterFrom
(),
requestIp
);
User
user
=
userService
.
findByPhoneInDb
(
appLoginParam
.
getPhoneNo
());
if
(
user
==
null
)
{
user
=
userRegisterService
.
register
(
appLoginParam
.
getRegisterFrom
(),
appLoginParam
.
getPhoneNo
(),
appLoginParam
.
getIdNo
(),
appLoginParam
.
getName
(),
appLoginParam
.
getChannelId
());
}
if
(
user
==
null
)
{
return
returnErrorValue
(
"账户或者密码错误"
);
}
Merchant
merchant
=
merchantService
.
findMerchantByName
(
appLoginParam
.
getKey
());
if
(
merchant
==
null
)
{
return
returnErrorValue
(
"无效的商户"
);
}
LoginProperties
loginProperties
=
new
LoginProperties
();
loginProperties
.
setChannelId
(
appLoginParam
.
getChannelId
());
loginProperties
.
setMerchantName
(
merchant
.
getName
());
loginProperties
.
setCreatedFrom
(
appLoginParam
.
getRegisterFrom
());
loginProperties
.
setAppChannel
(
appLoginParam
.
getAppChannel
());
SessionStruct
sessionStruct
=
sessionService
.
createSessionAndPersist
(
user
,
loginProperties
);
LoginInfo
loginInfo
=
new
LoginInfo
();
loginInfo
.
setUser
(
new
UserRet
(
user
));
loginInfo
.
setToken
(
sessionStruct
.
getSid
());
LoginInfo
.
LoginContext
context
=
new
LoginInfo
.
LoginContext
();
context
.
setChannelId
(
sessionStruct
.
getValues
().
getLoginProperties
().
getChannelId
());
context
.
setCreatedFrom
(
sessionStruct
.
getValues
().
getLoginProperties
().
getCreatedFrom
());
context
.
setAppChannel
(
appLoginParam
.
getAppChannel
());
loginInfo
.
setLoginContext
(
context
);
log
.
info
(
"第三方用户获取信息登录成功, loginFrom:{}, phoneNo:{},appChannel:{}"
,
appLoginParam
.
getRegisterFrom
(),
appLoginParam
.
getPhoneNo
(),
appLoginParam
.
getAppChannel
());
XLoginInfo
xLoginInfo
=
convertObject
(
JSON
.
toJSONString
(
loginInfo
),
new
TypeReference
<
XLoginInfo
>()
{
});
return
returnSuccessValue
(
xLoginInfo
);
}
private
<
T
>
T
convertObject
(
String
json
,
TypeReference
typeReference
)
{
try
{
if
(
StringUtils
.
isEmpty
(
json
))
{
return
null
;
}
return
MAPPER
.
readValue
(
json
,
typeReference
);
}
catch
(
Exception
ex
)
{
log
.
error
(
"用户信息转换出错,json:{}"
,
json
,
ex
);
return
null
;
}
}
@Override
public
void
updateUserQQ
(
String
qq
,
Long
userId
)
{
if
(
StringUtils
.
isEmpty
(
qq
)
||
userId
==
null
||
userId
==
0L
)
{
log
.
error
(
"QQ或用户id非法,不允许修改:qq{}, userid:{}"
,
qq
,
userId
);
return
;
}
userDetailService
.
updateUserQQ
(
userId
,
qq
);
}
@Override
public
UserSysResult
<
List
<
XContact
>>
findContactsByUserId
(
Long
userId
)
{
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userId
,
true
);
List
<
XContact
>
xContacts
=
convertObject
(
JSON
.
toJSONString
(
contacts
),
new
TypeReference
<
List
<
XContact
>>()
{
});
return
returnSuccessValue
(
xContacts
);
}
@Override
public
UserSysResult
<
List
<
XContact
>>
saveContacts
(
Long
userId
,
List
<
XContact
>
contacts
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
return
returnErrorValue
(
"保存联系人列表失败,用户id为空"
);
}
if
(
CollectionUtils
.
isEmpty
(
contacts
))
{
return
returnErrorValue
(
"保存联系人列表失败,列表为空"
);
}
//做一次类型转换,
String
jsonContacts
=
JSON
.
toJSONString
(
contacts
);
List
<
Contact
>
contactList
=
null
;
try
{
contactList
=
MAPPER
.
readValue
(
jsonContacts
,
new
TypeReference
<
List
<
Contact
>>()
{
});
}
catch
(
Exception
e
)
{
log
.
error
(
"联系人列表转换错误"
,
e
);
return
returnErrorValue
(
"联系人转换错误"
);
}
for
(
Contact
c
:
contactList
)
{
if
(!
c
.
valid
())
{
log
.
info
(
"用户手机号或姓名错误, phoneNo:{},name:{}"
,
c
.
getPhoneNo
(),
c
.
getName
());
return
returnErrorValue
(
"用户手机号或姓名错误"
);
}
}
List
<
Contact
>
result
=
contactService
.
save
(
userId
,
contactList
);
List
<
XContact
>
xResult
=
convertObject
(
JSON
.
toJSONString
(
result
),
new
TypeReference
<
List
<
XContact
>>()
{
});
return
returnSuccessValue
(
xResult
);
}
@Override
public
UserSysResult
<
XAddress
>
findAddressByUserId
(
Long
userId
)
{
UserSysResult
<
XAddress
>
userSysResult
=
returnErrorValue
(
null
);
Address
address
=
addressService
.
findByUserId
(
userId
);
if
(
null
==
address
)
{
return
userSysResult
;
}
XAddress
xAddress
=
convertObject
(
JSON
.
toJSONString
(
address
),
new
TypeReference
<
XAddress
>()
{
});
return
returnSuccessValue
(
xAddress
);
}
@Override
public
UserSysResult
<
XAddress
>
saveAddress
(
Long
userId
,
Long
provinceCode
,
String
province
,
Long
cityCode
,
String
city
,
Long
districtCode
,
String
district
,
String
address
)
{
if
(
null
==
userId
||
null
==
provinceCode
||
null
==
cityCode
||
StringUtils
.
isBlank
(
address
))
{
return
returnErrorValue
(
"参数不能为空"
);
}
Address
addressObj
=
addressService
.
findByUserId
(
userId
);
if
(
addressObj
==
null
)
{
addressObj
=
new
Address
();
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
addressObj
.
setCreatedAt
(
now
);
addressObj
.
setUpdateAt
(
now
);
}
addressObj
.
setUserId
(
userId
);
addressObj
.
setProvinceCode
(
provinceCode
);
addressObj
.
setCityCode
(
cityCode
);
addressObj
.
setCity
(
city
);
addressObj
.
setDistrictCode
(
districtCode
);
addressObj
.
setDistrict
(
district
);
addressObj
.
setAddress
(
address
);
addressObj
.
setProvince
(
province
);
addressObj
=
addressService
.
save
(
addressObj
);
XAddress
xAddress
=
convertObject
(
JSON
.
toJSONString
(
addressObj
),
new
TypeReference
<
XAddress
>()
{
});
return
returnSuccessValue
(
xAddress
);
}
@Override
public
UserSysResult
<
XUserExtInfo
>
updateUserExtInfo
(
Long
userId
,
cn
.
quantgroup
.
motan
.
enums
.
IncomeEnum
incomeEnum
,
cn
.
quantgroup
.
motan
.
enums
.
IncomeRangeEnum
incomeRangeEnum
,
cn
.
quantgroup
.
motan
.
enums
.
OccupationEnum
occupationEnum
,
cn
.
quantgroup
.
motan
.
enums
.
EducationEnum
educationEnum
,
Boolean
hasCar
,
Boolean
hasSocialSecurity
,
Boolean
hasHouse
,
Boolean
hasCreditCard
,
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
maritalStatus
)
{
UserSysResult
<
XUserExtInfo
>
userSysResult
=
returnValue
(
null
,
null
);
if
(
null
==
userId
||
0L
==
userId
)
{
return
returnErrorValue
(
"用户id为空"
);
}
UserExtInfo
info
=
userExtInfoService
.
findByUserId
(
userId
);
if
(
info
==
null
)
{
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
info
=
new
UserExtInfo
();
info
.
setUserId
(
userId
);
info
.
setCreatedAt
(
now
);
info
.
setUpdateAt
(
now
);
}
if
(
incomeEnum
!=
null
)
{
info
.
setIncomeEnum
(
IncomeEnum
.
valueOf
(
incomeEnum
.
name
()));
}
if
(
incomeRangeEnum
!=
null
)
{
info
.
setIncomeRangeEnum
(
IncomeRangeEnum
.
valueOf
(
incomeRangeEnum
.
name
()));
}
if
(
occupationEnum
!=
null
)
{
info
.
setOccupationEnum
(
OccupationEnum
.
valueOf
(
occupationEnum
.
name
()));
}
if
(
educationEnum
!=
null
)
{
info
.
setEducationEnum
(
EducationEnum
.
valueOf
(
educationEnum
.
name
()));
}
if
(
hasCar
!=
null
)
{
info
.
setHasCar
(
hasCar
);
}
if
(
hasCreditCard
!=
null
)
{
info
.
setHasCreditCard
(
hasCreditCard
);
}
if
(
hasHouse
!=
null
)
{
info
.
setHasHouse
(
hasHouse
);
}
if
(
maritalStatus
!=
null
)
{
info
.
setMarryStatus
(
MaritalStatus
.
valueOf
(
maritalStatus
.
name
()));
}
info
=
userExtInfoService
.
save
(
info
);
XUserExtInfo
userExtInfo
=
convertObject
(
JSON
.
toJSONString
(
info
),
new
TypeReference
<
XUserExtInfo
>()
{
});
return
returnSuccessValue
(
userExtInfo
);
}
@Override
public
UserSysResult
<
String
>
queryOpenIdByXyqbUserId
(
Long
userId
)
{
if
(
userId
==
null
||
userId
<
1
)
{
return
returnErrorValue
(
"用户id不能为空"
);
}
WechatUserInfo
wechatUserInfo
=
wechatService
.
queryByUserId
(
userId
);
if
(
wechatUserInfo
==
null
)
{
return
returnErrorValue
(
"wechat信息为空"
);
}
return
returnValue
(
wechatUserInfo
.
getOpenId
(),
"success"
);
}
@Override
public
UserSysResult
<
Boolean
>
disableUser
(
Long
userId
)
{
if
(
null
==
userId
||
0L
==
userId
)
{
throw
new
RuntimeException
(
"userId不能为空"
);
}
User
user
=
userService
.
findById
(
userId
);
if
(
null
==
user
)
{
throw
new
RuntimeException
(
"未查询到该用户,用户id:"
+
userId
);
}
user
.
setEnable
(
false
);
user
.
setUpdatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
log
.
info
(
"注销用户的信息,userId={}"
,
userId
);
user
=
userService
.
saveUser
(
user
);
if
(!
user
.
getEnable
())
{
sessionService
.
deleteByUserId
(
userId
);
}
return
returnSuccessValue
(
Boolean
.
TRUE
);
}
@Override
public
UserSysResult
<
String
>
queryOpenIdByPhoneNo
(
String
phoneNo
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
returnErrorValue
(
"手机号格式不正确"
);
}
WechatUserInfo
wechatUserInfo
=
wechatService
.
findWechatUserInfoByPhoneNo
(
phoneNo
);
String
openId
=
null
==
wechatUserInfo
?
null
:
wechatUserInfo
.
getOpenId
();
return
returnSuccessValue
(
openId
);
}
@Override
public
UserSysResult
<
UserRegisterTrace
>
findRegisterTraceByPhoneNo
(
String
phoneNo
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
returnErrorValue
(
"手机号格式不正确"
);
}
return
null
;
}
@Override
public
UserSysResult
<
XUserSpouse
>
findUserSpouseByUserId
(
Long
userId
)
{
if
(
userId
==
null
||
userId
==
0
)
{
return
returnErrorValue
(
"用户不能为空"
);
}
UserSpouse
userSpouse
=
userSpouseService
.
findByUserId
(
userId
);
if
(
userSpouse
==
null
||
!
userSpouse
.
valid
())
{
userSpouse
=
new
UserSpouse
(
userId
);
userSpouse
.
setStatus
(
MaritalStatus
.
UNKNOWN
);
}
return
returnSuccessValue
(
fromUserSpouse
(
userSpouse
));
}
private
XUserSpouse
fromUserSpouse
(
UserSpouse
userSpouse
)
{
if
(
userSpouse
==
null
)
{
return
null
;
}
XUserSpouse
xUserSpouse
=
new
XUserSpouse
();
xUserSpouse
.
setUserId
(
userSpouse
.
getUserId
());
xUserSpouse
.
setSpousePhone
(
userSpouse
.
getSpousePhone
());
xUserSpouse
.
setSpouseName
(
userSpouse
.
getSpouseName
());
xUserSpouse
.
setCreatedAt
(
userSpouse
.
getCreatedAt
());
xUserSpouse
.
setUpdateAt
(
userSpouse
.
getUpdateAt
());
xUserSpouse
.
setStatus
(
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
valueOf
(
userSpouse
.
getStatus
().
name
()));
return
xUserSpouse
;
}
@Override
public
UserSysResult
<
XUserExtInfo
>
findUserExtInfoByUserId
(
Long
userId
)
{
if
(
userId
==
null
)
{
return
returnErrorValue
(
"userId不能为空"
);
}
UserExtInfo
userExtInfo
=
userExtInfoService
.
findByUserId
(
userId
);
if
(
userExtInfo
==
null
)
{
return
returnErrorValue
(
"未找到用户扩展信息"
);
}
return
returnSuccessValue
(
fromUserExtInfo
(
userExtInfo
));
}
private
XUserExtInfo
fromUserExtInfo
(
UserExtInfo
userExtInfo
)
{
return
null
==
userExtInfo
?
null
:
userExtInfo
.
toXUserExtInfo
();
}
@Override
public
UserSysResult
<
List
<
XUserDetail
>>
queryUserDetailBySpecification
(
String
name
,
String
phoneNo
,
String
idNo
)
{
List
<
UserDetailVO
>
userDetails
=
userDetailService
.
searchUserDetailList
(
name
,
phoneNo
,
idNo
);
if
(
CollectionUtils
.
isEmpty
(
userDetails
))
{
return
null
;
}
List
<
XUserDetail
>
xUserDetails
=
userDetails
.
stream
().
map
(
this
::
fromUserDetailVO
).
collect
(
Collectors
.
toList
());
return
returnSuccessValue
(
xUserDetails
);
}
@Override
public
UserSysResult
<
String
>
loginWithUuid
(
String
uuid
)
{
return
returnErrorValue
(
"MotanUserServiceImpl loginWithUuid(String uuid) need to be finish."
);
}
@Override
public
UserSysResult
<
Boolean
>
userImportCheck
(
String
phoneNo
,
String
registerFrom
)
{
if
(
"244"
.
equals
(
registerFrom
))
{
return
returnErrorValue
(
"用户导入检查拒绝"
);
}
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isEmpty
(
phoneNo
)
||
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isEmpty
(
registerFrom
))
{
return
returnErrorValue
(
"检查传入的参数,参数不全。"
);
}
boolean
checkPassed
=
userApiService
.
userImportCheck
(
phoneNo
);
if
(
checkPassed
)
{
return
returnValue
(
Boolean
.
TRUE
,
"success"
);
}
return
returnErrorValue
(
"用户导入检查拒绝"
);
}
@Override
public
UserSysResult
<
XUserSpouse
>
saveUserSpouse
(
XUserSpouse
xUserSpouse
)
{
if
(
xUserSpouse
.
getUserId
()
==
null
||
xUserSpouse
.
getUserId
()
==
0
)
{
return
returnErrorValue
(
"用户不能为空"
);
}
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
status
=
xUserSpouse
.
getStatus
();
String
spousePhone
=
xUserSpouse
.
getSpousePhone
();
String
spouseName
=
xUserSpouse
.
getSpouseName
();
if
(
xUserSpouse
.
getStatus
()
==
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
MARRIED
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
spousePhone
))
{
return
returnErrorValue
(
"手机号格式错误"
);
}
if
(!
ValidationUtil
.
validateChinese
(
spouseName
))
{
return
returnErrorValue
(
"配偶姓名错误"
);
}
}
UserSpouse
userSpouse
=
userSpouseService
.
findByUserId
(
xUserSpouse
.
getUserId
());
Timestamp
timestamp
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
userSpouse
==
null
)
{
userSpouse
=
new
UserSpouse
(
xUserSpouse
.
getUserId
());
userSpouse
.
setCreatedAt
(
timestamp
);
}
userSpouse
.
setSpouseName
(
status
==
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
MARRIED
?
spouseName
:
""
);
userSpouse
.
setSpousePhone
(
status
==
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
MARRIED
?
spousePhone
:
""
);
userSpouse
.
setStatus
(
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
valueOf
(
status
.
name
()));
userSpouse
.
setUpdateAt
(
timestamp
);
userSpouse
=
userSpouseService
.
save
(
userSpouse
);
return
returnSuccessValue
(
fromUserSpouse
(
userSpouse
));
}
@Override
public
UserSysResult
<
AppLoginResultBean
>
appLogin
(
AppLoginParam
appLoginParam
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
appLoginParam
.
getPhoneNo
()))
{
throw
new
RuntimeException
(
USER_ERROR_OR_PASSWORD_ERROR
);
}
log
.
info
(
"第三方用户登录, appLoginParam:{} "
,
appLoginParam
);
User
user
=
userService
.
findByPhoneInDb
(
appLoginParam
.
getPhoneNo
());
if
(
user
==
null
)
{
user
=
userRegisterService
.
register
(
appLoginParam
.
getRegisterFrom
(),
appLoginParam
.
getPhoneNo
(),
appLoginParam
.
getIdNo
(),
appLoginParam
.
getName
(),
appLoginParam
.
getChannelId
());
}
if
(
user
==
null
)
{
throw
new
RuntimeException
(
USER_ERROR_OR_PASSWORD_ERROR
);
}
if
(!
user
.
getEnable
())
{
throw
new
RuntimeException
(
"登录失败"
);
}
Merchant
merchant
=
merchantService
.
findMerchantByName
(
appLoginParam
.
getKey
());
if
(
merchant
==
null
)
{
throw
new
RuntimeException
(
"无效的商户"
);
}
LoginProperties
loginProperties
=
new
LoginProperties
();
loginProperties
.
setChannelId
(
appLoginParam
.
getChannelId
());
loginProperties
.
setMerchantName
(
merchant
.
getName
());
loginProperties
.
setCreatedFrom
(
appLoginParam
.
getRegisterFrom
());
loginProperties
.
setAppChannel
(
appLoginParam
.
getAppChannel
());
SessionStruct
sessionStruct
=
sessionService
.
createSessionAndPersist
(
user
,
loginProperties
);
AppLoginResultBean
appLoginResultBean
=
new
AppLoginResultBean
();
appLoginResultBean
.
setToken
(
sessionStruct
.
getSid
());
appLoginResultBean
.
setPhoneNo
(
appLoginParam
.
getPhoneNo
());
log
.
info
(
"第三方用户登录成功, loginFrom:{}, phoneNo:{},appChannel:{}"
,
appLoginParam
.
getRegisterFrom
(),
appLoginParam
.
getPhoneNo
(),
appLoginParam
.
getAppChannel
());
return
returnSuccessValue
(
appLoginResultBean
);
}
@Override
public
UserSysResult
<
XLoginInfo
>
getLoginInfo
(
String
token
)
{
SessionStruct
sessionStruct
=
XyqbSessionContextHolder
.
getXSessionFromRedis
(
token
);
if
(
null
!=
sessionStruct
)
{
log
.
info
(
"从用户中心获取到了用户登录信息:phone:[{}]"
,
sessionStruct
.
getValues
().
getUser
().
getPhoneNo
());
XLoginInfo
loginInfo
=
new
XLoginInfo
();
loginInfo
.
setUser
(
sessionStruct
.
getValues
().
getUser
().
toXUser
());
loginInfo
.
setToken
(
sessionStruct
.
getSid
());
LoginContext
context
=
new
LoginContext
();
context
.
setChannelId
(
sessionStruct
.
getValues
().
getLoginProperties
().
getChannelId
());
context
.
setCreatedFrom
(
sessionStruct
.
getValues
().
getLoginProperties
().
getCreatedFrom
());
context
.
setAppChannel
(
sessionStruct
.
getValues
().
getLoginProperties
().
getAppChannel
());
loginInfo
.
setLoginContext
(
context
);
return
returnSuccessValue
(
loginInfo
);
}
return
returnErrorValue
(
"用户未登录"
);
}
/**
* 封装返回结果.
*
* @param t
* @param message
* @param <T>
* @return
*/
private
<
T
>
UserSysResult
<
T
>
returnValue
(
T
t
,
String
message
)
{
UserSysResult
<
T
>
userSysResult
=
new
UserSysResult
();
userSysResult
.
setMsg
(
message
);
/**
* 无返回结果时,返回的code和BusinessCode均是0001
*/
if
(
null
==
t
)
{
userSysResult
.
setBusinessCode
(
"0001"
);
userSysResult
.
setCode
(
"0001"
);
}
else
{
userSysResult
.
setBusinessCode
(
"0000"
);
userSysResult
.
setCode
(
"0000"
);
}
userSysResult
.
setData
(
t
);
return
userSysResult
;
}
private
<
T
>
UserSysResult
<
T
>
returnErrorValue
(
String
message
)
{
return
returnValue
(
null
,
message
);
}
private
<
T
>
UserSysResult
<
T
>
returnSuccessValue
(
T
t
)
{
return
returnValue
(
t
,
""
);
}
@Override
public
UserSysResult
<
XUserDetail
>
modifyUserDetail
(
UserDetailUpdateBean
userDetailUpdateBean
)
{
return
returnErrorValue
(
"MotanUserServiceImpl modifyUserDetail(UserDetailUpdateBean userDetailUpdateBean) need to be finish."
);
}
@Override
public
UserSysResult
<
Map
<
Long
,
String
>>
findPhoneByUserIds
(
List
<
Long
>
userIds
)
{
if
(!
CollectionUtils
.
isEmpty
(
userIds
)
&&
userIds
.
size
()
<=
500
)
{
Map
<
Long
,
String
>
userIdAndPhoneMap
=
userService
.
findPhoneByIdsInDb
(
userIds
);
return
returnSuccessValue
(
userIdAndPhoneMap
);
}
else
{
return
returnErrorValue
(
"批量查询每次最多进行500条用户信息的查询"
);
}
}
}
src/main/java/cn/quantgroup/xyqb/controller/external/querylog/UserQueryLogController.java
View file @
eaa6722d
...
...
@@ -16,6 +16,7 @@ import cn.quantgroup.xyqb.util.ValidationUtil;
import
cn.quantgroup.xyqb.util.encrypt.MD5Util
;
import
cn.quantgroup.xyqb.util.encrypt.RSA
;
import
com.google.gson.*
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.poi.hssf.usermodel.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -65,6 +66,7 @@ public class UserQueryLogController {
private
static
final
String
PRIVATE_KEY
=
"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJiLDU8pacJuQrLMcr5uUekpNH+q07c6rue+NJ1yikJKY4mqOLcH6okyt/TfbjaZgkhB4XdhJNBlN+uLkSQ2CiqfRj8piksAq6rz2M90iQHeW+Ku97D22l9sBPgHXhaChZ0wfmiioG3SXLd/4mOgEzl0oVM6uFySEUOhoHdQBpqJAgMBAAECgYA3DfCWwoaWEr9l0p4TFrPfZ+y3qwrQVZCsuRw6Ow2lUT3NgK8JeATw0WpNKZqYgBziQUzDjj8AK5fcHjobDJnsKGqC2VQ+j05hQZztoHTrYxOx6xrGxIzqmbt/dPsw779xXSRJu3DuUeCm6CrGZpVpPX/NtXBxIhXRY2KRNa1SZQJBAPMboc+M6/OeGPQqFvXg9jgEWcosBpy6HtukfjONQAVuM5e0pZa8SQCLhcoHgbbqcEhbDAJEqr9x9eZjjFPSt08CQQCgoe/hOVf0s5oo1IM1TVEUkGOIzVVlyTMwu0p4jwt3987D7BKZe7mCl41quWDwL4JIQ0GcivVMpJzYsDBZHRqnAkBMgCKAHHlXdSWnF+OXxg3U/NGAhDAke5EgTvgDouxFiTMlBwygjWlviXg1Zf1UoRtqOXRi9lbA3cyijirnacSTAkBmve0ug30MmOvbfcHGkANyQcBIOf2LMxu46bKCVgwh2bC4hACJhydqrgDX6GZmehy8l7gZpo+rTAa+WkMyXHk1AkEArt6ElkyNI7TDu0By59Zin05tuZJr6QoMXs9bVH+xP3OBG1KfPYTBc9yb5MOjXIxAjyGGeDpUfhuUDBe56GTOBA=="
;
@RequestMapping
(
"/queryLog"
)
@ApiOperation
(
value
=
"给运营系统提供的查询查询记录的"
,
notes
=
"给运营系统提供的查询查询记录的"
,
httpMethod
=
"POST"
)
public
JsonResult
queryLog
(
HttpServletRequest
request
,
@RequestParam
(
required
=
false
)
String
beginDate
,
@RequestParam
(
required
=
false
)
String
endDate
,
Integer
pageId
,
Integer
pageSize
)
{
LOGGER
.
info
(
"查询日期:beginDate{},endDate{}"
,
beginDate
,
endDate
);
String
token
=
request
.
getHeader
(
Constants
.
X_AUTH_TOKEN
);
...
...
@@ -124,6 +126,7 @@ public class UserQueryLogController {
}
@RequestMapping
(
"/queryUserInfo"
)
@ApiOperation
(
value
=
"给运营系统提供的查询用户信息的接口"
,
notes
=
"给运营系统提供的查询用户信息的接口"
,
httpMethod
=
"POST"
)
public
JsonResult
queryForResult
(
HttpServletRequest
request
,
String
key
,
String
keyValues
,
String
columns
,
Integer
pageId
,
Integer
pageSize
)
{
LOGGER
.
info
(
"查询条件:key{},columns{}"
,
key
,
columns
);
String
token
=
request
.
getHeader
(
Constants
.
X_AUTH_TOKEN
);
...
...
@@ -331,6 +334,7 @@ public class UserQueryLogController {
}
@RequestMapping
(
"/exportUserInfo"
)
@ApiOperation
(
value
=
"给运营系统提供的导出用户信息的接口"
,
notes
=
"给运营系统提供的导出用户信息的接口"
,
httpMethod
=
"POST"
)
public
JsonResult
exportExcel
(
final
HttpServletResponse
response
,
HttpServletRequest
request
,
String
key
,
String
keyValues
,
String
columns
)
{
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/AppController.java
View file @
eaa6722d
...
...
@@ -61,10 +61,9 @@ public class AppController implements IBaseController {
* @param request
* @return Token和phoneNo
*/
@IpValidator
@RequestMapping
(
"/login"
)
@ApiOperation
(
value
=
"
/login"
,
notes
=
"App登陆
"
)
@ApiOperation
(
value
=
"
App登陆"
,
notes
=
"App登陆"
,
httpMethod
=
"POST
"
)
public
JsonResult
login
(
String
phoneNo
,
String
idNo
,
String
name
,
String
key
,
...
...
@@ -76,7 +75,6 @@ public class AppController implements IBaseController {
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
// Todo -- 截止2017-12-08 13:44:00只有52次调用记录,来自222(白条),最近一次:2017-11-11 12:15:53
LOGGER
.
info
(
"第三方用户登录 [AppController] login --> loginFrom:{},channelId:{},btRegisterChannelId:{} requestIp:{},idNo:{},name:{}"
,
registerFrom
,
channelId
,
btRegisterChannelId
,
IPUtil
.
getRemoteIP
(
request
),
idNo
,
name
);
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
if
(
user
==
null
)
{
...
...
@@ -123,6 +121,7 @@ public class AppController implements IBaseController {
@IpValidator
@RequestMapping
(
"/login_super"
)
@ApiOperation
(
value
=
"免密登陆, 新手机号还自动注册"
,
notes
=
"免密登陆, 新手机号还自动注册"
,
httpMethod
=
"POST"
)
public
JsonResult
loginSuper
(
String
phoneNo
,
String
idNo
,
String
name
,
String
key
,
...
...
@@ -190,6 +189,7 @@ public class AppController implements IBaseController {
@IpValidator
@RequestMapping
(
"/login2"
)
@ApiOperation
(
value
=
"免密登陆, 新手机号不自动注册"
,
notes
=
"免密登陆, 新手机号不自动注册"
,
httpMethod
=
"POST"
)
public
JsonResult
login2
(
String
phoneNo
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
registerFrom
,
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
eaa6722d
...
...
@@ -89,6 +89,7 @@ public class InnerController implements IBaseController {
};
@RequestMapping
(
"/user/search/phoneNo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据手机号查询用户信息"
)
public
JsonResult
findByPhoneNo
(
String
phoneNo
)
{
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
if
(
user
==
null
)
{
...
...
@@ -100,6 +101,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user/search/uuid"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据UUID查询用户信息"
)
public
JsonResult
findByUuid
(
String
uuid
)
{
User
user
=
userService
.
findByUuidWithCache
(
uuid
);
if
(
user
==
null
)
{
...
...
@@ -110,6 +112,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/userInfo/search/uuid"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据UUID查询用户详细信息"
)
public
JsonResult
findUserInfoByUuid
(
@RequestParam
(
value
=
"uuid"
)
String
uuid
)
{
log
.
info
(
"需要查询的用户uuidid, uuid:"
+
uuid
);
...
...
@@ -129,6 +132,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/userInfo/search/phone"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据手机号查询用户详细信息"
)
public
JsonResult
findUserInfoByPhone
(
@RequestParam
(
value
=
"phone"
)
String
phone
)
{
log
.
info
(
"需要查询的用户phone, phone:"
+
phone
);
...
...
@@ -148,6 +152,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user/getPhoneByUserIds"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据用户 ID 批量查询用户信息"
)
public
JsonResult
findByIds
(
@RequestParam
(
value
=
"userIds"
)
String
userIdsString
)
{
log
.
info
(
"批量查询用户的手机号列表, userIdsString:"
+
userIdsString
);
if
(
StringUtils
.
isEmpty
(
userIdsString
))
{
...
...
@@ -164,6 +169,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"注册用户"
)
public
JsonResult
saveUser
(
String
phoneNo
,
Long
registeredFrom
,
Long
createdAt
,
Long
updatedAt
,
String
password
,
String
uuid
)
{
...
...
@@ -215,6 +221,7 @@ public class InnerController implements IBaseController {
* 适用于:创建 或 修改
*/
@RequestMapping
(
"/user_detail/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"填写用户详情"
)
public
JsonResult
saveUserDetail
(
Long
userId
,
String
phoneNo
,
String
name
,
String
idNo
,
String
email
,
String
qq
)
{
log
.
info
(
"保存用户详细信息,[saveUserDetail] userId:{},phoneNo:{},name:{},idNo:{},email:{},qq:{}"
,
userId
,
phoneNo
,
name
,
idNo
,
email
,
qq
);
...
...
@@ -285,6 +292,7 @@ public class InnerController implements IBaseController {
* 根据用户id查询用户的详细信息
*/
@RequestMapping
(
"/user_detail/search/userId"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询用户详情"
)
public
JsonResult
findUserDetailByUserId
(
Long
userId
)
{
UserDetail
userDetail
=
null
;
// 增加容错性,防备DB中存在的脏数据触发异常
...
...
@@ -298,6 +306,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user/search/userId"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询用户基本信息"
)
public
JsonResult
findUserByUserId
(
Long
userId
)
{
User
user
=
userService
.
findById
(
userId
);
if
(
user
!=
null
)
{
...
...
@@ -307,6 +316,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user_detail/search/phone"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询用户详情"
)
public
JsonResult
findUserDetailByPhone
(
String
phoneNo
)
{
UserDetail
userDetail
=
userDetailService
.
findByPhoneNo
(
phoneNo
);
if
(
userDetail
!=
null
)
{
...
...
@@ -322,6 +332,7 @@ public class InnerController implements IBaseController {
* @return
*/
@RequestMapping
(
"/user_full_info/search/phone"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询用户全部信息(user+detail)"
)
public
JsonResult
findUserFullInfoByPhone
(
String
phoneNo
)
{
if
(
StringUtils
.
isBlank
(
phoneNo
))
{
log
.
warn
(
"[findUserFullInfoByPhone]phoneNo为空"
);
...
...
@@ -342,6 +353,7 @@ public class InnerController implements IBaseController {
* @return
*/
@RequestMapping
(
"/user_full_info/search/uuid"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询用户全部信息(user+detail)"
)
public
JsonResult
findUserFullInfoByUUuid
(
String
uuid
)
{
if
(
StringUtils
.
isBlank
(
uuid
))
{
log
.
warn
(
"[findUserFullInfoByUUuid]uuid为空"
);
...
...
@@ -364,6 +376,7 @@ public class InnerController implements IBaseController {
* @return
*/
@RequestMapping
(
"/user_detail/update"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新用户详情"
)
public
JsonResult
updateUserDetail
(
String
qq
,
String
email
,
Long
userId
)
{
if
(
Objects
.
isNull
(
userId
)
||
userId
==
0L
)
{
return
JsonResult
.
buildErrorStateResult
(
"userId为空"
,
null
);
...
...
@@ -378,6 +391,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user_detail/update/qq"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新用户QQ"
)
public
JsonResult
updateUserQQ
(
String
qq
,
Long
userId
)
{
if
(
StringUtils
.
isEmpty
(
qq
)
||
userId
==
null
||
userId
==
0L
)
{
return
JsonResult
.
buildErrorStateResult
(
"参数校验失败,qq或用户id为空"
,
null
);
...
...
@@ -387,6 +401,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/contact/search/user_id"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询用户联系人"
)
public
JsonResult
findContactsByUserId
(
Long
userId
)
{
if
(
null
==
userId
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
...
...
@@ -399,6 +414,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/contact/save/contacts"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"保存联系人"
)
public
JsonResult
save2Contact
(
Long
userId
,
@RequestParam
(
value
=
"contacts"
)
String
contactsStr
)
{
if
(
Objects
.
isNull
(
userId
)
||
StringUtils
.
isBlank
(
contactsStr
))
{
log
.
warn
(
"保存用户联系人:参数不完整:userId:{}, contacts:{}"
,
userId
,
contactsStr
);
...
...
@@ -422,6 +438,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/contact/update/contact"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新用户联系人"
)
public
JsonResult
updateContact
(
@RequestParam
Long
contactId
,
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
phoneNo
,
@RequestParam
(
required
=
false
)
Relation
relation
,
String
key
,
...
...
@@ -455,6 +472,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/address/search/user_id"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询用户地址"
)
public
JsonResult
findAddressByUserId
(
Long
userId
)
{
if
(
userId
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
...
...
@@ -467,6 +485,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/address/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"保存用户地址"
)
public
JsonResult
saveAddress
(
Long
userId
,
Long
provinceCode
,
Long
cityCode
,
String
city
,
Long
districtCode
,
String
district
,
String
address
,
String
province
)
{
...
...
@@ -500,6 +519,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user_ext_info/update"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新用户扩展信息"
)
public
JsonResult
updateMarryStatus
(
Long
userId
,
IncomeEnum
incomeEnum
,
IncomeRangeEnum
incomeRangeEnum
,
OccupationEnum
occupationEnum
,
EducationEnum
educationEnum
,
Boolean
hasCar
,
...
...
@@ -550,6 +570,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user_detail/search_list"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量查询用户详情"
)
@TargetDataSource
(
type
=
DSType
.
SLAVE
)
public
JsonResult
searchUserDetailList
(
String
name
,
String
phoneNo
,
String
idNo
)
{
log
.
info
(
"searchUserDetailList ,param.name:{},phone:{},idNo:{},ip:{}"
,
name
,
phoneNo
,
idNo
,
getIp
());
...
...
@@ -562,6 +583,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user_ext_info/search/user_id"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询用户扩展信息"
)
public
JsonResult
searchUserExtInfoByUserId
(
Long
userId
)
{
if
(
userId
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
"userId不能为空"
,
null
);
...
...
@@ -574,6 +596,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user/query/openId"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询微信openId"
)
public
JsonResult
queryOpenIdByUserId
(
Long
userId
)
{
if
(
userId
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
"userId不能为空"
,
null
);
...
...
@@ -599,6 +622,7 @@ public class InnerController implements IBaseController {
* }
*/
@RequestMapping
(
"/user-association/search"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询用户user+userDetail"
)
public
JsonResult
findUserAssociationModel
(
Long
id
,
String
phoneNo
,
String
uuid
)
{
User
user
=
null
;
if
(!
Objects
.
isNull
(
id
)
&&
id
>
0
)
{
...
...
@@ -834,28 +858,8 @@ public class InnerController implements IBaseController {
return
Objects
.
equals
(
enable
,
user
.
getEnable
());
}
/**
* 清除用户缓存信息
*
* @param phoneNo
* @return
*/
@RequestMapping
(
"/flush/cache"
)
public
JsonResult
flushCache
(
String
phoneNo
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
"手机号格式错误"
,
null
);
}
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
if
(
null
==
user
)
{
return
JsonResult
.
buildErrorStateResult
(
"未查询到该用户,用户phoneNo:"
+
phoneNo
,
null
);
}
sessionService
.
deleteByUserId
(
user
.
getId
());
sessionService
.
deleteUserCatch
(
user
);
log
.
info
(
"删除用户缓存信息,phoneNo:{},userId:{},"
,
user
.
getPhoneNo
(),
user
.
getId
());
return
JsonResult
.
buildSuccessResult
(
"用户缓存信息已经删除"
,
null
);
}
@RequestMapping
(
"/user/spouse/save"
)
@ApiOperation
(
value
=
"保存配偶信息"
,
httpMethod
=
"POST"
)
public
JsonResult
saveSpouse
(
Long
userId
,
MaritalStatus
status
,
String
spousePhone
,
String
spouseName
)
{
if
(
userId
==
null
||
userId
==
0
)
{
return
JsonResult
.
buildErrorStateResult
(
"用户不能为空"
,
null
);
...
...
@@ -883,6 +887,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user/spouse/findByUserId"
)
@ApiOperation
(
value
=
"查询配偶信息"
,
httpMethod
=
"POST"
)
public
JsonResult
querySpouse
(
Long
userId
)
{
if
(
userId
==
null
||
userId
==
0
)
{
return
JsonResult
.
buildErrorStateResult
(
"用户不能为空"
,
null
);
...
...
@@ -896,6 +901,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user/findByPhones"
)
@ApiOperation
(
value
=
"根据手机号查询用户信息"
,
httpMethod
=
"POST"
)
public
JsonResult
getUserIdByPhones
(
@RequestParam
(
"userPhones"
)
String
userPhones
)
{
if
(
StringUtils
.
isBlank
(
userPhones
))
{
return
JsonResult
.
buildErrorStateResult
(
"传入用户手机号不可为空"
,
null
);
...
...
@@ -903,7 +909,7 @@ public class InnerController implements IBaseController {
List
<
String
>
phones
=
JSONObject
.
parseObject
(
userPhones
,
new
TypeReference
<
List
<
String
>>()
{
});
if
(
org
.
apache
.
commons
.
collections
.
CollectionUtils
.
isNotEmpty
(
phones
))
{
if
(!(
phones
.
size
()
>
500
))
{
if
(!(
phones
.
size
()
>
MAX_SIZE
))
{
List
<
User
>
users
=
userService
.
findByPhones
(
phones
);
if
(
org
.
apache
.
commons
.
collections
.
CollectionUtils
.
isNotEmpty
(
users
))
{
return
JsonResult
.
buildSuccessResult
(
null
,
users
.
stream
().
collect
(
Collectors
.
toMap
(
User:
:
getPhoneNo
,
User:
:
getId
)));
...
...
@@ -926,6 +932,8 @@ public class InnerController implements IBaseController {
* @return
*/
@RequestMapping
(
"/uuid/findByPhones"
)
@ApiOperation
(
value
=
"根据手机号批量查询UUID"
,
httpMethod
=
"POST"
)
@TargetDataSource
(
type
=
DSType
.
SLAVE
)
public
JsonResult
getUuidsByPhones
(
@RequestParam
(
"userPhones"
)
String
userPhones
)
{
if
(
StringUtils
.
isBlank
(
userPhones
))
{
...
...
@@ -960,6 +968,7 @@ public class InnerController implements IBaseController {
* 保存用户信息,其中地址信息和联系人信息为非必要条件;注意:如果同时提供了province和address字段则需要保证Address的完整
*/
@RequestMapping
(
"/user/save_multi"
)
@ApiOperation
(
value
=
"保存多种用户信息"
,
httpMethod
=
"POST"
)
public
JsonResult
saveMulti
(
String
registeredFrom
,
String
channelId
,
...
...
@@ -1048,6 +1057,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/user/register"
)
@ApiOperation
(
value
=
"用户注册"
,
httpMethod
=
"POST"
)
public
JsonResult
register
(
String
phoneNo
,
String
password
,
Long
channelId
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
"手机号不正确"
,
null
);
...
...
@@ -1065,6 +1075,7 @@ public class InnerController implements IBaseController {
//根据日期时间段查询新注册用户信息并返回
@RequestMapping
(
"/contract/queryRegisterUsers"
)
@ApiOperation
(
value
=
"根据日期时间段查询新注册用户信息并返回"
,
httpMethod
=
"POST"
)
public
JsonResult
findRegisterUserByTime
(
String
beginTime
,
String
endTime
)
{
if
(
null
==
beginTime
||
endTime
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
...
...
@@ -1105,6 +1116,7 @@ public class InnerController implements IBaseController {
* @return
*/
@RequestMapping
(
"/verifyPhoneAndCode"
)
@ApiOperation
(
value
=
"验证手机号和验证码是否匹配"
,
httpMethod
=
"POST"
)
public
JsonResult
verifyPhoneAndCode
(
@RequestParam
String
phoneNo
,
@RequestParam
String
verificationCode
,
@RequestParam
String
appChannel
,
...
...
@@ -1154,6 +1166,7 @@ public class InnerController implements IBaseController {
}
@RequestMapping
(
"/login"
)
@ApiOperation
(
value
=
"登陆....怎么又一个..."
,
httpMethod
=
"POST"
)
public
JsonResult
login
(
@RequestParam
String
phoneNo
,
@RequestParam
String
password
)
{
User
user
=
checkPhoneNoAndPassword
(
phoneNo
,
password
);
if
(
user
==
null
)
{
...
...
@@ -1200,6 +1213,7 @@ public class InnerController implements IBaseController {
* @return
*/
@RequestMapping
(
"/user/enable"
)
@ApiOperation
(
value
=
"查看用户是否存在,存在则返回id,uuid"
,
httpMethod
=
"POST"
)
public
JsonResult
isEnable
(
String
phoneNo
)
{
boolean
flag
=
false
;
Map
validMap
=
Maps
.
newHashMap
();
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/center/UserCenterController.java
View file @
eaa6722d
...
...
@@ -12,6 +12,7 @@ import cn.quantgroup.xyqb.service.user.*;
import
cn.quantgroup.xyqb.util.EmojiUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
...
...
@@ -56,6 +57,7 @@ public class UserCenterController {
*/
@PasswordFreeAccessValidator
@RequestMapping
(
"/index"
)
@ApiOperation
(
value
=
"用户中心首页"
,
notes
=
"用户中心首页显示头像, 昵称, 姓名"
,
httpMethod
=
"POST"
)
public
JsonResult
userCenterIndex
(
String
phoneNo
)
{
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
...
...
@@ -84,6 +86,7 @@ public class UserCenterController {
* @return
*/
@RequestMapping
(
"/save/avatar"
)
@ApiOperation
(
value
=
"保存头像"
,
notes
=
"保存用户头像"
,
httpMethod
=
"POST"
)
public
JsonResult
SaveUserAvatarAddr
(
String
phoneNo
,
String
avatarUrl
)
{
if
(
StringUtils
.
isBlank
(
avatarUrl
)
||
StringUtils
.
isBlank
(
phoneNo
))
{
LOGGER
.
error
(
"参数不合法:avatarUrl:{}, phoneNo:{}"
,
avatarUrl
,
phoneNo
);
...
...
@@ -119,6 +122,7 @@ public class UserCenterController {
* @return
*/
@RequestMapping
(
"/queryNick"
)
@ApiOperation
(
value
=
"查询昵称"
,
notes
=
"查询用户昵称"
,
httpMethod
=
"POST"
)
public
JsonResult
queryUserNick
(
String
phoneNo
)
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
LOGGER
.
error
(
"手机号为空,phoneNo:{}"
,
phoneNo
);
...
...
@@ -144,6 +148,7 @@ public class UserCenterController {
* @return
*/
@RequestMapping
(
"/saveNick"
)
@ApiOperation
(
value
=
"保存昵称"
,
notes
=
"保存用户昵称"
,
httpMethod
=
"POST"
)
public
JsonResult
saveUserNick
(
String
phoneNo
,
String
nick
)
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
LOGGER
.
error
(
"手机号为空,phoneNo:{}"
,
phoneNo
);
...
...
@@ -175,6 +180,7 @@ public class UserCenterController {
* @return
*/
@RequestMapping
(
"/query/verified"
)
@ApiOperation
(
value
=
"查询用户是否实名认证"
,
notes
=
"查询用户是否实名认证"
,
httpMethod
=
"POST"
)
public
JsonResult
queryVerified
(
String
phoneNo
)
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
LOGGER
.
error
(
"手机号为空,phoneNo:{}"
,
phoneNo
);
...
...
@@ -200,6 +206,7 @@ public class UserCenterController {
*/
@PasswordFreeAccessValidator
@RequestMapping
(
"/personalData"
)
@ApiOperation
(
value
=
"查询个人资料信息"
,
notes
=
"查询个人资料信息"
,
httpMethod
=
"POST"
)
public
JsonResult
personalData
(
String
phoneNo
)
{
if
(
StringUtils
.
isBlank
(
phoneNo
))
{
LOGGER
.
error
(
"手机号为空,phoneNo:{}"
,
phoneNo
);
...
...
@@ -241,6 +248,7 @@ public class UserCenterController {
* @return
*/
@RequestMapping
(
"/contacts/save"
)
@ApiOperation
(
value
=
"保存用户联系人"
,
notes
=
"保存用户联系人"
,
httpMethod
=
"POST"
)
public
JsonResult
saveUserContact
(
String
phoneNo
,
String
contactJson
)
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
LOGGER
.
error
(
"保存联系人,参数错误. phoneNo:{}"
,
phoneNo
);
...
...
@@ -282,6 +290,7 @@ public class UserCenterController {
* @return
*/
@RequestMapping
(
"/address/save"
)
@ApiOperation
(
value
=
"保存用户地址"
,
notes
=
"保存用户地址"
,
httpMethod
=
"POST"
)
public
JsonResult
saveUserAddress
(
String
phoneNo
,
String
province
,
Long
provinceCode
,
String
city
,
Long
cityCode
,
String
address
,
Long
districtCode
,
String
district
)
{
LOGGER
.
info
(
"保存用户地址信息, phoneNo:{}, province:{}, provinceCode:{}, city:{}, cityCode:{},district:{}, address:{}"
,
phoneNo
,
province
,
provinceCode
,
city
,
cityCode
,
district
,
address
);
...
...
@@ -326,6 +335,7 @@ public class UserCenterController {
* @return
*/
@RequestMapping
(
"/searchAddress/phoneNo"
)
@ApiOperation
(
value
=
"查询用户地址"
,
notes
=
"查询用户地址"
,
httpMethod
=
"POST"
)
public
JsonResult
searchUserAddress
(
String
phoneNo
)
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
...
...
@@ -346,6 +356,7 @@ public class UserCenterController {
* @return
*/
@RequestMapping
(
"/searchContacts/phoneNo"
)
@ApiOperation
(
value
=
"查询用户联系人"
,
notes
=
"查询用户联系人"
,
httpMethod
=
"POST"
)
public
JsonResult
searchUserContacts
(
String
phoneNo
)
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
...
...
@@ -369,6 +380,7 @@ public class UserCenterController {
* @return
*/
@RequestMapping
(
"/save/userExtInfo"
)
@ApiOperation
(
value
=
"保存用户经济学历等信息"
,
notes
=
"保存用户经济学历等信息"
,
httpMethod
=
"POST"
)
public
JsonResult
saveUserExtInfo
(
String
phoneNo
,
EducationEnum
educationEnum
,
MaritalStatus
maritalStatus
,
IncomeRangeEnum
incomeRangeEnum
,
OccupationEnum
occupationEnum
)
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/UserController.java
View file @
eaa6722d
...
...
@@ -78,13 +78,6 @@ public class UserController implements IBaseController {
@Autowired
private
IUserRegisterService
userRegisterService
;
@RequestMapping
(
"/test"
)
public
JsonResult
test
()
{
HttpServletRequest
request
=
getRequest
();
IPUtil
.
logIp
(
log
,
request
);
return
JsonResult
.
buildSuccessResult
(
""
,
getCurrentUserFromRedis
());
}
/**
* 登录(账号 + 密码)
* 密码错误达到限定次数时执行图形验证码校验
...
...
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