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
c90c3dab
Commit
c90c3dab
authored
Jul 01, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
db43d0af
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
AppUserRest.java
...va/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
+1
-3
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+19
-5
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
View file @
c90c3dab
...
...
@@ -184,9 +184,7 @@ public class AppUserRest {
@PostMapping
(
"/applet/registry"
)
public
JSONObject
appletRegistry
(
@RequestParam
(
value
=
"phone"
)
String
phone
,
@RequestParam
(
"pwd"
)
String
pwd
,
@RequestParam
(
"code"
)
String
code
){
//默认昵称
String
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+(
int
)((
Math
.
random
()*
9
+
1
)*
100000
);
return
appPermissionService
.
appletRegistry
(
phone
,
nickname
,
pwd
,
code
);
return
appPermissionService
.
appletRegistry
(
phone
,
pwd
,
code
);
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
c90c3dab
...
...
@@ -673,12 +673,26 @@ public class AppPermissionService {
/**
*通过小程序注册
* @param
phon
e
* @param p
w
d
* @param code
* @param
usernam
e
* @param p
asswor
d
* @param
mobile
code
* @return
*/
public
JSONObject
appletRegistry
(
String
phone
,
String
nickname
,
String
pwd
,
String
code
){
return
register
(
phone
,
pwd
,
null
,
nickname
,
code
,
null
,
null
,
null
);
public
JSONObject
appletRegistry
(
String
username
,
String
password
,
String
mobilecode
){
try
{
// 是否已存在
AppUserLogin
user
=
appUserLoginBiz
.
checkeUserLogin
(
username
);
JSONObject
data
=
new
JSONObject
();
if
(
null
==
user
)
{
data
=
register
(
username
,
password
,
SystemConfig
.
USER_HEADER_URL_DEFAULT
,
SystemConfig
.
USER_NIKENAME_DEFAULT
+(
int
)((
Math
.
random
()*
9
+
1
)*
100000
),
mobilecode
,
null
,
null
,
0
);
}
else
{
data
=
login
(
username
,
null
,
mobilecode
,
2
);
}
return
data
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
EXCEPTION_CODE
,
"出现异常"
);
}
}
}
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