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
8c4cdccf
Commit
8c4cdccf
authored
Nov 26, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
029c2d84
1f1cf9ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
AppUserRest.java
...va/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
+3
-2
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+12
-1
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
View file @
8c4cdccf
...
...
@@ -138,11 +138,12 @@ public class AppUserRest {
* @return
*/
@RequestMapping
(
value
=
"/user/checkBindWechat"
)
public
@ResponseBody
JSONObject
checkBindWechat
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
)
{
public
@ResponseBody
JSONObject
checkBindWechat
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
)
{
if
(
StringUtils
.
isBlank
(
username
))
{
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数为空"
);
}
return
appPermissionService
.
checkBindWechat
(
username
);
return
appPermissionService
.
checkBindWechat
(
username
,
type
);
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
8c4cdccf
...
...
@@ -114,6 +114,9 @@ public class AppPermissionService {
@Autowired
private
AppUserPositionTempBiz
positionTempBiz
;
@Autowired
private
AppUserAlipayBiz
alipayBiz
;
public
AppUserInfo
validate
(
String
username
,
String
password
)
{
AppUserInfo
info
=
new
AppUserInfo
();
...
...
@@ -617,12 +620,20 @@ public class AppPermissionService {
* @return
*/
public
JSONObject
checkBindWechat
(
String
username
)
{
public
JSONObject
checkBindWechat
(
String
username
,
Integer
type
)
{
JSONObject
data
=
new
JSONObject
();
try
{
AppUserLogin
userLogin
=
appUserLoginBiz
.
checkeUserLogin
(
username
);
if
(
userLogin
!=
null
)
{
String
openid
=
userLogin
.
getOpenid
();
if
(
type
==
null
||
type
==
0
){
openid
=
userLogin
.
getWxOpenid
();
}
else
if
(
type
==
2
){
List
<
AppUserAlipay
>
list
=
alipayBiz
.
getListByUserId
(
userLogin
.
getId
());
if
(
list
.
size
()>
0
){
openid
=
list
.
get
(
0
).
getTxAlipay
();
}
}
if
(
StringUtils
.
isNotBlank
(
openid
))
{
data
.
put
(
"type"
,
0
);
// 已存在
}
else
{
...
...
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