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
6ac0d95a
Commit
6ac0d95a
authored
Oct 26, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户信息接口、日价格接口
parent
32854f06
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
15 deletions
+29
-15
BaseBiz.java
.../java/com/github/wxiaoqi/security/common/biz/BaseBiz.java
+6
-0
BannerController.java
...ain/java/com/xxfc/platform/app/rest/BannerController.java
+3
-3
BannerMapper.xml
.../xx-app-server/src/main/resources/mapper/BannerMapper.xml
+4
-1
VehicleBookInfo.java
...ava/com/xxfc/platform/vehicle/entity/VehicleBookInfo.java
+1
-1
RentVehicleController.java
...com/xxfc/platform/vehicle/rest/RentVehicleController.java
+15
-10
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/biz/BaseBiz.java
View file @
6ac0d95a
...
@@ -59,6 +59,12 @@ public abstract class BaseBiz<M extends Mapper<T>, T> {
...
@@ -59,6 +59,12 @@ public abstract class BaseBiz<M extends Mapper<T>, T> {
mapper
.
updateByExampleSelective
(
target
,
example
);
mapper
.
updateByExampleSelective
(
target
,
example
);
}
}
/**
*
* @param where
* @param orderStr " crt_time desc "
* @return
*/
public
List
<
T
>
selectByWeekend
(
Function
<
WeekendSqls
<
T
>,
WeekendSqls
<
T
>>
where
,
String
orderStr
)
{
public
List
<
T
>
selectByWeekend
(
Function
<
WeekendSqls
<
T
>,
WeekendSqls
<
T
>>
where
,
String
orderStr
)
{
WeekendSqls
whereSqls
=
where
.
apply
(
WeekendSqls
.<
T
>
custom
());
WeekendSqls
whereSqls
=
where
.
apply
(
WeekendSqls
.<
T
>
custom
());
Example
.
Builder
builder
=
new
Example
.
Builder
(
entityClass
)
Example
.
Builder
builder
=
new
Example
.
Builder
(
entityClass
)
...
...
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/BannerController.java
View file @
6ac0d95a
...
@@ -31,11 +31,11 @@ public class BannerController {
...
@@ -31,11 +31,11 @@ public class BannerController {
* @return
* @return
*/
*/
@GetMapping
(
"/app/unauth/findBannerlist"
)
@GetMapping
(
"/app/unauth/findBannerlist"
)
public
ObjectRestResponse
findBannerlist
(
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0
"
)
Integer
type
,
public
ObjectRestResponse
findBannerlist
(
@RequestParam
(
required
=
false
,
value
=
"type
"
)
Integer
type
,
@RequestParam
(
required
=
false
,
value
=
"location"
)
Integer
location
,
@RequestParam
(
required
=
false
,
value
=
"location"
)
Integer
location
,
@RequestParam
(
required
=
false
,
value
=
"
l
ocation"
)
String
multiLocation
,
@RequestParam
(
required
=
false
,
value
=
"
multiL
ocation"
)
String
multiLocation
,
@RequestParam
(
value
=
"platform"
,
required
=
false
,
defaultValue
=
"0"
)
Integer
platform
)
{
@RequestParam
(
value
=
"platform"
,
required
=
false
,
defaultValue
=
"0"
)
Integer
platform
)
{
if
(
null
==
location
||
StrUtil
.
isBlank
(
multiLocation
))
{
if
(
null
==
location
&&
StrUtil
.
isBlank
(
multiLocation
))
{
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
List
<
BannerVo
>
bannerList
=
bannerBiz
.
findBannerList
(
type
,
location
,
multiLocation
,
platform
);
List
<
BannerVo
>
bannerList
=
bannerBiz
.
findBannerList
(
type
,
location
,
multiLocation
,
platform
);
...
...
xx-app/xx-app-server/src/main/resources/mapper/BannerMapper.xml
View file @
6ac0d95a
...
@@ -19,7 +19,10 @@
...
@@ -19,7 +19,10 @@
</resultMap>
</resultMap>
<select
id=
"findBannerListByType"
resultMap=
"bannerMap"
>
<select
id=
"findBannerListByType"
resultMap=
"bannerMap"
>
select * from `banner` where `is_del`=0 and `type`=#{type}
select * from `banner` where `is_del`=0
<if
test=
"type != null"
>
and `type`=#{type}
</if>
<if
test=
"location != null"
>
<if
test=
"location != null"
>
and `location`=#{location}
and `location`=#{location}
</if>
</if>
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/VehicleBookInfo.java
View file @
6ac0d95a
...
@@ -20,7 +20,7 @@ public class VehicleBookInfo {
...
@@ -20,7 +20,7 @@ public class VehicleBookInfo {
/**
/**
* 预定信息所属年月(格式yyyy-MM)
* 预定信息所属年月(格式yyyy-MM)
*/
*/
@Column
(
name
=
"
year_month
"
)
@Column
(
name
=
"
`year_month`
"
)
private
String
yearMonth
;
private
String
yearMonth
;
/**
/**
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/RentVehicleController.java
View file @
6ac0d95a
...
@@ -495,12 +495,12 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
...
@@ -495,12 +495,12 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
@GetMapping
(
value
=
"/app/unauth/getDayCalendarPrice"
)
@GetMapping
(
value
=
"/app/unauth/getDayCalendarPrice"
)
@IgnoreUserToken
@IgnoreUserToken
public
ObjectRestResponse
<
List
<
VehicleModelCalendarPrice
DTO
>>
getDayCalendarPrice
(
DayCalendarDTO
dto
)
{
public
ObjectRestResponse
<
List
<
CalendarPriceChw
DTO
>>
getDayCalendarPrice
(
DayCalendarDTO
dto
)
{
return
ObjectRestResponse
.
succ
(
getChwDayCalendarPrice
(
dto
));
return
ObjectRestResponse
.
succ
(
getChwDayCalendarPrice
(
dto
));
}
}
/**获取价格日历**/
/**获取价格日历**/
public
CalendarPriceChwDTO
getChwDayCalendarPrice
(
DayCalendarDTO
dto
)
{
public
List
<
CalendarPriceChwDTO
>
getChwDayCalendarPrice
(
DayCalendarDTO
dto
)
{
//根据时间获取预约记录 bookinfo
//根据时间获取预约记录 bookinfo
//转换为月份
//转换为月份
String
startMonth
=
StrUtil
.
subBefore
(
DateUtil
.
parseDateTime
(
dto
.
startDate
).
toDateStr
(),
"-"
,
true
);
String
startMonth
=
StrUtil
.
subBefore
(
DateUtil
.
parseDateTime
(
dto
.
startDate
).
toDateStr
(),
"-"
,
true
);
...
@@ -513,11 +513,9 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
...
@@ -513,11 +513,9 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
.
andLessThanOrEqualTo
(
VehicleBookInfo:
:
getYearMonth
,
endMonth
)
.
andLessThanOrEqualTo
(
VehicleBookInfo:
:
getYearMonth
,
endMonth
)
;
;
return
w
;
return
w
;
});
},
" `year_month` asc "
);
List
<
CalendarPriceChwDTO
>
list2
=
CollUtil
.
newArrayList
();
CalendarPriceChwDTO
calendarPriceChwDTO
=
new
CalendarPriceChwDTO
(){{
setDateStrs
(
CollUtil
.
newArrayList
());
}};
list
.
forEach
(
info
->
{
list
.
forEach
(
info
->
{
//月第一天
//月第一天
DateTime
firstDay
=
DateUtil
.
parseDate
(
info
.
getYearMonth
()+
"-01"
);
DateTime
firstDay
=
DateUtil
.
parseDate
(
info
.
getYearMonth
()+
"-01"
);
...
@@ -527,18 +525,25 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
...
@@ -527,18 +525,25 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
String
monthStr
=
NumberUtil
.
getBinaryStr
(
info
.
getBookedDate
());
String
monthStr
=
NumberUtil
.
getBinaryStr
(
info
.
getBookedDate
());
for
(
int
i
=
0
;
i
<
monthDays
;
i
++)
{
for
(
int
i
=
0
;
i
<
monthDays
;
i
++)
{
if
(
i
>
monthStr
.
length
()
||
StrUtil
.
equalsCharAt
(
monthStr
,
monthStr
.
length
()
-
i
-
1
,
'1'
))
{
int
finalI
=
i
;
calendarPriceChwDTO
.
getDateStrs
().
add
(
firstDay
.
offset
(
DateField
.
DAY_OF_MONTH
,
i
).
toDateStr
());
CalendarPriceChwDTO
calendarPriceChwDTO
=
new
CalendarPriceChwDTO
(){{
setDateStr
(
DateUtil
.
offsetDay
(
firstDay
,
finalI
).
toDateStr
());
setAllowRent
(
SYS_FALSE
);
}};
if
(
i
>
monthStr
.
length
()
||
!
StrUtil
.
equalsCharAt
(
monthStr
,
monthStr
.
length
()
-
i
-
1
,
'1'
))
{
calendarPriceChwDTO
.
setAllowRent
(
SYS_TRUE
);
}
}
list2
.
add
(
calendarPriceChwDTO
);
}
}
});
});
return
calendarPriceChwDTO
;
return
list2
;
}
}
@Data
@Data
public
static
class
CalendarPriceChwDTO
{
public
static
class
CalendarPriceChwDTO
{
private
List
<
String
>
dateStrs
;
private
String
dateStr
;
private
Integer
allowRent
;
}
}
@Data
@Data
...
...
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