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
480e7435
Commit
480e7435
authored
Oct 17, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员等级
parent
6d78d0f3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
35 deletions
+69
-35
VehicleFeign.java
...in/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
+41
-17
VehicleModelCalendarPriceBiz.java
...fc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
+1
-1
VehicleModelCalendarPriceController.java
...orm/vehicle/rest/VehicleModelCalendarPriceController.java
+27
-17
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
View file @
480e7435
...
...
@@ -7,6 +7,7 @@ import com.xxfc.platform.vehicle.common.RestResponse;
import
com.xxfc.platform.vehicle.entity.*
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyFindDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.VehicleModelCalendarPriceDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.AccompanyingItemVo
;
import
com.xxfc.platform.vehicle.pojo.vo.BranComanyLeaderVo
;
import
com.xxfc.platform.vehicle.pojo.vo.BranchCompanyListVO
;
...
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -21,7 +23,7 @@ import java.util.Set;
/**
* Created by ace on 2017/9/15.
*/
@FeignClient
(
name
=
"vehicle"
,
contextId
=
"vh"
)
@FeignClient
(
name
=
"vehicle"
,
contextId
=
"vh"
)
public
interface
VehicleFeign
{
@GetMapping
(
value
=
"/vehicleModel/{id}"
)
public
ObjectRestResponse
<
VehicleModel
>
get
(
@PathVariable
(
value
=
"id"
)
int
id
);
...
...
@@ -30,10 +32,10 @@ public interface VehicleFeign {
public
ObjectRestResponse
<
Vehicle
>
get
(
@PathVariable
(
value
=
"id"
)
String
id
);
@RequestMapping
(
value
=
"/vehicleInfo/findById"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
Vehicle
>
findById
(
@RequestParam
(
value
=
"id"
)
String
id
);
public
RestResponse
<
Vehicle
>
findById
(
@RequestParam
(
value
=
"id"
)
String
id
);
@RequestMapping
(
value
=
"/vehicleInfo/getByIds"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
List
<
Vehicle
>>
getByIds
(
@RequestParam
(
value
=
"ids"
)
List
<
String
>
id
);
public
RestResponse
<
List
<
Vehicle
>>
getByIds
(
@RequestParam
(
value
=
"ids"
)
List
<
String
>
id
);
//提车
@PostMapping
(
"/active/small/departure"
)
...
...
@@ -44,16 +46,16 @@ public interface VehicleFeign {
public
RestResponse
arrivalBySmall
(
@RequestBody
VehicleArrivalVo
arrivalVo
);
@GetMapping
(
value
=
"/vehicleModel/app/unauth/findRandomVehicle"
)
public
ObjectRestResponse
findRandomVehicle
(
@RequestParam
(
value
=
"number"
)
Integer
number
);
public
ObjectRestResponse
findRandomVehicle
(
@RequestParam
(
value
=
"number"
)
Integer
number
);
//修改评分
@RequestMapping
(
value
=
"/vehicleModel/app/addScore"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
addScore
(
@RequestParam
(
value
=
"id"
)
Integer
id
,
@RequestParam
(
value
=
"score"
)
Integer
score
);
public
RestResponse
addScore
(
@RequestParam
(
value
=
"id"
)
Integer
id
,
@RequestParam
(
value
=
"score"
)
Integer
score
);
@RequestMapping
(
value
=
"/vehicleInfo/rent/book/vehicle"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
VehicleBookRecord
>
rentApplyVehicle
(
@RequestBody
RentVehicleBookDTO
rentVehicleBookDTO
);
@RequestMapping
(
value
=
"/branchCompany/app/unauth/detail/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/branchCompany/app/unauth/detail/{id}"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
CompanyDetail
>
getCompanyDetail
(
@PathVariable
(
value
=
"id"
)
Integer
id
);
//租车拒绝预约
...
...
@@ -71,28 +73,29 @@ public interface VehicleFeign {
//获取分公司列表
@GetMapping
(
"/branchCompany/all"
)
public
List
<
BranchCompany
>
companyAll
(
@RequestParam
(
value
=
"dataAll"
)
Integer
dataAll
,
@RequestParam
(
value
=
"dataCompany"
)
String
dataCompany
,
@RequestParam
(
value
=
"dataZone"
)
String
dataZone
);
@RequestParam
(
value
=
"dataAll"
)
Integer
dataAll
,
@RequestParam
(
value
=
"dataCompany"
)
String
dataCompany
,
@RequestParam
(
value
=
"dataZone"
)
String
dataZone
);
@GetMapping
(
"/branchCompany/entityList"
)
public
ObjectRestResponse
<
List
<
BranchCompany
>>
branchCompanyEntityList
(
@RequestParam
(
"entity"
)
Map
<
String
,
Object
>
entity
);
@RequestMapping
(
value
=
"/user/license/one"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
VehicleUserLicense
>
one
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
public
RestResponse
<
VehicleUserLicense
>
one
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
@RequestMapping
(
value
=
"/user/license/company/getOne"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
VehicleUserLicense
>
getOne
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
@RequestMapping
(
value
=
"/user/license/multi"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
VehicleUserLicense
>>
multi
(
@RequestBody
QueryMultiDTO
dto
)
throws
Exception
;
@GetMapping
(
"/user/license/getVehicleLicenseList"
)
public
ObjectRestResponse
<
List
<
VehicleUserLicense
>>
getVehicleLicenseList
(
@RequestParam
(
value
=
"ids"
)
String
ids
);
public
ObjectRestResponse
<
List
<
VehicleUserLicense
>>
getVehicleLicenseList
(
@RequestParam
(
value
=
"ids"
)
String
ids
);
/**
* 获取优质车型接口
*
* @param page
* @param limit
* @return 返回
...
...
@@ -102,13 +105,16 @@ public interface VehicleFeign {
/**
* 根据一个id获取城市
*
* @param id
* @return
*/
@GetMapping
(
"/sysRegion/getSysRegionById/{id}"
)
RestResponse
getSysRegionById
(
@PathVariable
(
value
=
"id"
)
Integer
id
);
/**
* 多个城市code获取城市代码
*
* @param idSet
* @return
*/
...
...
@@ -117,12 +123,13 @@ public interface VehicleFeign {
/**
* 获取公司所在的城市
*
* @param zoneList
* @param companyList
* @return
*/
@GetMapping
(
"/city/corporationCity"
)
ObjectRestResponse
<
Set
<
Integer
>>
corporationCity
(
@RequestParam
(
value
=
"zoneList"
)
String
zoneList
,
ObjectRestResponse
<
Set
<
Integer
>>
corporationCity
(
@RequestParam
(
value
=
"zoneList"
)
String
zoneList
,
@RequestParam
(
value
=
"companyList"
)
String
companyList
);
...
...
@@ -143,8 +150,10 @@ public interface VehicleFeign {
//cata
/**
* 查询当前车型拥有的标签
*
* @param ids
* @return
*/
...
...
@@ -156,6 +165,7 @@ public interface VehicleFeign {
/**
* 根据位置查询
*
* @param branchCompanyFindDTO
* @return
*/
...
...
@@ -163,9 +173,23 @@ public interface VehicleFeign {
PageDataVO
<
BranchCompanyListVO
>
findBranchCompanyWithPage
(
@RequestBody
BranchCompanyFindDTO
branchCompanyFindDTO
);
@GetMapping
(
"/vehicleInfo/findVehicleIds"
)
List
<
String
>
findbyPlateNumberAndVehicleCod
(
@RequestParam
(
value
=
"plateNumber"
)
String
plateNumber
,
@RequestParam
(
value
=
"vehicleCode"
)
String
vehicleCode
);
List
<
String
>
findbyPlateNumberAndVehicleCod
(
@RequestParam
(
value
=
"plateNumber"
)
String
plateNumber
,
@RequestParam
(
value
=
"vehicleCode"
)
String
vehicleCode
);
@RequestMapping
(
value
=
"/vehicleInfo/bookRecord/update"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
update
(
@RequestBody
BookRecordUpdateLog
bookRecordUpdateLog
);
/**
* 车型日历价格
* @param startDate
* @param endDate
* @param vehicleModelId
* @param userId
* @return
*/
@GetMapping
(
"/vehicle_model/calendar_price/app/unauth/price"
)
List
<
VehicleModelCalendarPriceDTO
>
findVehicleModelCalendarPriceByDate
(
@RequestParam
(
value
=
"startDate"
)
Date
startDate
,
@RequestParam
(
value
=
"endDate"
)
Date
endDate
,
@RequestParam
(
value
=
"vehicleModelId"
)
Integer
vehicleModelId
,
@RequestParam
(
value
=
"userId"
)
Integer
userId
);
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
View file @
480e7435
...
...
@@ -227,7 +227,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
* @param vehicleModelId
* @return
*/
p
ublic
List
<
VehicleModelCalendarPriceDTO
>
findVehicleModelCalendarPrice
(
Date
startDate
,
Date
endDate
,
Integer
vehicleModelId
,
Integer
userId
)
{
p
rivate
List
<
VehicleModelCalendarPriceDTO
>
findVehicleModelCalendarPrice
(
Date
startDate
,
Date
endDate
,
Integer
vehicleModelId
,
Integer
userId
)
{
List
<
VehicleModelCalendarPriceDTO
>
vehicleModelCalendarPriceVos
=
new
ArrayList
<>();
//默认折扣
Integer
discount
=
DEFAULT_DISCOUNT
;
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleModelCalendarPriceController.java
View file @
480e7435
...
...
@@ -32,7 +32,7 @@ import java.util.List;
@RequestMapping
(
"/vehicle_model/calendar_price/app/unauth"
)
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
@Api
(
tags
=
"车型日历价格"
)
public
class
VehicleModelCalendarPriceController
{
public
class
VehicleModelCalendarPriceController
{
private
final
VehicleModelCalendarPriceBiz
vehicleModelCalendarPriceBiz
;
...
...
@@ -41,16 +41,26 @@ public class VehicleModelCalendarPriceController{
@GetMapping
(
"/list/{vehicleModelId}"
)
@IgnoreUserToken
@SneakyThrows
public
ObjectRestResponse
<
VehicleModelCalendarPriceDTO
>
listVehicleModelCalendarPriceByDateAndVehicleModelId
(
@RequestParam
(
value
=
"start"
,
required
=
false
)
String
start
,
@RequestParam
(
value
=
"end"
,
required
=
false
)
String
end
,
public
ObjectRestResponse
<
VehicleModelCalendarPriceDTO
>
listVehicleModelCalendarPriceByDateAndVehicleModelId
(
@RequestParam
(
value
=
"start"
,
required
=
false
)
String
start
,
@RequestParam
(
value
=
"end"
,
required
=
false
)
String
end
,
@PathVariable
(
value
=
"vehicleModelId"
)
Integer
vehicleModelId
,
AppUserDTO
appUserDTO
){
if
(
StringUtils
.
isEmpty
(
start
)
||
StringUtils
.
isEmpty
(
end
))
{
AppUserDTO
appUserDTO
)
{
if
(
StringUtils
.
isEmpty
(
start
)
||
StringUtils
.
isEmpty
(
end
))
{
throw
new
BaseException
(
"缺少开始时间或结束时间"
);
}
Date
startDate
=
Date
.
from
(
LocalDate
.
parse
(
start
).
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
());
Date
endDate
=
Date
.
from
(
LocalDate
.
parse
(
end
).
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
());
List
<
VehicleModelCalendarPriceDTO
>
vehicleModelCalendarPriceVos
=
vehicleModelCalendarPriceBiz
.
listVehicleModelCalendarPriceByDateAndVehicleModelIdAndUserId
(
startDate
,
endDate
,
vehicleModelId
,
appUserDTO
.
getUserid
());
Date
startDate
=
Date
.
from
(
LocalDate
.
parse
(
start
).
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
());
Date
endDate
=
Date
.
from
(
LocalDate
.
parse
(
end
).
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
());
List
<
VehicleModelCalendarPriceDTO
>
vehicleModelCalendarPriceVos
=
vehicleModelCalendarPriceBiz
.
listVehicleModelCalendarPriceByDateAndVehicleModelIdAndUserId
(
startDate
,
endDate
,
vehicleModelId
,
appUserDTO
.
getUserid
());
return
ObjectRestResponse
.
succ
(
vehicleModelCalendarPriceVos
);
}
@GetMapping
(
"/price"
)
public
List
<
VehicleModelCalendarPriceDTO
>
findVehicleModelCalendarPriceByDate
(
@RequestParam
(
value
=
"startDate"
)
Date
startDate
,
@RequestParam
(
value
=
"endDate"
)
Date
endDate
,
@RequestParam
(
value
=
"vehicleModelId"
)
Integer
vehicleModelId
,
@RequestParam
(
value
=
"userId"
)
Integer
userId
)
{
startDate
=
Date
.
from
(
startDate
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
().
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
());
endDate
=
Date
.
from
(
endDate
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
().
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
());
return
vehicleModelCalendarPriceBiz
.
findVehicleModelCalendarPriceByDateAndVehilceIdAndUserId
(
startDate
,
endDate
,
vehicleModelId
,
userId
);
}
}
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