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
1552b61d
Commit
1552b61d
authored
Apr 12, 2023
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
需求 #14854
parent
cd52335a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
UserController.java
src/main/java/com/egolm/shop/api/UserController.java
+4
-2
UserService.java
src/main/java/com/egolm/shop/api/service/UserService.java
+1
-1
UserServiceImpl.java
...java/com/egolm/shop/api/service/impl/UserServiceImpl.java
+3
-3
No files found.
src/main/java/com/egolm/shop/api/UserController.java
View file @
1552b61d
...
...
@@ -189,6 +189,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"openId"
,
dataType
=
"String"
,
required
=
false
,
value
=
"OPENID"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"unionId"
,
dataType
=
"String"
,
required
=
false
,
value
=
"unionId"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"mobile"
,
dataType
=
"String"
,
required
=
false
,
value
=
"手机号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"appId"
,
dataType
=
"String"
,
required
=
false
,
value
=
"appId"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
false
,
value
=
"orgNo"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
...
...
@@ -196,11 +197,12 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/loginByOpenId"
,
method
=
RequestMethod
.
POST
)
public
String
loginByOpenId
(
String
openId
,
String
mobile
,
String
orgNo
,
String
name
,
String
unionId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
loginByOpenId
(
String
appId
,
String
openId
,
String
mobile
,
String
orgNo
,
String
name
,
String
unionId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
XException
.
assertNotBlank
(
appId
,
"appId不能为空"
);
XException
.
assertNotBlank
(
openId
,
"OpenID不能为空"
);
mobile
=
StringUtil
.
isBlank
(
mobile
)
?
""
:
mobile
;
name
=
StringUtil
.
isBlank
(
name
)
?
""
:
name
;
Map
<
String
,
Object
>
map
=
userService
.
loginByOpenId
(
orgNo
,
openId
,
mobile
,
unionId
,
name
);
Map
<
String
,
Object
>
map
=
userService
.
loginByOpenId
(
appId
,
orgNo
,
openId
,
mobile
,
unionId
,
name
);
Rjx
rjx
=
Rjx
.
jsonOk
();
rjx
.
putAll
(
map
);
return
rjx
.
toJson
();
...
...
src/main/java/com/egolm/shop/api/service/UserService.java
View file @
1552b61d
...
...
@@ -49,7 +49,7 @@ public interface UserService {
public
List
<
Map
<
String
,
Object
>>
queryBankList
(
String
sCustNO
);
public
Map
<
String
,
Object
>
loginByOpenId
(
String
orgNo
,
String
openId
,
String
mobile
,
String
unionId
,
String
name
);
public
Map
<
String
,
Object
>
loginByOpenId
(
String
appId
,
String
orgNo
,
String
openId
,
String
mobile
,
String
unionId
,
String
name
);
public
void
updateB2BUnionID
(
String
UserNO
,
String
UnionID
);
...
...
src/main/java/com/egolm/shop/api/service/impl/UserServiceImpl.java
View file @
1552b61d
...
...
@@ -854,10 +854,10 @@ public class UserServiceImpl implements UserService {
}
@Override
public
Map
<
String
,
Object
>
loginByOpenId
(
String
orgNo
,
String
openId
,
String
mobile
,
String
unionId
,
String
name
)
{
public
Map
<
String
,
Object
>
loginByOpenId
(
String
appId
,
String
orgNo
,
String
openId
,
String
mobile
,
String
unionId
,
String
name
)
{
mobile
=
StringUtil
.
isBlank
(
mobile
)
?
null
:
mobile
;
String
sql
=
"exec up_B2BUserRegisterLogin ?, ?, ?, ?, ?"
;
ResultMutil
result
=
jdbcTemplate
.
executeMutil
(
sql
,
orgNo
,
openId
,
mobile
,
unionId
,
name
);
String
sql
=
"exec up_B2BUserRegisterLogin ?, ?, ?, ?, ?
,?
"
;
ResultMutil
result
=
jdbcTemplate
.
executeMutil
(
sql
,
orgNo
,
openId
,
mobile
,
unionId
,
name
,
appId
);
List
<
List
<
Map
<
String
,
Object
>>>
datas
=
result
.
getDatas
();
List
<
Map
<
String
,
Object
>>
uList
=
datas
.
get
(
0
);
Map
<
String
,
Object
>
uMap
=
uList
.
get
(
0
);
...
...
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