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
fb35e713
Commit
fb35e713
authored
Aug 13, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改租車訂單地址,修改车辆预定时添加订单号
parent
72630d9f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
18 deletions
+13
-18
ConstantBiz.java
.../main/java/com/xxfc/platform/vehicle/biz/ConstantBiz.java
+4
-4
SysRegionBiz.java
...main/java/com/xxfc/platform/vehicle/biz/SysRegionBiz.java
+2
-2
VehicleBookHourInfoBiz.java
...com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
+3
-3
VehicleBookRecordBiz.java
...a/com/xxfc/platform/vehicle/biz/VehicleBookRecordBiz.java
+1
-2
VehicleCataController.java
...com/xxfc/platform/vehicle/rest/VehicleCataController.java
+3
-7
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/ConstantBiz.java
View file @
fb35e713
...
@@ -2,9 +2,9 @@ package com.xxfc.platform.vehicle.biz;
...
@@ -2,9 +2,9 @@ package com.xxfc.platform.vehicle.biz;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.xxfc.platform.vehicle.common.CustomIllegalParamException
;
import
com.xxfc.platform.vehicle.constant.ConstantType
;
import
com.xxfc.platform.vehicle.constant.ConstantType
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
com.xxfc.platform.vehicle.entity.Constant
;
import
com.xxfc.platform.vehicle.entity.Constant
;
...
@@ -242,12 +242,12 @@ public class ConstantBiz extends BaseBiz<ConstantMapper,Constant> {
...
@@ -242,12 +242,12 @@ public class ConstantBiz extends BaseBiz<ConstantMapper,Constant> {
*/
*/
public
Boolean
checkIfExists
(
Integer
type
,
Integer
code
){
public
Boolean
checkIfExists
(
Integer
type
,
Integer
code
){
if
(!
ConstantType
.
exists
(
type
)){
if
(!
ConstantType
.
exists
(
type
)){
throw
new
CustomIllegalParam
Exception
(
" no such type of constant"
);
throw
new
Base
Exception
(
" no such type of constant"
);
}
}
List
<
ConstantVo
>
constantVoList
=
getAllConstantByType
(
type
);
List
<
ConstantVo
>
constantVoList
=
getAllConstantByType
(
type
);
if
(
CollectionUtils
.
isEmpty
(
constantVoList
)){
if
(
CollectionUtils
.
isEmpty
(
constantVoList
)){
throw
new
CustomIllegalParam
Exception
(
" no such code of constant in relative type"
);
throw
new
Base
Exception
(
" no such code of constant in relative type"
);
}
}
for
(
ConstantVo
constantVo:
constantVoList
){
for
(
ConstantVo
constantVo:
constantVoList
){
...
@@ -255,7 +255,7 @@ public class ConstantBiz extends BaseBiz<ConstantMapper,Constant> {
...
@@ -255,7 +255,7 @@ public class ConstantBiz extends BaseBiz<ConstantMapper,Constant> {
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
}
}
throw
new
CustomIllegalParam
Exception
(
" no such code of constant in relative type"
);
throw
new
Base
Exception
(
" no such code of constant in relative type"
);
}
}
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/SysRegionBiz.java
View file @
fb35e713
...
@@ -3,8 +3,8 @@ package com.xxfc.platform.vehicle.biz;
...
@@ -3,8 +3,8 @@ package com.xxfc.platform.vehicle.biz;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.xxfc.platform.vehicle.common.CustomIllegalParamException
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
com.xxfc.platform.vehicle.constant.RegionType
;
import
com.xxfc.platform.vehicle.constant.RegionType
;
import
com.xxfc.platform.vehicle.entity.SysRegion
;
import
com.xxfc.platform.vehicle.entity.SysRegion
;
...
@@ -42,7 +42,7 @@ public class SysRegionBiz extends BaseBiz<SysRegionMapper, SysRegion> {
...
@@ -42,7 +42,7 @@ public class SysRegionBiz extends BaseBiz<SysRegionMapper, SysRegion> {
public
List
<
SysRegion
>
getRegionsByCodes
(
List
<
Long
>
ids
){
public
List
<
SysRegion
>
getRegionsByCodes
(
List
<
Long
>
ids
){
List
<
String
>
redisCacheKeys
=
Lists
.
newArrayList
();
List
<
String
>
redisCacheKeys
=
Lists
.
newArrayList
();
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
)){
throw
new
CustomIllegalParam
Exception
(
"empty id list"
);
throw
new
Base
Exception
(
"empty id list"
);
}
}
for
(
Long
id:
ids
){
for
(
Long
id:
ids
){
redisCacheKeys
.
add
(
RedisKey
.
SYS_REGION_CACHE_PREFIX
+
id
);
redisCacheKeys
.
add
(
RedisKey
.
SYS_REGION_CACHE_PREFIX
+
id
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
View file @
fb35e713
...
@@ -3,10 +3,10 @@ package com.xxfc.platform.vehicle.biz;
...
@@ -3,10 +3,10 @@ package com.xxfc.platform.vehicle.biz;
import
com.ace.cache.annotation.Cache
;
import
com.ace.cache.annotation.Cache
;
import
com.ace.cache.annotation.CacheClear
;
import
com.ace.cache.annotation.CacheClear
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.xxfc.platform.vehicle.common.CustomIllegalParamException
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.entity.VehicleBookHourInfo
;
import
com.xxfc.platform.vehicle.entity.VehicleBookHourInfo
;
import
com.xxfc.platform.vehicle.mapper.VehicleBookHourInfoMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleBookHourInfoMapper
;
...
@@ -44,10 +44,10 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
...
@@ -44,10 +44,10 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
//判定时间是否合法
//判定时间是否合法
if
(
bookStartDate
.
compareTo
(
DateTime
.
now
().
toString
(
DEFAULT_DATE_TIME_FORMATTER
))
<
0
)
{
if
(
bookStartDate
.
compareTo
(
DateTime
.
now
().
toString
(
DEFAULT_DATE_TIME_FORMATTER
))
<
0
)
{
throw
new
CustomIllegalParam
Exception
(
ResultCode
.
getMsg
(
ResultCode
.
ONLY_BOOK_FROM_TODAY
));
throw
new
Base
Exception
(
ResultCode
.
getMsg
(
ResultCode
.
ONLY_BOOK_FROM_TODAY
));
}
}
if
(
bookStartDate
.
compareTo
(
bookEndDate
)
>
0
)
{
if
(
bookStartDate
.
compareTo
(
bookEndDate
)
>
0
)
{
throw
new
CustomIllegalParam
Exception
(
"预定开始日期不能大于结束日期!"
);
throw
new
Base
Exception
(
"预定开始日期不能大于结束日期!"
);
}
}
Map
<
String
,
Integer
>
predictableHours
=
Maps
.
newHashMap
();
Map
<
String
,
Integer
>
predictableHours
=
Maps
.
newHashMap
();
//预定开始小时
//预定开始小时
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookRecordBiz.java
View file @
fb35e713
...
@@ -12,7 +12,6 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
...
@@ -12,7 +12,6 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.xxfc.platform.vehicle.common.CustomIllegalParamException
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.BookType
;
import
com.xxfc.platform.vehicle.constant.BookType
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
...
@@ -273,7 +272,7 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
...
@@ -273,7 +272,7 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
if
(
params
.
get
(
"selectedMonth"
)
!=
null
)
{
if
(
params
.
get
(
"selectedMonth"
)
!=
null
)
{
String
selectedMonth
=
(
String
)
params
.
get
(
"selectedMonth"
);
String
selectedMonth
=
(
String
)
params
.
get
(
"selectedMonth"
);
if
(
StringUtils
.
isBlank
(
selectedMonth
)){
if
(
StringUtils
.
isBlank
(
selectedMonth
)){
throw
new
CustomIllegalParam
Exception
(
" no month selected "
);
throw
new
Base
Exception
(
" no month selected "
);
}
}
DateTime
selectedMonthDate
=
DateTime
.
parse
(
selectedMonth
,
YEARMONTH_DATE_TIME_FORMATTER
);
DateTime
selectedMonthDate
=
DateTime
.
parse
(
selectedMonth
,
YEARMONTH_DATE_TIME_FORMATTER
);
if
(
selectedMonthDate
.
compareTo
(
DateTime
.
now
().
plusMonths
(-
1
).
withDayOfMonth
(
1
).
withMillisOfDay
(
0
))
<
0
){
if
(
selectedMonthDate
.
compareTo
(
DateTime
.
now
().
plusMonths
(-
1
).
withDayOfMonth
(
1
).
withMillisOfDay
(
0
))
<
0
){
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleCataController.java
View file @
fb35e713
...
@@ -9,16 +9,12 @@ import com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz;
...
@@ -9,16 +9,12 @@ import com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.common.VehicleBaseController
;
import
com.xxfc.platform.vehicle.common.VehicleBaseController
;
import
com.xxfc.platform.vehicle.entity.VehiclePlatCata
;
import
com.xxfc.platform.vehicle.entity.VehiclePlatCata
;
import
com.xxfc.platform.vehicle.pojo.
*
;
import
com.xxfc.platform.vehicle.pojo.
Cascade
;
import
lombok.Data
;
import
com.xxfc.platform.vehicle.pojo.CataVo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.ibatis.annotations.Update
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
sun.java2d.pipe.AATextRenderer
;
import
java.util.Arrays
;
@RestController
@RestController
@RequestMapping
(
"/cata"
)
@RequestMapping
(
"/cata"
)
...
@@ -225,7 +221,7 @@ public class VehicleCataController extends VehicleBaseController<VehiclePlatCata
...
@@ -225,7 +221,7 @@ public class VehicleCataController extends VehicleBaseController<VehiclePlatCata
return RestResponse.data(baseBiz.getByPage(vehiclePageQueryVo));
return RestResponse.data(baseBiz.getByPage(vehiclePageQueryVo));
} catch (JSONException ex) {
} catch (JSONException ex) {
return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode());
return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode());
} catch (
CustomIllegalParam
Exception ex) {
} catch (
Base
Exception ex) {
return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode());
return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode());
}
}
}*/
}*/
...
...
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