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
b517aa1a
Commit
b517aa1a
authored
Dec 06, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
f6da9878
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
9 deletions
+20
-9
UserController.java
src/main/java/com/egolm/shop/controller/UserController.java
+4
-2
UserService.java
src/main/java/com/egolm/shop/service/UserService.java
+1
-1
CartServiceImpl.java
...ain/java/com/egolm/shop/service/impl/CartServiceImpl.java
+1
-1
UserServiceImpl.java
...ain/java/com/egolm/shop/service/impl/UserServiceImpl.java
+14
-5
No files found.
src/main/java/com/egolm/shop/controller/UserController.java
View file @
b517aa1a
...
@@ -203,8 +203,10 @@ public class UserController {
...
@@ -203,8 +203,10 @@ public class UserController {
XException
.
assertNotBlank
(
openId
,
"OpenID不能为空"
);
XException
.
assertNotBlank
(
openId
,
"OpenID不能为空"
);
mobile
=
StringUtil
.
isBlank
(
mobile
)
?
""
:
mobile
;
mobile
=
StringUtil
.
isBlank
(
mobile
)
?
""
:
mobile
;
name
=
StringUtil
.
isBlank
(
name
)
?
""
:
name
;
name
=
StringUtil
.
isBlank
(
name
)
?
""
:
name
;
userService
.
loginByOpenId
(
orgNo
,
openId
,
mobile
,
name
);
Map
<
String
,
Object
>
map
=
userService
.
loginByOpenId
(
orgNo
,
openId
,
mobile
,
name
);
return
this
.
queryUserInfoByOpenId
(
orgNo
,
openId
,
langID
,
request
,
response
);
Rjx
rjx
=
Rjx
.
jsonOk
();
rjx
.
putAll
(
map
);
return
rjx
.
toJson
();
}
}
@ApiOperation
(
"修改认证信息"
)
@ApiOperation
(
"修改认证信息"
)
...
...
src/main/java/com/egolm/shop/service/UserService.java
View file @
b517aa1a
...
@@ -49,6 +49,6 @@ public interface UserService {
...
@@ -49,6 +49,6 @@ public interface UserService {
public
List
<
Map
<
String
,
Object
>>
queryBankList
(
String
sCustNO
);
public
List
<
Map
<
String
,
Object
>>
queryBankList
(
String
sCustNO
);
public
void
loginByOpenId
(
String
orgNo
,
String
openId
,
String
mobile
,
String
name
);
public
Map
<
String
,
Object
>
loginByOpenId
(
String
orgNo
,
String
openId
,
String
mobile
,
String
name
);
}
}
src/main/java/com/egolm/shop/service/impl/CartServiceImpl.java
View file @
b517aa1a
...
@@ -55,7 +55,7 @@ public class CartServiceImpl implements CartService {
...
@@ -55,7 +55,7 @@ public class CartServiceImpl implements CartService {
List
<
String
>
strs
=
new
ArrayList
<
String
>();
List
<
String
>
strs
=
new
ArrayList
<
String
>();
strs
.
add
(
"sOrgNO = '"
+
orgNo
+
"'"
);
strs
.
add
(
"sOrgNO = '"
+
orgNo
+
"'"
);
strs
.
add
(
"sShopNO = '"
+
shopNO
+
"'"
);
strs
.
add
(
"sShopNO = '"
+
shopNO
+
"'"
);
strs
.
add
(
"nTag = "
+
nGoodsTypeID
);
strs
.
add
(
"nTag = "
+
nGoodsTypeID
);
strs
.
add
(
"sAgentContractNO = '"
+
sAgentContractNO
+
"'"
);
strs
.
add
(
"sAgentContractNO = '"
+
sAgentContractNO
+
"'"
);
strs
.
add
(
"nGoodsID = "
+
nGoodsID
);
strs
.
add
(
"nGoodsID = "
+
nGoodsID
);
if
(
StringUtil
.
isNotBlank
(
sPromoPaperNO
))
{
if
(
StringUtil
.
isNotBlank
(
sPromoPaperNO
))
{
...
...
src/main/java/com/egolm/shop/service/impl/UserServiceImpl.java
View file @
b517aa1a
...
@@ -809,7 +809,7 @@ public class UserServiceImpl implements UserService {
...
@@ -809,7 +809,7 @@ public class UserServiceImpl implements UserService {
}
}
@Override
@Override
public
void
loginByOpenId
(
String
orgNo
,
String
openId
,
String
mobile
,
String
name
)
{
public
Map
<
String
,
Object
>
loginByOpenId
(
String
orgNo
,
String
openId
,
String
mobile
,
String
name
)
{
String
sql
=
"exec up_B2BUserRegisterLogin ?, ?, ?, ?"
;
String
sql
=
"exec up_B2BUserRegisterLogin ?, ?, ?, ?"
;
ResultMutil
result
=
jdbcTemplate
.
executeMutil
(
sql
,
orgNo
,
openId
,
mobile
,
name
);
ResultMutil
result
=
jdbcTemplate
.
executeMutil
(
sql
,
orgNo
,
openId
,
mobile
,
name
);
List
<
List
<
Map
<
String
,
Object
>>>
datas
=
result
.
getDatas
();
List
<
List
<
Map
<
String
,
Object
>>>
datas
=
result
.
getDatas
();
...
@@ -817,20 +817,29 @@ public class UserServiceImpl implements UserService {
...
@@ -817,20 +817,29 @@ public class UserServiceImpl implements UserService {
Map
<
String
,
Object
>
sMap
=
sList
.
get
(
0
);
Map
<
String
,
Object
>
sMap
=
sList
.
get
(
0
);
Object
Status
=
sMap
.
get
(
"Status"
);
Object
Status
=
sMap
.
get
(
"Status"
);
Object
ErrorMsg
=
sMap
.
get
(
"ErrorMsg"
);
Object
ErrorMsg
=
sMap
.
get
(
"ErrorMsg"
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
if
(
Status
!=
null
)
{
if
(
Status
!=
null
)
{
Integer
code
=
((
Number
)
Status
).
intValue
();
Integer
code
=
((
Number
)
Status
).
intValue
();
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
throwLoginError
(
ErrorMsg
);
throw
throwLoginError
(
ErrorMsg
);
}
else
{
map
.
put
(
"userinfo"
,
sMap
);
map
.
put
(
"customer"
,
datas
.
get
(
1
).
get
(
0
));
map
.
put
(
"bankList"
,
datas
.
get
(
2
));
map
.
put
(
"shopList"
,
datas
.
get
(
3
));
return
map
;
}
}
}
else
{
}
else
{
throwLoginError
(
ErrorMsg
);
throw
throw
LoginError
(
ErrorMsg
);
}
}
}
}
private
void
throwLoginError
(
Object
errorMsg
)
{
private
XException
throwLoginError
(
Object
errorMsg
)
{
if
(
StringUtil
.
isBlank
(
errorMsg
))
{
if
(
StringUtil
.
isBlank
(
errorMsg
))
{
errorMsg
=
"登陆失败"
;
errorMsg
=
"登陆失败"
;
}
}
throw
new
XException
((
String
)
errorMsg
);
return
new
XException
((
String
)
errorMsg
);
}
}
}
}
\ No newline at end of file
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