Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
Details
Activity
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
曲欣亮
shop
Commits
c8faea3e
Commit
c8faea3e
authored
Dec 10, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
07dd3671
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
23 deletions
+14
-23
UserServiceImpl.java
...ain/java/com/egolm/shop/service/impl/UserServiceImpl.java
+14
-23
No files found.
src/main/java/com/egolm/shop/service/impl/UserServiceImpl.java
View file @
c8faea3e
...
...
@@ -815,36 +815,27 @@ public class UserServiceImpl implements UserService {
ResultMutil
result
=
jdbcTemplate
.
executeMutil
(
sql
,
orgNo
,
openId
,
mobile
,
name
);
List
<
List
<
Map
<
String
,
Object
>>>
datas
=
result
.
getDatas
();
List
<
Map
<
String
,
Object
>>
uList
=
datas
.
get
(
0
);
List
<
Map
<
String
,
Object
>>
shopList
=
datas
.
get
(
3
);
if
(
StringUtil
.
isBlank
(
mobile
)
&&
uList
.
size
()
==
0
)
{
throw
new
XException
(
"账户不存在"
,
201
);
}
if
(
shopList
.
size
()
==
0
)
{
throw
new
XException
(
"该账号暂未绑定门店"
);
}
Map
<
String
,
Object
>
uMap
=
uList
.
get
(
0
);
Object
Status
=
uMap
.
get
(
"Status"
);
Object
ErrorMsg
=
uMap
.
get
(
"ErrorMsg"
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
if
(
Status
!=
null
)
{
Integer
code
=
((
Number
)
Status
).
intValue
();
if
(
code
!=
0
)
{
throw
throwLoginError
(
ErrorMsg
);
}
else
{
map
.
put
(
"userinfo"
,
uMap
);
map
.
put
(
"customer"
,
datas
.
get
(
1
).
get
(
0
));
map
.
put
(
"bankList"
,
datas
.
get
(
2
));
map
.
put
(
"shopList"
,
datas
.
get
(
3
));
return
map
;
}
Integer
code
=
((
Number
)
Status
).
intValue
();
if
(
code
!=
0
)
{
throw
throwLoginError
(
ErrorMsg
,
((
Number
)
Status
).
intValue
());
}
else
{
throw
throwLoginError
(
ErrorMsg
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
List
<
Map
<
String
,
Object
>>
shopList
=
datas
.
get
(
3
);
if
(
shopList
.
size
()
==
0
)
{
throw
new
XException
(
"该账号暂未绑定门店"
);
}
map
.
put
(
"userinfo"
,
uMap
);
map
.
put
(
"customer"
,
datas
.
get
(
1
).
get
(
0
));
map
.
put
(
"bankList"
,
datas
.
get
(
2
));
map
.
put
(
"shopList"
,
shopList
);
return
map
;
}
}
private
XException
throwLoginError
(
Object
errorMsg
)
{
private
XException
throwLoginError
(
Object
errorMsg
,
Integer
code
)
{
if
(
StringUtil
.
isBlank
(
errorMsg
))
{
errorMsg
=
"登陆失败"
;
}
...
...
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