Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
38089589
Commit
38089589
authored
Jul 05, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注册接口修改
parent
ecdcbe34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
UserBiz.java
...erver/src/main/java/com/xxfc/platform/im/biz/UserBiz.java
+17
-17
No files found.
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/UserBiz.java
View file @
38089589
...
...
@@ -57,23 +57,23 @@ public class UserBiz {
String
result
=
this
.
doPost
(
imUrl
+
"/xxfcim/user/register"
,
str
)
;
JSONObject
json
=
JSONObject
.
parseObject
(
result
);
//如果已经注册过,查询出手机号对应用户信息执行登录返回
//
if(0 == json.getInteger("resultCode")){
//
String phone = map.get("telephone").toString();
//
Query query = new Query(Criteria.where("phone").is(phone));
//
User mgt = mongoTemplate.findOne(query, User.class);
//
if(mgt == null){
//
result = "系统错误";
//
}else{
//
Map<String,Object>params = new HashMap<String,Object>();
//
params.put("userId",mgt.getUserId());
//
params.put("telephone",mgt.getPhone());
//
params.put("password",mgt.getPassword());
//
result = this.login(params);
//
}
//
}else{
//
json.put("password",map.get("password").toString());
//
result = json.toJSONString();
//
}
if
(
0
==
json
.
getInteger
(
"resultCode"
)){
String
phone
=
map
.
get
(
"telephone"
).
toString
();
Query
query
=
new
Query
(
Criteria
.
where
(
"phone"
).
is
(
phone
));
User
mgt
=
mongoTemplate
.
findOne
(
query
,
User
.
class
);
if
(
mgt
==
null
){
result
=
"系统错误"
;
}
else
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"userId"
,
mgt
.
getUserId
());
params
.
put
(
"telephone"
,
mgt
.
getPhone
());
params
.
put
(
"password"
,
mgt
.
getPassword
());
//
result = this.login(params);
}
}
else
{
json
.
put
(
"password"
,
map
.
get
(
"password"
).
toString
());
result
=
json
.
toJSONString
();
}
baseResponse
.
setStatus
(
200
);
baseResponse
.
setMessage
(
result
);
...
...
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