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
a4533103
Commit
a4533103
authored
Jul 18, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改code
parent
abdf1f46
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
23 deletions
+31
-23
AuthController.java
...thub/wxiaoqi/security/auth/controller/AuthController.java
+6
-4
IUserService.java
.../com/github/wxiaoqi/security/auth/feign/IUserService.java
+3
-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
ActivityFeign.java
.../java/com/xxfc/platform/activity/feign/ActivityFeign.java
+1
-1
ActivityUserJoinBiz.java
...a/com/xxfc/platform/activity/biz/ActivityUserJoinBiz.java
+9
-4
UserCouponController.java
...com/xxfc/platform/activity/rest/UserCouponController.java
+2
-2
No files found.
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/controller/AuthController.java
View file @
a4533103
...
@@ -76,9 +76,10 @@ public class AuthController {
...
@@ -76,9 +76,10 @@ public class AuthController {
@RequestMapping
(
value
=
"/register"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/register"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
register
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
public
JSONObject
register
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
)
throws
Exception
{
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
)
throws
Exception
{
log
.
info
(
username
+
"----require register..."
);
log
.
info
(
username
+
"----require register..."
);
JSONObject
data
=
appAuthService
.
register
(
username
,
mobilecode
,
password
);
JSONObject
data
=
appAuthService
.
register
(
username
,
mobilecode
,
password
,
code
);
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
JwtAuthenticationRequest
authenticationRequest
=
new
JwtAuthenticationRequest
();
JwtAuthenticationRequest
authenticationRequest
=
new
JwtAuthenticationRequest
();
authenticationRequest
.
setUsername
(
username
);
authenticationRequest
.
setUsername
(
username
);
...
@@ -98,11 +99,12 @@ public class AuthController {
...
@@ -98,11 +99,12 @@ public class AuthController {
@RequestParam
(
value
=
"openid"
,
defaultValue
=
""
)
String
openid
,
@RequestParam
(
value
=
"openid"
,
defaultValue
=
""
)
String
openid
,
@RequestParam
(
value
=
"unionid"
,
defaultValue
=
""
)
String
unionid
,
@RequestParam
(
value
=
"unionid"
,
defaultValue
=
""
)
String
unionid
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"isQQ"
,
defaultValue
=
"0"
)
Integer
isQQ
@RequestParam
(
value
=
"isQQ"
,
defaultValue
=
"0"
)
Integer
isQQ
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
)
throws
Exception
{
)
throws
Exception
{
log
.
info
(
username
+
"----require wxregister..."
);
log
.
info
(
username
+
"----require wxregister..."
);
JSONObject
data
=
appAuthService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
JSONObject
data
=
appAuthService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
);
headimgurl
,
openid
,
unionid
,
type
,
isQQ
,
code
);
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
JSONObject
result
=
data
.
getJSONObject
(
"data"
);
JSONObject
result
=
data
.
getJSONObject
(
"data"
);
if
(
result
==
null
){
if
(
result
==
null
){
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/feign/IUserService.java
View file @
a4533103
...
@@ -28,13 +28,14 @@ public interface IUserService {
...
@@ -28,13 +28,14 @@ public interface IUserService {
@RequestMapping
(
value
=
"/api/app/user/register"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/api/app/user/register"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
register
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
public
JSONObject
register
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
);
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
,
@RequestParam
(
value
=
"code"
)
String
code
);
@RequestMapping
(
value
=
"/api/app/user/wxregister"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/api/app/user/wxregister"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
wxregister
(
public
JSONObject
wxregister
(
@RequestParam
(
value
=
"username"
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
)
String
mobilecode
,
@RequestParam
(
value
=
"username"
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
)
String
mobilecode
,
@RequestParam
(
value
=
"password"
)
String
password
,
@RequestParam
(
value
=
"nickname"
)
String
nickname
,
@RequestParam
(
value
=
"password"
)
String
password
,
@RequestParam
(
value
=
"nickname"
)
String
nickname
,
@RequestParam
(
value
=
"headimgurl"
)
String
headimgurl
,
@RequestParam
(
value
=
"openid"
)
String
openid
,
@RequestParam
(
value
=
"headimgurl"
)
String
headimgurl
,
@RequestParam
(
value
=
"openid"
)
String
openid
,
@RequestParam
(
value
=
"unionid"
)
String
unionid
,
@RequestParam
(
value
=
"type"
)
Integer
type
,
@RequestParam
(
value
=
"isQQ"
)
Integer
isQQ
);
@RequestParam
(
value
=
"unionid"
)
String
unionid
,
@RequestParam
(
value
=
"type"
)
Integer
type
,
@RequestParam
(
value
=
"isQQ"
)
Integer
isQQ
,
@RequestParam
(
value
=
"code"
)
String
code
);
@RequestMapping
(
value
=
"/api/app/user/checkBindWechat"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/api/app/user/checkBindWechat"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
checkBindWechat
(
@RequestParam
(
value
=
"username"
)
String
username
);
public
JSONObject
checkBindWechat
(
@RequestParam
(
value
=
"username"
)
String
username
);
@RequestMapping
(
value
=
"/api/app/user/wxlogin"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/api/app/user/wxlogin"
,
method
=
RequestMethod
.
POST
)
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/AuthService.java
View file @
a4533103
...
@@ -10,8 +10,8 @@ public interface AuthService {
...
@@ -10,8 +10,8 @@ public interface AuthService {
String
refresh
(
String
oldToken
)
throws
Exception
;
String
refresh
(
String
oldToken
)
throws
Exception
;
void
validate
(
String
token
)
throws
Exception
;
void
validate
(
String
token
)
throws
Exception
;
JSONObject
sendsms
(
String
username
,
Integer
type
)
throws
Exception
;
JSONObject
sendsms
(
String
username
,
Integer
type
)
throws
Exception
;
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
)
throws
Exception
;
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
)
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
checkBindWechat
(
String
username
)
throws
Exception
;
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
)
throws
Exception
;
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
)
throws
Exception
;
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
)
throws
Exception
;
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
)
throws
Exception
;
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
View file @
a4533103
...
@@ -51,13 +51,13 @@ public class AppAuthServiceImpl implements AuthService {
...
@@ -51,13 +51,13 @@ public class AppAuthServiceImpl implements AuthService {
}
}
@Override
@Override
public
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
)
throws
Exception
{
public
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
)
throws
Exception
{
return
userService
.
register
(
username
,
mobilecode
,
password
);
return
userService
.
register
(
username
,
mobilecode
,
password
,
code
);
}
}
@Override
@Override
public
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
)
throws
Exception
{
public
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
)
throws
Exception
{
return
userService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
);
return
userService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
,
code
);
}
}
@Override
@Override
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AuthServiceImpl.java
View file @
a4533103
...
@@ -50,13 +50,13 @@ public class AuthServiceImpl implements AuthService {
...
@@ -50,13 +50,13 @@ public class AuthServiceImpl implements AuthService {
return
userService
.
sendsms
(
username
,
type
);
return
userService
.
sendsms
(
username
,
type
);
}
}
@Override
@Override
public
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
)
throws
Exception
{
public
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
)
throws
Exception
{
return
userService
.
register
(
username
,
mobilecode
,
password
);
return
userService
.
register
(
username
,
mobilecode
,
password
,
code
);
}
}
@Override
@Override
public
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
)
throws
Exception
{
public
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
)
throws
Exception
{
return
userService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
);
return
userService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
,
code
);
}
}
@Override
@Override
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/feign/ActivityFeign.java
View file @
a4533103
...
@@ -37,7 +37,7 @@ public interface ActivityFeign {
...
@@ -37,7 +37,7 @@ public interface ActivityFeign {
public
ObjectRestResponse
cancelUse
(
@RequestParam
(
value
=
"TickerNo"
,
defaultValue
=
""
)
String
TickerNo
);
public
ObjectRestResponse
cancelUse
(
@RequestParam
(
value
=
"TickerNo"
,
defaultValue
=
""
)
String
TickerNo
);
@ApiOperation
(
"新人有礼参加活动"
)
@ApiOperation
(
"新人有礼参加活动"
)
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/
join/
user"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
join
(
@RequestParam
(
value
=
"userId"
,
defaultValue
=
"0"
)
Integer
userId
);
public
ObjectRestResponse
join
(
@RequestParam
(
value
=
"userId"
,
defaultValue
=
"0"
)
Integer
userId
);
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityUserJoinBiz.java
View file @
a4533103
...
@@ -45,7 +45,7 @@ public class ActivityUserJoinBiz extends BaseBiz<ActivityUserJoinMapper,Activity
...
@@ -45,7 +45,7 @@ public class ActivityUserJoinBiz extends BaseBiz<ActivityUserJoinMapper,Activity
userJoin
.
setActivityId
(
activityId
);
userJoin
.
setActivityId
(
activityId
);
userJoin
.
setUserId
(
userId
);
userJoin
.
setUserId
(
userId
);
Long
num
=
selectCount
(
userJoin
);
Long
num
=
selectCount
(
userJoin
);
if
(
num
!=
null
||
num
>
0
){
if
(
num
!=
null
&&
num
>
0
){
log
.
error
(
"----用户已经参与活动----userId===="
+
userId
);
log
.
error
(
"----用户已经参与活动----userId===="
+
userId
);
return
;
return
;
}
}
...
@@ -63,11 +63,15 @@ public class ActivityUserJoinBiz extends BaseBiz<ActivityUserJoinMapper,Activity
...
@@ -63,11 +63,15 @@ public class ActivityUserJoinBiz extends BaseBiz<ActivityUserJoinMapper,Activity
ActivityUserJoin
userJoin
=
new
ActivityUserJoin
();
ActivityUserJoin
userJoin
=
new
ActivityUserJoin
();
userJoin
.
setActivityId
(
activityId
);
userJoin
.
setActivityId
(
activityId
);
userJoin
.
setUserId
(
userId
);
userJoin
.
setUserId
(
userId
);
Long
num
=
selectCount
(
userJoin
);
userJoin
=
selectOne
(
userJoin
);
if
(
num
==
null
||
num
==
0
)
{
if
(
userJoin
==
null
)
{
log
.
error
(
"----用户没有此参与活动----userId===="
+
userId
);
log
.
error
(
"----用户没有此参与活动----userId===="
+
userId
);
return
;
return
;
}
}
if
(
userJoin
.
getStatus
()!=
0
){
log
.
error
(
"----用户已领取----userId===="
+
userId
);
return
;
}
String
value
=
rule
.
getValue
();
String
value
=
rule
.
getValue
();
JSONObject
json
=
JSONObject
.
parseObject
(
value
);
JSONObject
json
=
JSONObject
.
parseObject
(
value
);
if
(
json
!=
null
){
if
(
json
!=
null
){
...
@@ -81,8 +85,9 @@ public class ActivityUserJoinBiz extends BaseBiz<ActivityUserJoinMapper,Activity
...
@@ -81,8 +85,9 @@ public class ActivityUserJoinBiz extends BaseBiz<ActivityUserJoinMapper,Activity
}
}
}
}
}
}
}
}
userJoin
.
setStatus
(
1
);
updateById
(
userJoin
);
}
}
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/UserCouponController.java
View file @
a4533103
...
@@ -29,7 +29,7 @@ public class UserCouponController extends ActivityBaseController<UserCouponBiz>
...
@@ -29,7 +29,7 @@ public class UserCouponController extends ActivityBaseController<UserCouponBiz>
@RequestMapping
(
value
=
"/list/{type}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/list/{type}"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
list
(
@PathVariable
Integer
type
)
{
public
ObjectRestResponse
list
(
@PathVariable
Integer
type
)
{
AppUserDTO
userInfo
=
getUserInfo
();
AppUserDTO
userInfo
=
getUserInfo
();
Integer
userId
=
userInfo
.
get
I
d
();
Integer
userId
=
userInfo
.
get
Useri
d
();
if
(
userId
==
null
){
if
(
userId
==
null
){
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
...
@@ -66,7 +66,7 @@ public class UserCouponController extends ActivityBaseController<UserCouponBiz>
...
@@ -66,7 +66,7 @@ public class UserCouponController extends ActivityBaseController<UserCouponBiz>
@RequestMapping
(
value
=
"/coupon/led"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/coupon/led"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
led
()
{
public
ObjectRestResponse
led
()
{
AppUserDTO
userInfo
=
getUserInfo
();
AppUserDTO
userInfo
=
getUserInfo
();
Integer
userId
=
userInfo
.
get
I
d
();
Integer
userId
=
userInfo
.
get
Useri
d
();
if
(
userId
==
null
)
{
if
(
userId
==
null
)
{
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
...
...
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