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
a22c50e5
Commit
a22c50e5
authored
Sep 25, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推广和放开活动
parent
601747ff
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
22 deletions
+30
-22
AuthController.java
...thub/wxiaoqi/security/auth/controller/AuthController.java
+7
-4
IUserService.java
.../com/github/wxiaoqi/security/auth/feign/IUserService.java
+5
-2
AuthService.java
...com/github/wxiaoqi/security/auth/service/AuthService.java
+2
-2
AppAuthServiceImpl.java
...xiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
+4
-4
AuthServiceImpl.java
...b/wxiaoqi/security/auth/service/impl/AuthServiceImpl.java
+4
-4
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+8
-6
No files found.
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/controller/AuthController.java
View file @
a22c50e5
...
...
@@ -135,9 +135,11 @@ public class AuthController {
return
appAuthService
.
checkBindWechat
(
username
);
}
@RequestMapping
(
value
=
"/wxlogin"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
wxlogin
(
@RequestParam
(
value
=
"openid"
,
defaultValue
=
""
)
String
openid
,
@RequestParam
(
value
=
"isQQ"
,
defaultValue
=
"0"
)
Integer
isQQ
)
throws
Exception
{
public
JSONObject
wxlogin
(
@RequestParam
(
value
=
"openid"
,
defaultValue
=
""
)
String
openid
,
@RequestParam
(
value
=
"isQQ"
,
defaultValue
=
"0"
)
Integer
isQQ
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
)
throws
Exception
{
log
.
info
(
openid
+
"----require wxlogin..."
);
JSONObject
data
=
appAuthService
.
wxlogin
(
openid
,
isQQ
);
JSONObject
data
=
appAuthService
.
wxlogin
(
openid
,
isQQ
,
code
);
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
JSONObject
result
=
data
.
getJSONObject
(
"data"
);
if
(
result
==
null
){
...
...
@@ -154,10 +156,11 @@ public class AuthController {
public
JSONObject
login
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"1"
)
Integer
type
)
throws
Exception
{
@RequestParam
(
value
=
"type"
,
defaultValue
=
"1"
)
Integer
type
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
)
throws
Exception
{
log
.
info
(
username
+
"----require login..."
);
JSONObject
data
=
appAuthService
.
tlogin
(
username
,
password
,
mobilecode
,
type
);
JSONObject
data
=
appAuthService
.
tlogin
(
username
,
password
,
mobilecode
,
type
,
code
);
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
JSONObject
result
=
data
.
getJSONObject
(
"data"
);
if
(
result
==
null
){
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/feign/IUserService.java
View file @
a22c50e5
...
...
@@ -42,12 +42,15 @@ public interface IUserService {
@RequestMapping
(
value
=
"/api/app/user/checkBindWechat"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
checkBindWechat
(
@RequestParam
(
value
=
"username"
)
String
username
);
@RequestMapping
(
value
=
"/api/app/user/wxlogin"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
wxlogin
(
@RequestParam
(
value
=
"openid"
)
String
openid
,
@RequestParam
(
value
=
"isQQ"
)
Integer
isQQ
);
public
JSONObject
wxlogin
(
@RequestParam
(
value
=
"openid"
)
String
openid
,
@RequestParam
(
value
=
"isQQ"
)
Integer
isQQ
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
);
@RequestMapping
(
value
=
"/api/app/user/login"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
login
(
@RequestParam
(
value
=
"username"
)
String
username
,
@RequestParam
(
value
=
"password"
)
String
password
,
@RequestParam
(
value
=
"mobilecode"
)
String
mobilecode
,
@RequestParam
(
value
=
"type"
)
Integer
type
);
@RequestParam
(
value
=
"type"
)
Integer
type
,
@RequestParam
(
value
=
""
)
String
code
);
@RequestMapping
(
value
=
"/api/app/user/reset"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
reset
(
@RequestParam
(
value
=
"username"
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
)
String
mobilecode
,
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/AuthService.java
View file @
a22c50e5
...
...
@@ -15,8 +15,8 @@ public interface AuthService {
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
)
throws
Exception
;
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
)
throws
Exception
;
JSONObject
checkBindWechat
(
String
username
)
throws
Exception
;
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
)
throws
Exception
;
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
)
throws
Exception
;
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
,
String
code
)
throws
Exception
;
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
,
String
code
)
throws
Exception
;
String
getToken
(
String
username
,
Integer
id
)
throws
Exception
;
JSONObject
reset
(
String
username
,
String
mobilecode
,
String
password
)
throws
Exception
;
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
View file @
a22c50e5
...
...
@@ -84,13 +84,13 @@ public class AppAuthServiceImpl implements AuthService {
}
@Override
public
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
)
throws
Exception
{
return
userService
.
wxlogin
(
openid
,
isQQ
);
public
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
,
String
code
)
throws
Exception
{
return
userService
.
wxlogin
(
openid
,
isQQ
,
code
);
}
@Override
public
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
)
throws
Exception
{
return
userService
.
login
(
username
,
password
,
mobilecode
,
type
);
public
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
,
String
code
)
throws
Exception
{
return
userService
.
login
(
username
,
password
,
mobilecode
,
type
,
code
);
}
@Override
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AuthServiceImpl.java
View file @
a22c50e5
...
...
@@ -82,13 +82,13 @@ public class AuthServiceImpl implements AuthService {
}
@Override
public
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
)
throws
Exception
{
return
userService
.
wxlogin
(
openid
,
isQQ
);
public
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
,
String
code
)
throws
Exception
{
return
userService
.
wxlogin
(
openid
,
isQQ
,
code
);
}
@Override
public
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
)
throws
Exception
{
return
userService
.
login
(
username
,
password
,
mobilecode
,
type
);
public
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
,
String
code
)
throws
Exception
{
return
userService
.
login
(
username
,
password
,
mobilecode
,
type
,
code
);
}
@Override
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
a22c50e5
...
...
@@ -316,8 +316,8 @@ public class AppPermissionService {
}*/
//临时会员绑定
insertUserMemberByUserIdAndPhone
(
userid
,
username
);
/
*/
/参加新人活动
jionActivity(userid);
*/
//参加新人活动
jionActivity
(
userid
);
//创建钱包
walletBiz
.
createWalletByUserId
(
appUserLogin
.
getId
());
// 登录结果要做做统一处理
...
...
@@ -950,8 +950,8 @@ public class AppPermissionService {
relationBiz
.
bindByUserId
(
userid
,
small_id
);
//发送短信通知用户
thirdFeign
.
sendCode
(
username
,
password
,
SystemConfig
.
TEMPLATECODE
);
/
* /
/参加新人活动
jionActivity(userid);
*/
//参加新人活动
jionActivity
(
userid
);
// 登录结果要做做统一处理
JSONObject
data
=
autoLogin
(
userid
,
username
,
headimgurl
,
nickname
,
null
,
null
,
2
);
// 到im注册,获取返回结果
...
...
@@ -1024,8 +1024,10 @@ public class AppPermissionService {
}
Map
<
Integer
,
AppUserDetail
>
userIdAndAppUserDetail
=
appUserDetailBiz
.
findUserIdAndUserDetailMapByMemberIds
(
Arrays
.
asList
(
appUserLogin
.
getId
()));
AppUserDetail
appUserDetail
=
userIdAndAppUserDetail
.
get
(
appUserLogin
.
getId
());
imiVo
.
setNickname
(
appUserDetail
.
getNickname
());
imiVo
.
setHeadimgurl
(
appUserDetail
.
getHeadimgurl
());
if
(
appUserDetail
!=
null
)
{
imiVo
.
setNickname
(
appUserDetail
.
getNickname
());
imiVo
.
setHeadimgurl
(
appUserDetail
.
getHeadimgurl
());
}
return
imiVo
;
}
...
...
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