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
e298edfd
Commit
e298edfd
authored
Jun 29, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
514f91a9
1408dd55
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
139 additions
and
19 deletions
+139
-19
HeaderConfig.java
...m/github/wxiaoqi/security/api/vo/config/HeaderConfig.java
+3
-5
CofigMapper.java
...c/main/java/com/xxfc/platform/app/mapper/CofigMapper.java
+1
-1
WebConfiguration.java
...a/com/xxfc/platform/campsite/config/WebConfiguration.java
+1
-1
bootstrap.yml
...psite/xx-campsite-server/src/main/resources/bootstrap.yml
+2
-1
pom.xml
xx-common/pom.xml
+1
-0
pom.xml
xx-common/xx-common-platform-component/pom.xml
+31
-4
HeaderConfig.java
...in/java/com/xxfc/platform/common/config/HeaderConfig.java
+1
-2
SwaggerConfig.java
...n/java/com/xxfc/platform/common/config/SwaggerConfig.java
+68
-1
OrderVehicleCrosstownController.java
.../platform/order/rest/OrderVehicleCrosstownController.java
+10
-2
TourTagBiz.java
.../src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
+5
-1
RestConfiguration.java
...java/com/xxfc/platform/tour/config/RestConfiguration.java
+5
-0
bootstrap.yml
xx-tour/xx-tour-server/src/main/resources/bootstrap.yml
+11
-0
VehicleScoreType.java
.../com/xxfc/platform/vehicle/constant/VehicleScoreType.java
+0
-1
No files found.
ace-modules/ace-interface/src/main/java/com/github/wxiaoqi/security/api/vo/config/HeaderConfig.java
View file @
e298edfd
package
com
.
github
.
wxiaoqi
.
security
.
api
.
vo
.
config
;
package
com
.
github
.
wxiaoqi
.
security
.
api
.
vo
.
config
;
import
feign.Logger
;
import
feign.RequestInterceptor
;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
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
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
...
@@ -18,7 +16,6 @@ import java.util.Enumeration;
...
@@ -18,7 +16,6 @@ import java.util.Enumeration;
* @description 设置请求头部信息,防止微服务之间调用请求头部信息丢失
* @description 设置请求头部信息,防止微服务之间调用请求头部信息丢失
* @data 2019/6/25 16:22
* @data 2019/6/25 16:22
*/
*/
@Slf4j
public
class
HeaderConfig
implements
RequestInterceptor
{
public
class
HeaderConfig
implements
RequestInterceptor
{
@Override
@Override
...
@@ -33,10 +30,11 @@ public class HeaderConfig implements RequestInterceptor {
...
@@ -33,10 +30,11 @@ public class HeaderConfig implements RequestInterceptor {
while
(
headerNames
.
hasMoreElements
()){
while
(
headerNames
.
hasMoreElements
()){
String
headerName
=
headerNames
.
nextElement
();
String
headerName
=
headerNames
.
nextElement
();
String
headerValue
=
request
.
getHeader
(
headerName
);
String
headerValue
=
request
.
getHeader
(
headerName
);
log
.
info
(
"----headerName===="
+
headerName
+
"----headerValue===="
+
headerValue
);
template
.
header
(
headerName
,
headerValue
);
template
.
header
(
headerName
,
headerValue
);
}
}
}
}
}
}
}
}
}
}
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/mapper/CofigMapper.java
View file @
e298edfd
...
@@ -22,6 +22,6 @@ public interface CofigMapper extends Mapper<Cofig> {
...
@@ -22,6 +22,6 @@ public interface CofigMapper extends Mapper<Cofig> {
* @param cofig
* @param cofig
* @return
* @return
*/
*/
@Update
(
"update config
set `title`=#{title},`value`=#{value}`,`type`=#{type},`upd_time`=#{updTime} where `id`
=#{id}"
)
@Update
(
"update config
`cf` set cf.title=#{title},cf.value=#{value},cf.type=#{type},cf.upd_time=#{updTime} where cf.id
=#{id}"
)
int
updateConfig
(
Cofig
cofig
);
int
updateConfig
(
Cofig
cofig
);
}
}
xx-campsite/xx-campsite-server/src/main/java/com/xxfc/platform/campsite/config/WebConfiguration.java
View file @
e298edfd
...
@@ -12,7 +12,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
...
@@ -12,7 +12,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
@Configuration
(
"
tour
WebConfig"
)
@Configuration
(
"
campsite
WebConfig"
)
@Primary
@Primary
public
class
WebConfiguration
implements
WebMvcConfigurer
{
public
class
WebConfiguration
implements
WebMvcConfigurer
{
...
...
xx-campsite/xx-campsite-server/src/main/resources/bootstrap.yml
View file @
e298edfd
...
@@ -22,3 +22,4 @@ spring:
...
@@ -22,3 +22,4 @@ spring:
nacos
:
nacos
:
config
:
config
:
server-addr
:
10.5.52.2:8848
server-addr
:
10.5.52.2:8848
xx-common/pom.xml
View file @
e298edfd
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<module>
xx-common-platform
</module>
<module>
xx-common-platform
</module>
<module>
xx-common-platform-web
</module>
<module>
xx-common-platform-web
</module>
<module>
xx-common-platform-component
</module>
<module>
xx-common-platform-component
</module>
<module>
xx-common-demo
</module>
</modules>
</modules>
</project>
</project>
\ No newline at end of file
xx-common/xx-common-platform-component/pom.xml
View file @
e298edfd
...
@@ -11,17 +11,44 @@
...
@@ -11,17 +11,44 @@
<groupId>
com.xxfc.platform
</groupId>
<groupId>
com.xxfc.platform
</groupId>
<artifactId>
xx-common-platform-component
</artifactId>
<artifactId>
xx-common-platform-component
</artifactId>
<properties>
<swagger.version>
2.9.2
</swagger.version>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
<scope>
provided
</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<groupId>
com.github.wxiaoqi
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<artifactId>
ace-common
</artifactId>
<version>
4.0.1
</version>
<version>
2.0-SNAPSHOT
</version>
<exclusions>
<exclusion>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
${swagger.version}
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
${swagger.version}
</version>
<scope>
provided
</scope>
<scope>
provided
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
xx-common/xx-common-platform-component/src/main/java/com/xxfc/platform/common/config/HeaderConfig.java
View file @
e298edfd
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.common.config;
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.common.config;
import
feign.RequestInterceptor
;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
import
feign.RequestTemplate
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestAttributes
;
...
@@ -17,8 +18,6 @@ import java.util.Enumeration;
...
@@ -17,8 +18,6 @@ import java.util.Enumeration;
* @description 设置请求头部信息,防止微服务之间调用请求头部信息丢失
* @description 设置请求头部信息,防止微服务之间调用请求头部信息丢失
* @data 2019/6/25 16:22
* @data 2019/6/25 16:22
*/
*/
@Configuration
@Component
public
class
HeaderConfig
implements
RequestInterceptor
{
public
class
HeaderConfig
implements
RequestInterceptor
{
@Override
@Override
...
...
xx-common/xx-common-platform-component/src/main/java/com/xxfc/platform/common/config/SwaggerConfig.java
View file @
e298edfd
package
com
.
xxfc
.
platform
.
common
.
config
;
package
com
.
xxfc
.
platform
.
common
.
config
;
import
io.swagger.annotations.Api
;
import
lombok.Setter
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Profile
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.ParameterBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.schema.ModelRef
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.service.Parameter
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* @author libin
* @author libin
* @version 1.0
* @version 1.0
* @description
TODO
* @description
通用swagger设置
* @data 2019/6/26 10:28
* @data 2019/6/26 10:28
*/
*/
@Profile
(
value
=
{
"dev"
,
"test"
})
@ConditionalOnClass
(
value
=
EnableSwagger2
.
class
)
@ConditionalOnProperty
(
prefix
=
"xxfc"
,
name
=
"swagger"
,
havingValue
=
"true"
)
@EnableSwagger2
@Setter
public
class
SwaggerConfig
{
public
class
SwaggerConfig
{
@Value
(
"${xxfc.swagger.title:xxfc api swagger document}"
)
private
String
title
;
@Value
(
"${xxfc.swagger.description:前后端联调xxfc api 文档}"
)
private
String
description
;
@Value
(
"${xxfc.swagger.version:1.0.0}"
)
private
String
version
;
@Value
(
"${jwt.tokenHeader:Authorization}"
)
private
String
header
;
@Bean
public
Docket
docket
(){
ParameterBuilder
ticketPar
=
new
ParameterBuilder
();
List
<
Parameter
>
parameters
=
new
ArrayList
<
Parameter
>();
ticketPar
.
name
(
header
).
description
(
"user Authorization"
)
.
modelRef
(
new
ModelRef
(
"string"
)).
parameterType
(
"header"
)
//header中的ticket参数非必填,传空也可以
.
required
(
false
).
build
();
//根据每个方法名也知道当前方法在设置什么参数
parameters
.
add
(
ticketPar
.
build
());
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
select
()
.
apis
(
RequestHandlerSelectors
.
withClassAnnotation
(
Api
.
class
))
.
paths
(
PathSelectors
.
any
())
.
build
()
.
globalOperationParameters
(
parameters
);
}
private
ApiInfo
apiInfo
(){
return
new
ApiInfoBuilder
()
.
title
(
title
)
.
description
(
description
)
.
version
(
version
)
.
build
();
}
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderVehicleCrosstownController.java
View file @
e298edfd
...
@@ -55,6 +55,9 @@ public class OrderVehicleCrosstownController {
...
@@ -55,6 +55,9 @@ public class OrderVehicleCrosstownController {
if
(
baseOrder
.
getStatus
()
==
4
)
{
if
(
baseOrder
.
getStatus
()
==
4
)
{
baseOrder
.
setStatus
(
5
);
baseOrder
.
setStatus
(
5
);
baseOrderBiz
.
updateSelectiveById
(
baseOrder
);
baseOrderBiz
.
updateSelectiveById
(
baseOrder
);
}
else
if
(
baseOrder
.
getStatus
()
==
5
)
{
baseOrder
.
setStatus
(
6
);
baseOrderBiz
.
updateSelectiveById
(
baseOrder
);
}
}
OrderVehicleCrosstownDto
vehicleCrosstownDto
=
new
OrderVehicleCrosstownDto
();
OrderVehicleCrosstownDto
vehicleCrosstownDto
=
new
OrderVehicleCrosstownDto
();
BeanUtil
.
copyProperties
(
oldValue
.
get
(
0
),
vehicleCrosstownDto
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
BeanUtil
.
copyProperties
(
oldValue
.
get
(
0
),
vehicleCrosstownDto
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
...
@@ -70,8 +73,13 @@ public class OrderVehicleCrosstownController {
...
@@ -70,8 +73,13 @@ public class OrderVehicleCrosstownController {
getOrderLicense
(
orderVehicleCrosstownDto
);
getOrderLicense
(
orderVehicleCrosstownDto
);
orderVehicalCrosstownBiz
.
insertSelective
(
orderVehicleCrosstownDto
);
orderVehicalCrosstownBiz
.
insertSelective
(
orderVehicleCrosstownDto
);
//交车完成 设置订单状态为出行中
//交车完成 设置订单状态为出行中
if
(
baseOrder
.
getStatus
()
==
4
)
{
baseOrder
.
setStatus
(
5
);
baseOrder
.
setStatus
(
5
);
baseOrderBiz
.
updateSelectiveById
(
baseOrder
);
baseOrderBiz
.
updateSelectiveById
(
baseOrder
);
}
else
if
(
baseOrder
.
getStatus
()
==
5
)
{
baseOrder
.
setStatus
(
6
);
baseOrderBiz
.
updateSelectiveById
(
baseOrder
);
}
return
ObjectRestResponse
.
succ
(
orderVehicleCrosstownDto
);
return
ObjectRestResponse
.
succ
(
orderVehicleCrosstownDto
);
}
}
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
View file @
e298edfd
...
@@ -119,11 +119,15 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
...
@@ -119,11 +119,15 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
* @return
* @return
*/
*/
public
TourTagAndBannerDTO
findTourTagById
(
Integer
tagId
){
public
TourTagAndBannerDTO
findTourTagById
(
Integer
tagId
){
TourTagAndBannerDTO
tourTagAndBannerDTO
=
new
TourTagAndBannerDTO
();
//根据旅游标签id查询出标签信息
//根据旅游标签id查询出标签信息
TourTag
tourTag
=
mapper
.
findById
(
tagId
);
TourTag
tourTag
=
mapper
.
findById
(
tagId
);
if
(
log
.
isDebugEnabled
()){
if
(
log
.
isDebugEnabled
()){
log
.
debug
(
"根据标签id=[{}]查询出标签信息:[{}]"
,
tagId
,
tourTag
);
log
.
debug
(
"根据标签id=[{}]查询出标签信息:[{}]"
,
tagId
,
tourTag
);
}
}
if
(
tourTag
==
null
){
return
tourTagAndBannerDTO
;
}
TourTagDTO
tourTagDTO
=
new
TourTagDTO
();
TourTagDTO
tourTagDTO
=
new
TourTagDTO
();
BeanUtils
.
copyProperties
(
tourTag
,
tourTagDTO
);
BeanUtils
.
copyProperties
(
tourTag
,
tourTagDTO
);
//根据旅游标签id查询出标签对应的轮播图信息
//根据旅游标签id查询出标签对应的轮播图信息
...
@@ -131,7 +135,7 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
...
@@ -131,7 +135,7 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
if
(
log
.
isDebugEnabled
()){
if
(
log
.
isDebugEnabled
()){
log
.
debug
(
"根据标签id=[{}],查询出轮播图信息:[{}]"
,
tagId
,
tourTagBannerDTOS
);
log
.
debug
(
"根据标签id=[{}],查询出轮播图信息:[{}]"
,
tagId
,
tourTagBannerDTOS
);
}
}
TourTagAndBannerDTO
tourTagAndBannerDTO
=
new
TourTagAndBannerDTO
();
//组装数据
//组装数据
tourTagAndBannerDTO
.
setTourTagDTO
(
tourTagDTO
);
tourTagAndBannerDTO
.
setTourTagDTO
(
tourTagDTO
);
tourTagAndBannerDTO
.
setTourTagBannerDTOS
(
tourTagBannerDTOS
);
tourTagAndBannerDTO
.
setTourTagBannerDTOS
(
tourTagBannerDTOS
);
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/config/RestConfiguration.java
View file @
e298edfd
package
com
.
xxfc
.
platform
.
tour
.
config
;
package
com
.
xxfc
.
platform
.
tour
.
config
;
import
feign.Logger
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
...
@@ -10,4 +11,8 @@ public class RestConfiguration {
...
@@ -10,4 +11,8 @@ public class RestConfiguration {
public
RestTemplate
restTemplate
()
{
public
RestTemplate
restTemplate
()
{
return
new
RestTemplate
();
return
new
RestTemplate
();
}
}
@Bean
public
Logger
.
Level
feignLevel
(){
return
Logger
.
Level
.
HEADERS
;
}
}
}
xx-tour/xx-tour-server/src/main/resources/bootstrap.yml
View file @
e298edfd
...
@@ -17,6 +17,17 @@ spring:
...
@@ -17,6 +17,17 @@ spring:
nacos
:
nacos
:
config
:
config
:
file-extension
:
yaml
file-extension
:
yaml
debug
:
true
feign
:
compression
:
response
:
enabled
:
true
request
:
enabled
:
true
logging
:
level
:
com.github.wxiaoqi
:
debug
com.xxfc
:
debug
---
---
spring
:
spring
:
profiles
:
dev
profiles
:
dev
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/constant/VehicleScoreType.java
View file @
e298edfd
...
@@ -19,5 +19,4 @@ public enum VehicleScoreType {
...
@@ -19,5 +19,4 @@ public enum VehicleScoreType {
* 检验感受
* 检验感受
*/
*/
EXPERIENCE
;
EXPERIENCE
;
}
}
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