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
76db2a7d
Commit
76db2a7d
authored
Jun 28, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
205db241
e0ee846c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
11 deletions
+20
-11
AuthBootstrap.java
.../java/com/github/wxiaoqi/security/auth/AuthBootstrap.java
+1
-1
CommonConstants.java
...hub/wxiaoqi/security/common/constant/CommonConstants.java
+1
-0
BaseException.java
...thub/wxiaoqi/security/common/exception/BaseException.java
+4
-8
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+1
-0
HeaderConfig.java
...m/github/wxiaoqi/security/api/vo/config/HeaderConfig.java
+3
-0
OrderTourVerificationBiz.java
...com/xxfc/platform/order/biz/OrderTourVerificationBiz.java
+2
-0
OrderRentVehicleService.java
.../xxfc/platform/order/service/OrderRentVehicleService.java
+4
-0
BaseExceptionHandler.java
...om/xxfc/platform/vehicle/config/BaseExceptionHandler.java
+1
-1
VehicleController.java
...ava/com/xxfc/platform/vehicle/rest/VehicleController.java
+3
-1
No files found.
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/AuthBootstrap.java
View file @
76db2a7d
...
...
@@ -13,7 +13,7 @@ import tk.mybatis.spring.annotation.MapperScan;
*/
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
(
defaultConfiguration
=
HeaderConfig
.
class
)
@EnableFeignClients
@MapperScan
(
"com.github.wxiaoqi.security.auth.mapper"
)
//@EnableAutoConfiguration
public
class
AuthBootstrap
{
...
...
ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/CommonConstants.java
View file @
76db2a7d
...
...
@@ -6,6 +6,7 @@ package com.github.wxiaoqi.security.common.constant;
public
class
CommonConstants
{
public
static
final
Integer
SYS_TRUE
=
1
;
public
static
final
Integer
SYS_FALSE
=
0
;
public
static
final
Integer
SYS_JSON_TRUE
=
200
;
public
final
static
String
RESOURCE_TYPE_MENU
=
"menu"
;
public
final
static
String
RESOURCE_TYPE_BTN
=
"button"
;
// 用户token异常
...
...
ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/BaseException.java
View file @
76db2a7d
...
...
@@ -53,12 +53,8 @@ public class BaseException extends RuntimeException {
this
.
status
=
code
;
}
// public BaseException(int code, Map<String, Object> map) {
// String msg = ResultCode.getMsg(code);
// if(null != map && map.size() > 0){
// for(String)
//
// }
// this.status = code;
// }
public
BaseException
(
int
code
,
Map
<
String
,
Object
>
map
)
{
super
(
ResultCode
.
getMsg
(
code
)
+
(
map
==
null
?
""
:
map
.
toString
()));
this
.
status
=
code
;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
76db2a7d
...
...
@@ -240,6 +240,7 @@ public class AppPermissionService {
userLogin
.
setImUserid
(
imUserId
);
userLogin
.
setUsername
(
username
);
appUserLoginBiz
.
updateSelectiveById
(
userLogin
);
log
.
info
(
username
+
"----userLogin updateSelectiveById---username====="
+
username
+
"----imPassword===="
+
imPassword
);
}
data
.
put
(
"imToken"
,
access_token
);
data
.
put
(
"imUserId"
,
imUserId
);
...
...
ace-modules/ace-interface/src/main/java/com/github/wxiaoqi/security/api/vo/config/HeaderConfig.java
View file @
76db2a7d
...
...
@@ -2,6 +2,7 @@ package com.github.wxiaoqi.security.api.vo.config;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestAttributes
;
...
...
@@ -17,6 +18,7 @@ import java.util.Enumeration;
* @description 设置请求头部信息,防止微服务之间调用请求头部信息丢失
* @data 2019/6/25 16:22
*/
@Slf4j
public
class
HeaderConfig
implements
RequestInterceptor
{
@Override
...
...
@@ -31,6 +33,7 @@ public class HeaderConfig implements RequestInterceptor {
while
(
headerNames
.
hasMoreElements
()){
String
headerName
=
headerNames
.
nextElement
();
String
headerValue
=
request
.
getHeader
(
headerName
);
log
.
info
(
"----headerName===="
+
headerName
+
"----headerValue===="
+
headerValue
);
template
.
header
(
headerName
,
headerValue
);
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderTourVerificationBiz.java
View file @
76db2a7d
...
...
@@ -61,6 +61,7 @@ public class OrderTourVerificationBiz{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"订单不是已支付状态"
);
}
Integer
orderId
=
baseOrder
.
getId
();
Integer
version
=
baseOrder
.
getVersion
();
OrderTourDetail
tourDetail
=
new
OrderTourDetail
();
tourDetail
.
setOrderId
(
orderId
);
tourDetail
=
tourDetailBiz
.
selectOne
(
tourDetail
);
...
...
@@ -81,6 +82,7 @@ public class OrderTourVerificationBiz{
baseOrder
=
new
BaseOrder
();
baseOrder
.
setId
(
orderId
);
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FINISH
.
getCode
());
baseOrder
.
setVersion
(
version
);
baseOrderBiz
.
updateSelectiveById
(
baseOrder
);
tourDetail
.
setVerificationUser
(
userDTO
.
getId
());
tourDetail
.
setVerificationName
(
userDTO
.
getName
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderRentVehicleService.java
View file @
76db2a7d
...
...
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
import
com.github.wxiaoqi.security.admin.constant.enumerate.MemberEnum
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.constant.CommonConstants
;
import
com.github.wxiaoqi.security.common.context.BaseContextHandler
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
...
...
@@ -251,6 +252,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
rentVehicleBookDTO
.
setModelId
(
detail
.
getModelId
());
rentVehicleBookDTO
.
setUserName
(
BaseContextHandler
.
getName
());
ObjectRestResponse
<
VehicleBookRecord
>
orr
=
vehicleFeign
.
rentApplyVehicle
(
rentVehicleBookDTO
);
if
(!
CommonConstants
.
SYS_JSON_TRUE
.
equals
(
orr
.
getStatus
()))
{
throw
new
BaseException
(
orr
.
getMessage
(),
orr
.
getStatus
());
}
detail
.
setVehicleId
(
orr
.
getData
().
getVehicleId
());
detail
.
setBookRecordId
(
orr
.
getData
().
getId
());
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/config/BaseExceptionHandler.java
View file @
76db2a7d
...
...
@@ -5,7 +5,7 @@ import com.xxfc.platform.vehicle.common.RestResponse;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
@RestControllerAdvice
//
@RestControllerAdvice
public
class
BaseExceptionHandler
{
@ExceptionHandler
(
BaseException
.
class
)
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleController.java
View file @
76db2a7d
...
...
@@ -401,7 +401,9 @@ public class VehicleController extends BaseController<VehicleBiz> {
//查询可车辆信息
PageDataVO
<
Vehicle
>
pageDataVO
=
vehicleBiz
.
searchUsableVehicle
(
dto
);
if
(
pageDataVO
.
getData
().
size
()
<=
0
)
{
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
);
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"可用车辆"
,
"不存在"
);
}});
}
bookVehicleVo
.
setVehicleId
(
pageDataVO
.
getData
().
get
(
0
).
getId
());
...
...
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