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
7e0e91ac
Commit
7e0e91ac
authored
Jan 16, 2018
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回归提交代码
parent
0d438472
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
41 deletions
+18
-41
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+18
-41
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
7e0e91ac
...
@@ -85,12 +85,9 @@ public class InnerController implements IBaseController {
...
@@ -85,12 +85,9 @@ public class InnerController implements IBaseController {
@Autowired
@Autowired
private
IUserRegisterService
userRegisterService
;
private
IUserRegisterService
userRegisterService
;
@Value
(
"${
xyqb.user.query.url
}"
)
@Value
(
"${
userqry.http
}"
)
private
String
queryUrl
;
private
String
queryUrl
;
@Value
(
"${xyqb.auth.url}"
)
private
String
hanguguanUrl
;
private
static
final
ObjectMapper
MAPPER
=
new
ObjectMapper
();
private
static
final
ObjectMapper
MAPPER
=
new
ObjectMapper
();
static
{
static
{
...
@@ -117,8 +114,8 @@ public class InnerController implements IBaseController {
...
@@ -117,8 +114,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
""
,
userRet
);
return
JsonResult
.
buildSuccessResult
(
""
,
userRet
);
}
}
@RequestMapping
(
"/user/search/uuid"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user/search/uuid"
)
public
JsonResult
findByUuid
(
String
uuid
)
{
public
JsonResult
findByUuid
(
String
uuid
)
{
User
user
=
userService
.
findByUuidInDb
(
uuid
);
User
user
=
userService
.
findByUuidInDb
(
uuid
);
if
(
user
==
null
)
{
if
(
user
==
null
)
{
...
@@ -128,8 +125,8 @@ public class InnerController implements IBaseController {
...
@@ -128,8 +125,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
""
,
userRet
);
return
JsonResult
.
buildSuccessResult
(
""
,
userRet
);
}
}
@RequestMapping
(
"/userInfo/search/uuid"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/userInfo/search/uuid"
)
public
JsonResult
findUserInfoByUuid
(
@RequestParam
(
value
=
"uuid"
)
String
uuid
)
{
public
JsonResult
findUserInfoByUuid
(
@RequestParam
(
value
=
"uuid"
)
String
uuid
)
{
LOGGER
.
info
(
"需要查询的用户uuidid, uuid:"
+
uuid
);
LOGGER
.
info
(
"需要查询的用户uuidid, uuid:"
+
uuid
);
...
@@ -148,8 +145,8 @@ public class InnerController implements IBaseController {
...
@@ -148,8 +145,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
""
,
null
);
return
JsonResult
.
buildSuccessResult
(
""
,
null
);
}
}
@RequestMapping
(
"/userInfo/search/phone"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/userInfo/search/phone"
)
public
JsonResult
findUserInfoByPhone
(
@RequestParam
(
value
=
"phone"
)
String
phone
)
{
public
JsonResult
findUserInfoByPhone
(
@RequestParam
(
value
=
"phone"
)
String
phone
)
{
LOGGER
.
info
(
"需要查询的用户phone, phone:"
+
phone
);
LOGGER
.
info
(
"需要查询的用户phone, phone:"
+
phone
);
...
@@ -168,9 +165,8 @@ public class InnerController implements IBaseController {
...
@@ -168,9 +165,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
""
,
null
);
return
JsonResult
.
buildSuccessResult
(
""
,
null
);
}
}
@RequestMapping
(
"/user/getPhoneByUserIds"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user/getPhoneByUserIds"
)
public
JsonResult
findByIds
(
@RequestParam
(
value
=
"userIds"
)
String
userIdsString
)
{
public
JsonResult
findByIds
(
@RequestParam
(
value
=
"userIds"
)
String
userIdsString
)
{
LOGGER
.
info
(
"批量查询用户的手机号列表, userIdsString:"
+
userIdsString
);
LOGGER
.
info
(
"批量查询用户的手机号列表, userIdsString:"
+
userIdsString
);
if
(
StringUtils
.
isEmpty
(
userIdsString
))
{
if
(
StringUtils
.
isEmpty
(
userIdsString
))
{
...
@@ -234,7 +230,6 @@ public class InnerController implements IBaseController {
...
@@ -234,7 +230,6 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
null
,
userRet
);
return
JsonResult
.
buildSuccessResult
(
null
,
userRet
);
}
}
/**
/**
* 保存用户详细信息
* 保存用户详细信息
*/
*/
...
@@ -295,8 +290,8 @@ public class InnerController implements IBaseController {
...
@@ -295,8 +290,8 @@ public class InnerController implements IBaseController {
/**
/**
* 根据用户id查询用户的详细信息
* 根据用户id查询用户的详细信息
*/
*/
@RequestMapping
(
"/user_detail/search/userId"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user_detail/search/userId"
)
public
JsonResult
findUserDetailByUserId
(
Long
userId
)
{
public
JsonResult
findUserDetailByUserId
(
Long
userId
)
{
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
if
(
userDetail
!=
null
)
{
if
(
userDetail
!=
null
)
{
...
@@ -305,8 +300,8 @@ public class InnerController implements IBaseController {
...
@@ -305,8 +300,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
""
,
null
);
return
JsonResult
.
buildErrorStateResult
(
""
,
null
);
}
}
@RequestMapping
(
"/user/search/userId"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user/search/userId"
)
public
JsonResult
findUserByUserId
(
Long
userId
)
{
public
JsonResult
findUserByUserId
(
Long
userId
)
{
User
user
=
userService
.
findById
(
userId
);
User
user
=
userService
.
findById
(
userId
);
if
(
user
!=
null
)
{
if
(
user
!=
null
)
{
...
@@ -315,8 +310,8 @@ public class InnerController implements IBaseController {
...
@@ -315,8 +310,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
""
,
null
);
return
JsonResult
.
buildErrorStateResult
(
""
,
null
);
}
}
@RequestMapping
(
"/user_detail/search/phone"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user_detail/search/phone"
)
public
JsonResult
findUserDetailByPhone
(
String
phoneNo
)
{
public
JsonResult
findUserDetailByPhone
(
String
phoneNo
)
{
UserDetail
userDetail
=
userDetailService
.
findByPhoneNo
(
phoneNo
);
UserDetail
userDetail
=
userDetailService
.
findByPhoneNo
(
phoneNo
);
if
(
userDetail
!=
null
)
{
if
(
userDetail
!=
null
)
{
...
@@ -331,8 +326,8 @@ public class InnerController implements IBaseController {
...
@@ -331,8 +326,8 @@ public class InnerController implements IBaseController {
* @param phoneNo
* @param phoneNo
* @return
* @return
*/
*/
@RequestMapping
(
"/user_full_info/search/phone"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user_full_info/search/phone"
)
public
JsonResult
findUserFullInfoByPhone
(
String
phoneNo
)
{
public
JsonResult
findUserFullInfoByPhone
(
String
phoneNo
)
{
if
(
StringUtils
.
isBlank
(
phoneNo
))
{
if
(
StringUtils
.
isBlank
(
phoneNo
))
{
LOGGER
.
warn
(
"[findUserFullInfoByPhone]phoneNo为空"
);
LOGGER
.
warn
(
"[findUserFullInfoByPhone]phoneNo为空"
);
...
@@ -352,8 +347,8 @@ public class InnerController implements IBaseController {
...
@@ -352,8 +347,8 @@ public class InnerController implements IBaseController {
* @param uuid
* @param uuid
* @return
* @return
*/
*/
@RequestMapping
(
"/user_full_info/search/uuid"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user_full_info/search/uuid"
)
public
JsonResult
findUserFullInfoByUUuid
(
String
uuid
)
{
public
JsonResult
findUserFullInfoByUUuid
(
String
uuid
)
{
if
(
StringUtils
.
isBlank
(
uuid
))
{
if
(
StringUtils
.
isBlank
(
uuid
))
{
LOGGER
.
warn
(
"[findUserFullInfoByUUuid]uuid为空"
);
LOGGER
.
warn
(
"[findUserFullInfoByUUuid]uuid为空"
);
...
@@ -376,8 +371,8 @@ public class InnerController implements IBaseController {
...
@@ -376,8 +371,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
null
,
null
);
return
JsonResult
.
buildSuccessResult
(
null
,
null
);
}
}
@RequestMapping
(
"/contact/search/user_id"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/contact/search/user_id"
)
public
JsonResult
findContactsByUserId
(
Long
userId
)
{
public
JsonResult
findContactsByUserId
(
Long
userId
)
{
if
(
null
==
userId
)
{
if
(
null
==
userId
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
...
@@ -488,8 +483,8 @@ public class InnerController implements IBaseController {
...
@@ -488,8 +483,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
null
,
AddressRet
.
address2AddressRet
(
addressObj
));
return
JsonResult
.
buildSuccessResult
(
null
,
AddressRet
.
address2AddressRet
(
addressObj
));
}
}
@RequestMapping
(
"/user_ext_info/update"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user_ext_info/update"
)
public
JsonResult
updateMarryStatus
(
public
JsonResult
updateMarryStatus
(
Long
userId
,
IncomeEnum
incomeEnum
,
IncomeRangeEnum
incomeRangeEnum
,
Long
userId
,
IncomeEnum
incomeEnum
,
IncomeRangeEnum
incomeRangeEnum
,
OccupationEnum
occupationEnum
,
EducationEnum
educationEnum
,
Boolean
hasCar
,
OccupationEnum
occupationEnum
,
EducationEnum
educationEnum
,
Boolean
hasCar
,
...
@@ -566,8 +561,8 @@ public class InnerController implements IBaseController {
...
@@ -566,8 +561,8 @@ public class InnerController implements IBaseController {
return
JSON
.
parseObject
(
s
,
JsonResult
.
class
);
return
JSON
.
parseObject
(
s
,
JsonResult
.
class
);
}
}
@RequestMapping
(
"/user_ext_info/search/user_id"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user_ext_info/search/user_id"
)
public
JsonResult
searchUserExtInfoByUserId
(
Long
userId
)
{
public
JsonResult
searchUserExtInfoByUserId
(
Long
userId
)
{
if
(
userId
==
null
)
{
if
(
userId
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
"userId不能为空"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"userId不能为空"
,
null
);
...
@@ -579,8 +574,8 @@ public class InnerController implements IBaseController {
...
@@ -579,8 +574,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
null
,
UserExtInfoRet
.
getUserExtInfoRet
(
userExtInfo
));
return
JsonResult
.
buildSuccessResult
(
null
,
UserExtInfoRet
.
getUserExtInfoRet
(
userExtInfo
));
}
}
@RequestMapping
(
"/user/query/openId"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user/query/openId"
)
public
JsonResult
queryOpenIdByUserId
(
Long
userId
)
{
public
JsonResult
queryOpenIdByUserId
(
Long
userId
)
{
if
(
userId
==
null
)
{
if
(
userId
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
"userId不能为空"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"userId不能为空"
,
null
);
...
@@ -791,8 +786,8 @@ public class InnerController implements IBaseController {
...
@@ -791,8 +786,8 @@ public class InnerController implements IBaseController {
return
contactRets
;
return
contactRets
;
}
}
@RequestMapping
(
"/user/wechat/phone_no"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user/wechat/phone_no"
)
public
JsonResult
queryOpenIdByPhoneNo
(
String
phoneNo
)
{
public
JsonResult
queryOpenIdByPhoneNo
(
String
phoneNo
)
{
if
(
StringUtils
.
isBlank
(
phoneNo
))
{
if
(
StringUtils
.
isBlank
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
"手机号错误"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"手机号错误"
,
null
);
...
@@ -871,8 +866,8 @@ public class InnerController implements IBaseController {
...
@@ -871,8 +866,8 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
null
,
UserSpouseRet
.
getUserSpouseRet
(
userSpouse
));
return
JsonResult
.
buildSuccessResult
(
null
,
UserSpouseRet
.
getUserSpouseRet
(
userSpouse
));
}
}
@RequestMapping
(
"/user/spouse/findByUserId"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user/spouse/findByUserId"
)
public
JsonResult
querySpouse
(
Long
userId
)
{
public
JsonResult
querySpouse
(
Long
userId
)
{
if
(
userId
==
null
||
userId
==
0
)
{
if
(
userId
==
null
||
userId
==
0
)
{
return
JsonResult
.
buildErrorStateResult
(
"用户不能为空"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"用户不能为空"
,
null
);
...
@@ -942,8 +937,8 @@ public class InnerController implements IBaseController {
...
@@ -942,8 +937,8 @@ public class InnerController implements IBaseController {
/**
/**
* 保存用户信息,地址信息,联系人信息
* 保存用户信息,地址信息,联系人信息
*/
*/
@RequestMapping
(
"/user/save_multi"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/user/save_multi"
)
public
JsonResult
saveMulti
(
public
JsonResult
saveMulti
(
String
registeredFrom
,
String
registeredFrom
,
String
channelId
,
String
channelId
,
...
@@ -1032,9 +1027,8 @@ public class InnerController implements IBaseController {
...
@@ -1032,9 +1027,8 @@ public class InnerController implements IBaseController {
}
}
//根据日期时间段查询新注册用户信息并返回
//根据日期时间段查询新注册用户信息并返回
@RequestMapping
(
"/contract/queryRegisterUsers"
)
@LogHttpCaller
@LogHttpCaller
@RequestMapping
(
"/contract/queryRegisterUsers"
)
public
JsonResult
findRegisterUserByTime
(
String
beginTime
,
String
endTime
)
{
public
JsonResult
findRegisterUserByTime
(
String
beginTime
,
String
endTime
)
{
if
(
null
==
beginTime
||
endTime
==
null
)
{
if
(
null
==
beginTime
||
endTime
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
...
@@ -1084,15 +1078,6 @@ public class InnerController implements IBaseController {
...
@@ -1084,15 +1078,6 @@ public class InnerController implements IBaseController {
}
}
int
affectedRows
=
userDetailService
.
updateIdCard
(
name
,
idNo
,
phoneNo
);
int
affectedRows
=
userDetailService
.
updateIdCard
(
name
,
idNo
,
phoneNo
);
LOGGER
.
info
(
"更新用户的信息,name;{},idNo:{},phoneNo:{},操作的理由reason:{},受影响的行数affectedRows:{}"
,
name
,
idNo
,
phoneNo
,
reason
,
affectedRows
);
LOGGER
.
info
(
"更新用户的信息,name;{},idNo:{},phoneNo:{},操作的理由reason:{},受影响的行数affectedRows:{}"
,
name
,
idNo
,
phoneNo
,
reason
,
affectedRows
);
ImmutableMap
.
Builder
<
String
,
String
>
builder
=
ImmutableMap
.
builder
();
builder
.
put
(
"phoneNo"
,
phoneNo
);
builder
.
put
(
"name"
,
name
);
builder
.
put
(
"idNo"
,
idNo
);
builder
.
put
(
"reason"
,
reason
);
builder
.
put
(
"content"
,
content
);
LOGGER
.
info
(
"去函谷关修改用户身份证号或姓名"
);
Map
<
String
,
String
>
param
=
builder
.
build
();
httpService
.
get
(
hanguguanUrl
.
concat
(
"/innerapi/updateIdCard"
),
param
);
return
JsonResult
.
buildSuccessResult
(
"修改用户身份证号或姓名成功"
,
affectedRows
);
return
JsonResult
.
buildSuccessResult
(
"修改用户身份证号或姓名成功"
,
affectedRows
);
}
}
...
@@ -1117,14 +1102,6 @@ public class InnerController implements IBaseController {
...
@@ -1117,14 +1102,6 @@ public class InnerController implements IBaseController {
int
affectedRows
=
userService
.
forbiddenUser
(
enable
,
phoneNo
);
int
affectedRows
=
userService
.
forbiddenUser
(
enable
,
phoneNo
);
LOGGER
.
info
(
"禁用或者重启用户的理由,reason:{},手机号phoneNo:{},受影响的行数affectedRows:{}"
,
reason
,
phoneNo
,
affectedRows
);
LOGGER
.
info
(
"禁用或者重启用户的理由,reason:{},手机号phoneNo:{},受影响的行数affectedRows:{}"
,
reason
,
phoneNo
,
affectedRows
);
ImmutableMap
.
Builder
<
String
,
String
>
builder
=
ImmutableMap
.
builder
();
builder
.
put
(
"phoneNo"
,
phoneNo
);
builder
.
put
(
"enable"
,
String
.
valueOf
(
enable
));
builder
.
put
(
"reason"
,
reason
);
builder
.
put
(
"content"
,
content
);
LOGGER
.
info
(
"去函谷关禁用或者重启用户"
);
Map
<
String
,
String
>
param
=
builder
.
build
();
httpService
.
get
(
hanguguanUrl
.
concat
(
"/innerapi/forbiddenUserOrNot"
),
param
);
return
JsonResult
.
buildSuccessResult
(
"用户禁用或重启成功成功"
,
affectedRows
);
return
JsonResult
.
buildSuccessResult
(
"用户禁用或重启成功成功"
,
affectedRows
);
}
}
...
...
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