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
42b35c8a
Commit
42b35c8a
authored
Aug 28, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
6e293b5f
2a9f6aa9
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
320 additions
and
9 deletions
+320
-9
TourFeign.java
...src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
+21
-0
TourTagBiz.java
.../src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
+10
-0
TourGwController.java
...in/java/com/xxfc/platform/tour/rest/TourGwController.java
+68
-0
RandomListDto.java
...c/main/java/com/xxfc/platform/uccn/dto/RandomListDto.java
+23
-0
TypeEnum.java
...api/src/main/java/com/xxfc/platform/uccn/vo/TypeEnum.java
+43
-0
pom.xml
xx-uccn/xx-uccn-server/pom.xml
+6
-0
RandomListBiz.java
...c/main/java/com/xxfc/platform/uccn/biz/RandomListBiz.java
+54
-0
GwTourController.java
...in/java/com/xxfc/platform/uccn/rest/GwTourController.java
+51
-0
RandomListController.java
...ava/com/xxfc/platform/uccn/rest/RandomListController.java
+25
-0
VehicleModelController.java
...a/com/xxfc/platform/uccn/rest/VehicleModelController.java
+4
-2
VehicleActiveService.java
...a/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
+14
-6
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+1
-1
No files found.
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
View file @
42b35c8a
...
...
@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import
com.xxfc.platform.tour.dto.TourSpePriceDTO
;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.xxfc.platform.tour.entity.TourGoodVerification
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
com.xxfc.platform.tour.vo.TourGoodOrderFindVo
;
import
com.xxfc.platform.tour.vo.TourGoodOrderVo
;
...
...
@@ -107,4 +108,24 @@ public interface TourFeign {
@GetMapping
(
value
=
"/tourGood/app/unauth/findRandomVehicle"
)
public
ObjectRestResponse
findRandomVehicle
(
@RequestParam
(
value
=
"number"
)
Integer
number
);
//查询旅游路线列表
@RequestMapping
(
value
=
"/gw/app/unauth/getGoodList"
,
method
=
RequestMethod
.
GET
)
ObjectRestResponse
getGoodList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"10"
)
Integer
limit
,
@RequestParam
(
value
=
"tagId"
,
required
=
false
)
Integer
tagId
);
//获取公司详情
@GetMapping
(
"/gw/app/unauth/detail/{id}"
)
ObjectRestResponse
getOne
(
@PathVariable
Integer
id
);
//首页旅游列表
@GetMapping
(
value
=
"/gw/app/shopList"
)
List
<
GoodDataVO
>
goodListAll
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"4"
)
Integer
limit
);
//旅游标签列表
@GetMapping
(
value
=
"/gw/tagList"
)
List
<
TourTag
>
tagList
(
@RequestParam
(
value
=
"isHot"
,
defaultValue
=
"0"
)
Integer
isHot
);
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
View file @
42b35c8a
...
...
@@ -49,6 +49,16 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
return
mapper
.
findHotListTag
(
tag
);
}
public
List
<
TourTag
>
getTagList
(
Integer
isHot
)
{
TourTag
tag
=
new
TourTag
();
tag
.
setIsDel
(
0
);
if
(
isHot
!=
null
&&
isHot
==
1
){
tag
.
setIsHot
(
1
);
return
mapper
.
findHotListTag
(
tag
);
}
return
mapper
.
findAllByIsDel
(
tag
);
}
public
PageDataVO
<
TourTag
>
findPage
(
Map
map
)
{
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGwController.java
0 → 100644
View file @
42b35c8a
package
com
.
xxfc
.
platform
.
tour
.
rest
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.vo.GoodDataVO
;
import
com.xxfc.platform.tour.biz.TourGoodBiz
;
import
com.xxfc.platform.tour.biz.TourGoodDetailBiz
;
import
com.xxfc.platform.tour.biz.TourTagBiz
;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"gw"
)
@IgnoreClientToken
@IgnoreUserToken
public
class
TourGwController
extends
BaseController
<
TourGoodBiz
,
TourGood
>
{
@Autowired
TourGoodDetailBiz
goodDetailBiz
;
@Autowired
TourTagBiz
tourTagBiz
;
/**
* 查询旅游路线列表
*
* @param page
* @param limit
* @param tagId
* @return
*/
@ApiOperation
(
"查询旅游路线列表"
)
@RequestMapping
(
value
=
"/app/unauth/getGoodList"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
getGoodList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"10"
)
Integer
limit
,
@RequestParam
(
value
=
"tagId"
,
required
=
false
)
Integer
tagId
)
{
return
baseBiz
.
getGoodList
(
page
,
limit
,
""
,
null
,
null
,
tagId
,
null
);
}
@GetMapping
(
"/app/unauth/detail/{id}"
)
public
ObjectRestResponse
getOne
(
@PathVariable
Integer
id
)
{
return
goodDetailBiz
.
getGoodDetaileById
(
id
);
}
@ApiOperation
(
"首页旅游列表"
)
@GetMapping
(
value
=
"/shopList"
)
public
List
<
GoodDataVO
>
goodListAll
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"4"
)
Integer
limit
)
{
return
baseBiz
.
getAllByHome
(
page
,
limit
);
}
@ApiOperation
(
"旅游标签列表"
)
@GetMapping
(
value
=
"/tagList"
)
public
List
<
TourTag
>
tagList
(
@RequestParam
(
value
=
"isHot"
,
defaultValue
=
"0"
)
Integer
isHot
)
{
return
tourTagBiz
.
getTagList
(
isHot
);
}
}
\ No newline at end of file
xx-uccn/xx-uccn-api/src/main/java/com/xxfc/platform/uccn/dto/RandomListDto.java
0 → 100644
View file @
42b35c8a
package
com
.
xxfc
.
platform
.
uccn
.
dto
;
import
lombok.Data
;
@Data
public
class
RandomListDto
{
/**
* 列表类型 TypeEnum
*/
private
Integer
type
;
/**
* 随机数量
*/
private
Integer
number
;
/**
* 活动位置,1:欣欣官网 2:滴房车官网 0:无限制,
*/
private
Integer
location
;
}
xx-uccn/xx-uccn-api/src/main/java/com/xxfc/platform/uccn/vo/TypeEnum.java
0 → 100644
View file @
42b35c8a
package
com
.
xxfc
.
platform
.
uccn
.
vo
;
import
lombok.Data
;
public
enum
TypeEnum
{
VEHICLE
(
1
,
"车型"
),
TOUR
(
2
,
"旅游"
),
CAMPSITE
(
3
,
"营地"
),
ACTIVITY
(
4
,
"活动"
);
private
Integer
code
;
private
String
msg
;
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
TypeEnum
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
static
TypeEnum
getByValue
(
Integer
value
){
for
(
TypeEnum
typeEnum
:
values
()){
if
(
typeEnum
.
getCode
()
==
value
)
{
return
typeEnum
;
}
}
return
null
;
}
}
xx-uccn/xx-uccn-server/pom.xml
View file @
42b35c8a
...
...
@@ -33,6 +33,12 @@
<version>
2.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.xxfc.platform
</groupId>
<artifactId>
xx-tour-api
</artifactId>
<version>
2.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.xxfc.platform
</groupId>
<artifactId>
xx-campsite-api
</artifactId>
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/biz/RandomListBiz.java
0 → 100644
View file @
42b35c8a
package
com
.
xxfc
.
platform
.
uccn
.
biz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.campsite.feign.CampsiteFeign
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.uccn.vo.TypeEnum
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* 获取随机数量的车型、旅游、营地、活动
*/
@Service
@Slf4j
public
class
RandomListBiz
{
@Autowired
VehicleFeign
vehicleFeign
;
@Autowired
TourFeign
tourFeign
;
@Autowired
CampsiteFeign
campsiteFeign
;
@Autowired
SummitActivityBiz
summitActivityBiz
;
/**
* @param type 类型
* @param number 随机数,默认是2
* @return
*/
public
ObjectRestResponse
getRandomList
(
Integer
type
,
Integer
number
,
Integer
location
)
{
if
(
type
!=
null
)
{
number
=
number
==
null
?
2
:
number
;
switch
(
TypeEnum
.
getByValue
(
type
))
{
case
VEHICLE:
return
vehicleFeign
.
findRandomVehicle
(
number
);
case
TOUR:
return
tourFeign
.
findRandomVehicle
(
number
);
case
CAMPSITE:
return
campsiteFeign
.
findRandomVehicle
(
number
);
case
ACTIVITY:
return
ObjectRestResponse
.
succ
(
summitActivityBiz
.
getHostWithSummitActivity
(
number
,
location
));
}
}
return
ObjectRestResponse
.
succ
();
}
}
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/GwTourController.java
0 → 100644
View file @
42b35c8a
package
com
.
xxfc
.
platform
.
uccn
.
rest
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.CommonBaseController
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
@RestController
@RequestMapping
(
"/tour"
)
@Slf4j
@IgnoreClientToken
public
class
GwTourController
extends
CommonBaseController
{
@Autowired
TourFeign
tourFeign
;
@ApiOperation
(
"查询旅游路线列表"
)
@RequestMapping
(
value
=
"/getGoodList"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
ObjectRestResponse
getGoodList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"10"
)
Integer
limit
,
@RequestParam
(
value
=
"tagId"
,
required
=
false
)
Integer
tagId
)
{
return
tourFeign
.
getGoodList
(
page
,
limit
,
tagId
);
}
@GetMapping
(
"/detail/{id}"
)
@IgnoreUserToken
public
ObjectRestResponse
getOne
(
@PathVariable
Integer
id
)
{
return
tourFeign
.
getOne
(
id
);
}
@ApiOperation
(
"首页旅游列表"
)
@GetMapping
(
value
=
"/shopList"
)
@IgnoreUserToken
public
ObjectRestResponse
goodListAll
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"4"
)
Integer
limit
)
{
return
ObjectRestResponse
.
succ
(
tourFeign
.
goodListAll
(
page
,
limit
));
}
@GetMapping
(
"/tagList"
)
@IgnoreUserToken
public
ObjectRestResponse
getTagList
(
@RequestParam
(
value
=
"isHot"
,
defaultValue
=
"0"
)
Integer
isHot
)
{
return
ObjectRestResponse
.
succ
(
tourFeign
.
tagList
(
isHot
));
}
}
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/RandomListController.java
0 → 100644
View file @
42b35c8a
package
com
.
xxfc
.
platform
.
uccn
.
rest
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.uccn.biz.RandomListBiz
;
import
com.xxfc.platform.uccn.dto.RandomListDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/random/list"
)
public
class
RandomListController
{
@Autowired
RandomListBiz
randomListBiz
;
@GetMapping
(
"/app/unauth/get"
)
public
ObjectRestResponse
getRandomList
(
RandomListDto
randomListDto
)
{
if
(
randomListDto
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
return
randomListBiz
.
getRandomList
(
randomListDto
.
getType
(),
randomListDto
.
getNumber
(),
randomListDto
.
getLocation
());
}
}
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/VehicleModelController.java
View file @
42b35c8a
...
...
@@ -10,6 +10,7 @@ import com.xxfc.platform.vehicle.feign.VehicleFeign;
import
com.xxfc.platform.vehicle.pojo.VModelDetailVO
;
import
com.xxfc.platform.vehicle.pojo.VehicleModelQueryCondition
;
import
com.xxfc.platform.vehicle.pojo.VehicleModelVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -20,9 +21,10 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletRequest
;
@RestController
@RequestMapping
(
"/vehicleModel"
)
@RequestMapping
(
"/vehicleModel
/app/unauth
"
)
@Slf4j
@IgnoreClientToken
@Api
(
tags
=
"房车车型"
,
value
=
"房车车型"
)
public
class
VehicleModelController
extends
CommonBaseController
{
@Autowired
...
...
@@ -50,7 +52,7 @@ public class VehicleModelController extends CommonBaseController {
* @return
*/
@ApiOperation
(
"车型列表"
)
@PostMapping
(
value
=
"/
app/unauth/
findVehicleModelPage"
)
@PostMapping
(
value
=
"/findVehicleModelPage"
)
@IgnoreUserToken
public
ObjectRestResponse
<
VehicleModelVo
>
findVehicleModelPageUnauthfind
(
@RequestBody
VehicleModelQueryCondition
vmqc
)
{
return
vehicleFeign
.
findVehicleModelPageUnauthfind
(
vmqc
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
View file @
42b35c8a
...
...
@@ -9,6 +9,7 @@ import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
import
com.xxfc.platform.vehicle.entity.*
;
import
com.xxfc.platform.vehicle.mapper.*
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.joda.time.DateTime
;
import
org.joda.time.format.DateTimeFormat
;
...
...
@@ -20,12 +21,10 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@Service
@Slf4j
public
class
VehicleActiveService
{
@Autowired
...
...
@@ -82,7 +81,7 @@ public class VehicleActiveService {
throw
new
BaseException
(
ResCode
.
VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED
.
getDesc
(),
ResCode
.
VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED
.
getCode
());
}
if
(
MileageLift
==
null
||
MileageLift1
>=
MileageLift
){
if
(
MileageLift
==
null
||
MileageLift1
>=
MileageLift
){
// 写入车辆公里数,预计目的地
vehicle
.
setMileageLastUpdate
(
MileageLift1
);
vehicle
.
setExpectDestinationBranchCompanyId
(
departureVo
.
getExpectArrivalBranchCompanyId
());
...
...
@@ -177,7 +176,7 @@ public class VehicleActiveService {
stringBuilder
.
append
(
" 使用人电话:"
);
stringBuilder
.
append
(
vehicleBookRecordVos
.
get
(
0
).
getVehicleUserPhone
());
}
else
{
stringBuilder
.
append
(
"请联系管理员修改车辆状态为正常状态"
);
stringBuilder
.
append
(
"
,
请联系管理员修改车辆状态为正常状态"
);
}
return
stringBuilder
.
toString
();
}
...
...
@@ -311,6 +310,15 @@ public class VehicleActiveService {
param
.
put
(
"vehicleId"
,
vehicleBookRecord
.
getVehicleId
());
param
.
put
(
"bookedEndDate"
,
vehicleBookRecord
.
getBookStartDate
());
List
<
VehicleBookRecordVo
>
list
=
vehicleBookRecordBiz
.
selectByVehicleIdAndTime
(
param
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
Iterator
<
VehicleBookRecordVo
>
iterator
=
list
.
iterator
();
while
(
iterator
.
hasNext
())
{
VehicleBookRecordVo
vehicleBookRecordVo
=
iterator
.
next
();
if
(
vehicleBookRecordVo
.
getVehicleDepartureLogVo
()
==
null
&&
(
vehicleBookRecordVo
.
getBookEndDate
().
getTime
()
-
new
Date
().
getTime
())
<
0
)
{
iterator
.
remove
();
}
}
}
if
(!(
startDate
.
minusDays
(
1
).
compareTo
(
DateTime
.
now
())
<=
0
&&
DateTime
.
now
().
compareTo
(
endDate
)
<=
0
&&
vehicleBookRecord
.
getStatus
()
==
VehicleBookRecordStatus
.
APPROVE
.
getCode
()
&&
(
list
==
null
||
list
.
size
()
<=
0
)))
{
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED
.
getDesc
(),
ResCode
.
VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED
.
getCode
());
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
42b35c8a
...
...
@@ -823,7 +823,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
stringBuilder
.
append
(
" 使用人电话:"
);
stringBuilder
.
append
(
vehicleBookRecordVos
.
get
(
0
).
getVehicleUserPhone
());
}
else
{
stringBuilder
.
append
(
"请联系管理员修改车辆状态为正常状态"
);
stringBuilder
.
append
(
"
,
请联系管理员修改车辆状态为正常状态"
);
}
return
stringBuilder
.
toString
();
}
...
...
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