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
0ae4fb91
Commit
0ae4fb91
authored
Oct 22, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日历价格
parent
44e035a6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
19 deletions
+8
-19
UserFeign.java
...va/com/github/wxiaoqi/security/admin/feign/UserFeign.java
+1
-0
AppUserVo.java
.../java/com/github/wxiaoqi/security/admin/vo/AppUserVo.java
+4
-0
VehicleModelCalendarPriceBiz.java
...fc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
+3
-19
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/UserFeign.java
View file @
0ae4fb91
...
...
@@ -133,4 +133,5 @@ public interface UserFeign {
@GetMapping
(
"/member/user"
)
BaseUserMember
findBaseUserMemberByUserId
(
@RequestParam
(
value
=
"userId"
)
Integer
userId
);
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/AppUserVo.java
View file @
0ae4fb91
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 用户信息表
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
AppUserVo
{
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
View file @
0ae4fb91
...
...
@@ -39,30 +39,14 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
public
class
VehicleModelCalendarPriceBiz
extends
BaseBiz
<
VehicleModelCalendarPriceMapper
,
VehicleModelCalendarPrice
>
{
/**
* 一个星期的第一天
*/
private
static
final
int
START_OF_WEEK
=
1
;
/**
* 一个星期的最后一天
*/
private
static
final
int
END_OF_WEEK
=
7
;
/**
* 默认折扣
*/
private
static
final
Integer
DEFAULT_DISCOUNT
=
100
;
/**
* 默认免费天数
*/
private
static
final
Integer
DEFAULT_FREE_DAYS
=
1
;
/**
* 默认会员等级
*/
private
static
final
Integer
DEFAULT_MEMBER_LEVEL
=
0
;
private
static
final
String
PRICE_VAL
=
"price"
;
private
static
final
String
DAYS_VAL
=
"freeDays"
;
private
final
VehicleModelHolidayPriceBiz
vehicleModelHolidayPriceBiz
;
private
final
VehicleModelBiz
vehicleModelBiz
;
private
final
UserFeign
userFeign
;
...
...
@@ -263,8 +247,8 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
memberLevel
=
baseUserMember
==
null
?
memberLevel
:
baseUserMember
.
getMemberLevel
();
}
VehicleModelCalendarPriceDTO
vehicleModelCalendarPriceDTO
;
LocalDate
final_startLocalDate
=
startDate
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
(
);
LocalDate
final_endLocalDate
=
endDate
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
(
);
LocalDate
final_startLocalDate
=
dateToLocalDate
(
startDate
);
LocalDate
final_endLocalDate
=
dateToLocalDate
(
endDate
);
while
(
final_startLocalDate
.
isBefore
(
final_endLocalDate
)
||
final_startLocalDate
.
isEqual
(
final_endLocalDate
))
{
vehicleModelCalendarPriceDTO
=
new
VehicleModelCalendarPriceDTO
();
//价格重置
...
...
@@ -275,7 +259,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
Integer
free_days
=
DEFAULT_FREE_DAYS
;
//节假日对应的价格和免费天数
Map
<
String
,
Object
>
price_freeDays_map
=
null
;
Date
current_date
=
Date
.
from
(
final_startLocalDate
.
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
()
);
Date
current_date
=
localDateToDate
(
final_startLocalDate
);
vehicleModelCalendarPriceDTO
.
setDate
(
current_date
);
if
(
calendarPriceMap
!=
null
&&
!
calendarPriceMap
.
isEmpty
())
{
VehicleModelCalendarPrice
vehicleModelCalendarPrice
=
calendarPriceMap
.
get
(
current_date
);
...
...
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