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
0c1a0c05
Commit
0c1a0c05
authored
Jul 05, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
b7d8f529
db576611
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
42 deletions
+39
-42
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+37
-41
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+1
-1
VehicleController.java
...ava/com/xxfc/platform/vehicle/rest/VehicleController.java
+1
-0
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
0c1a0c05
...
...
@@ -253,7 +253,7 @@ public class AppPermissionService {
Map
<
String
,
Object
>
map
=
registerIm
(
username
,
appUserLogin
.
getPassword
(),
nickname
);
if
(
map
!=
null
){
Integer
imUserId
=
Integer
.
parseInt
(
map
.
get
(
"userId"
).
toString
());
String
access_token
=
map
.
get
(
"access_token"
).
toString
();
//
String access_token=map.get("access_token").toString();
String
imPassword
=
map
.
get
(
"password"
).
toString
();
if
(
imUserId
!=
null
&&
imUserId
>
0
&&
StringUtils
.
isNotBlank
(
imPassword
)){
AppUserLogin
userLogin
=
new
AppUserLogin
();
...
...
@@ -264,7 +264,7 @@ public class AppPermissionService {
appUserLoginBiz
.
updateSelectiveById
(
userLogin
);
log
.
info
(
username
+
"----userLogin updateSelectiveById---username====="
+
username
+
"----imPassword===="
+
imPassword
);
}
data
.
put
(
"imToken"
,
access_token
);
//
data.put("imToken",access_token);
data
.
put
(
"imUserId"
,
imUserId
);
}
if
(
data
!=
null
)
{
...
...
@@ -283,12 +283,10 @@ public class AppPermissionService {
*/
public
JSONObject
autoLogin
(
Integer
userid
,
String
username
,
String
headimgurl
,
String
nickname
)
{
JSONObject
data
=
new
JSONObject
();
AppUserLogin
userLoign
=
appUserLoginBiz
.
selectById
(
userid
);
if
(
userLoign
!=
null
)
{
data
.
put
(
"nickname"
,
nickname
);
data
.
put
(
"headerurl"
,
headimgurl
);
AppUserVo
userVo
=
appUserDetailBiz
.
getUserInfoById
(
userid
);
if
(
userVo
!=
null
)
{
data
.
put
(
"nickname"
,
nickname
);
data
.
put
(
"headerurl"
,
headimgurl
);
if
(
StringUtils
.
isNotBlank
(
userVo
.
getNickname
()))
{
data
.
put
(
"nickname"
,
userVo
.
getNickname
());
}
...
...
@@ -296,7 +294,6 @@ public class AppPermissionService {
data
.
put
(
"headerurl"
,
userVo
.
getHeadimgurl
());
}
data
.
put
(
"certificationStatus"
,
userVo
.
getCertificationStatus
());
}
// 缓存操作
String
token
=
""
;
String
imtoken_
=
""
;
...
...
@@ -304,13 +301,16 @@ public class AppPermissionService {
//userRedisTemplate.opsForValue().set("imtoken_" + userid,imtoken_,SystemConfig.REDISTOKENTIME, TimeUnit.SECONDS);
// 返回结果
// data.put("token", token);
data
.
put
(
"username"
,
StringUtils
.
isNotEmpty
(
username
)?
username:
userLoign
.
getUsername
());
data
.
put
(
"username"
,
StringUtils
.
isNotEmpty
(
username
)?
username:
userVo
.
getUsername
());
data
.
put
(
"userId"
,
userid
);
data
.
put
(
"imUserId"
,
userVo
.
getImUserid
());
//更新登录时间 和 ip
EntityUtils
.
setCreatAndUpdatInfo
(
userLoign
);
AppUserLogin
userLoign
=
new
AppUserLogin
();
EntityUtils
.
setCreateInfo
(
userLoign
);
appUserLoginBiz
.
updateLoginInfo
(
userid
,
userLoign
.
getCrtHost
());
}
return
data
;
}
...
...
@@ -387,14 +387,14 @@ public class AppPermissionService {
}*/
// 登录结果要做做统一处理
JSONObject
data
=
autoLogin
(
userid
,
username
,
headimgurl
,
nickname
);
// 到im
注册
,获取返回结果
Integer
imUserId
=
userLogin
.
getImUserid
();
// 到im
登录
,获取返回结果
/*
Integer imUserId=userLogin.getImUserid();
String imPassword=userLogin.getImPassword();
if(StringUtils.isNotBlank(imPassword)&&imUserId!=null&&imUserId>0){
String access_token=loginIm(username,imPassword,imUserId);
data.put("imToken",access_token);
data.put("imUserId",imUserId);
}
}
*/
if
(
data
!=
null
)
{
return
JsonResultUtil
.
createSuccessResultWithObj
(
data
);
}
...
...
@@ -474,14 +474,14 @@ public class AppPermissionService {
nickname
=
userVo
.
getNickname
();
}
JSONObject
data
=
autoLogin
(
userid
,
userLogin
.
getUsername
(),
headimgurl
,
nickname
);
// 到im注册,获取返回结果
/*
// 到im注册,获取返回结果
Integer imUserId=userLogin.getImUserid();
String imPassword=userLogin.getImPassword();
if(StringUtils.isNotBlank(imPassword)&&imUserId!=null&&imUserId>0){
String access_token=loginIm(userLogin.getUsername(),imPassword,imUserId);
data.put("imToken",access_token);
data.put("imUserId",imUserId);
}
}
*/
if
(
data
!=
null
)
{
return
JsonResultUtil
.
createSuccessResultWithObj
(
data
);
}
...
...
@@ -516,14 +516,14 @@ public class AppPermissionService {
Integer
userid
=
user
.
getId
();
String
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+
(
int
)
((
Math
.
random
()
*
9
+
1
)
*
100000
);
JSONObject
data
=
autoLogin
(
userid
,
user
.
getUsername
(),
SystemConfig
.
USER_HEADER_URL_DEFAULT
,
nickname
);
// 到im注册,获取返回结果
/
*/
/ 到im注册,获取返回结果
Integer imUserId=user.getImUserid();
String imPassword=user.getImPassword();
if(StringUtils.isNotBlank(imPassword)&&imUserId!=null&&imUserId>0){
String access_token=loginIm(username,imPassword,imUserId);
data.put("imToken",access_token);
data.put("imUserId",imUserId);
}
}
*/
if
(
data
!=
null
)
{
return
JsonResultUtil
.
createSuccessResultWithObj
(
data
);
}
...
...
@@ -557,14 +557,14 @@ public class AppPermissionService {
Integer
userid
=
user
.
getId
();
String
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+
(
int
)
((
Math
.
random
()
*
9
+
1
)
*
100000
);
JSONObject
data
=
autoLogin
(
userid
,
user
.
getUsername
(),
SystemConfig
.
USER_HEADER_URL_DEFAULT
,
nickname
);
// 到im注册
,获取返回结果
/* // 到im登录
,获取返回结果
Integer imUserId=user.getImUserid();
String imPassword=user.getImPassword();
if(StringUtils.isNotBlank(imPassword)&&imUserId!=null&&imUserId>0){
String access_token=loginIm(username,imPassword,imUserId);
data.put("imToken",access_token);
data.put("imUserId",imUserId);
}
}
*/
if
(
data
!=
null
)
{
return
JsonResultUtil
.
createSuccessResultWithObj
(
data
);
}
...
...
@@ -638,10 +638,10 @@ public class AppPermissionService {
log
.
error
(
"------im注册----data======"
+
data
);
if
(
data
!=
null
)
{
map
.
put
(
"userId"
,
data
.
getString
(
"userId"
));
map
.
put
(
"access_token"
,
data
.
getString
(
"access_token"
));
//
map.put("access_token", data.getString("access_token"));
}
else
{
map
.
put
(
"userId"
,
""
);
map
.
put
(
"access_token"
,
""
);
//
map.put("access_token", "");
}
}
}
...
...
@@ -658,7 +658,7 @@ public class AppPermissionService {
map
.
put
(
"password"
,
password
);
map
.
put
(
"userId"
,
userId
);
BaseResponse
response
=
imFeign
.
login
(
map
);
log
.
error
(
"
register
Im->response:{}"
,
response
);
log
.
error
(
"
login
Im->response:{}"
,
response
);
String
access_token
=
""
;
if
(
response
.
getStatus
()
==
ResultCode
.
SUCCESS_CODE
)
{
String
result
=
response
.
getMessage
();
...
...
@@ -721,7 +721,6 @@ public class AppPermissionService {
//主要是ip地址
EntityUtils
.
setCreatAndUpdatInfo
(
appUserLogin
);
setCreateIPInfo
(
appUserLogin
);
appUserLogin
.
setUsername
(
username
);
appUserLogin
.
setPassword
(
password
);
appUserLogin
.
setIsdel
(
0
);
...
...
@@ -745,17 +744,15 @@ public class AppPermissionService {
log
.
error
(
"注册:新增用户详情: "
+
userid
);
//上线绑定
relationBiz
.
bindByUserId
(
userid
,
small_id
);
//自动登录获取优惠卷
authCoupn
(
userid
);
//发送短信通知用户
thirdFeign
.
sendCode
(
username
,
password
,
SystemConfig
.
TEMPLATECODE
);
// 登录结果要做做统一处理
JSONObject
data
=
autoLogin
(
userid
,
username
,
headimgurl
,
nickname
);
// 到im注册,获取返回结果
/*
Map<String,Object> map=registerIm(username,appUserLogin.getPassword(),nickname);
Map
<
String
,
Object
>
map
=
registerIm
(
username
,
appUserLogin
.
getPassword
(),
nickname
);
if
(
map
!=
null
){
Integer
imUserId
=
Integer
.
parseInt
(
map
.
get
(
"userId"
).
toString
());
String access_token=map.get("access_token").toString();
//
String access_token=map.get("access_token").toString();
String
imPassword
=
map
.
get
(
"password"
).
toString
();
if
(
imUserId
!=
null
&&
imUserId
>
0
&&
StringUtils
.
isNotBlank
(
imPassword
)){
AppUserLogin
userLogin
=
new
AppUserLogin
();
...
...
@@ -766,11 +763,10 @@ public class AppPermissionService {
appUserLoginBiz
.
updateSelectiveById
(
userLogin
);
log
.
info
(
username
+
"----userLogin updateSelectiveById---username====="
+
username
+
"----imPassword===="
+
imPassword
);
}
data.put("imToken",access_token);
//
data.put("imToken",access_token);
data
.
put
(
"imUserId"
,
imUserId
);
}
*/
}
if
(
data
!=
null
)
{
return
JsonResultUtil
.
createSuccessResultWithObj
(
data
);
}
else
{
return
JsonResultUtil
.
createDefaultFail
();
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
0c1a0c05
...
...
@@ -216,7 +216,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
vehicleFeign
.
unbookVehicle
(
orvd
.
getBookRecordId
());
}
else
{
//未支付,拒绝之前的预约
vehicleFeign
.
rentRejectVehicleBooking
(
orvd
.
getBookRecordId
());
RestResponse
<
Integer
>
restResponse
=
vehicleFeign
.
rentRejectVehicleBooking
(
orvd
.
getBookRecordId
());
}
//取消租车免费天数使用
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleController.java
View file @
0c1a0c05
...
...
@@ -248,6 +248,7 @@ public class VehicleController extends BaseController<VehicleBiz> {
*/
@RequestMapping
(
value
=
"/rent/book/reject/{bookRecordId}"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
value
=
"租车拒绝预定车辆"
)
@IgnoreUserToken
public
RestResponse
<
Integer
>
rentRejectVehicleBooking
(
@PathVariable
Long
bookRecordId
)
throws
Exception
{
//默认USER_APP 预约
Integer
operatorId
=
USER_APP
;
...
...
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