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
b70595ff
Commit
b70595ff
authored
Aug 28, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改车辆节假日价格信息
parent
a22768dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
VehicleHolidayPriceInfoBiz.java
...xxfc/platform/vehicle/biz/VehicleHolidayPriceInfoBiz.java
+6
-0
VehicleHolidayPriceInfoMapper.java
...latform/vehicle/mapper/VehicleHolidayPriceInfoMapper.java
+2
-0
VehicleHolidayPriceInfoMapper.xml
...c/main/resources/mapper/VehicleHolidayPriceInfoMapper.xml
+3
-0
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleHolidayPriceInfoBiz.java
View file @
b70595ff
...
...
@@ -80,6 +80,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
VehicleHolidayPriceInfo
oldValue
=
getByVehicleId
(
vehicleHolidayPriceInfo
.
getVehicleId
(),
date
);
if
(
oldValue
==
null
)
{
vehicleHolidayPriceInfo
.
setId
(
null
);
vehicleHolidayPriceInfo
.
setFestivalId
(
getMaxFestivalId
()
+
1
);
insertSelectiveRe
(
vehicleHolidayPriceInfo
);
}
else
{
BeanUtil
.
copyProperties
(
vehicleHolidayPriceInfo
,
oldValue
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
...
...
@@ -99,6 +100,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
oldValue
.
setCompanyId
(
vehicleInfo
.
getSubordinateBranch
());
oldValue
.
setModelId
(
vehicleInfo
.
getModelId
());
oldValue
.
setId
(
null
);
oldValue
.
setFestivalId
(
getMaxFestivalId
()
+
1
);
insertSelectiveRe
(
vehicleHolidayPriceInfo
);
}
else
{
BeanUtil
.
copyProperties
(
vehicleHolidayPriceInfo
,
oldValue
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
...
...
@@ -116,6 +118,10 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
return
ObjectRestResponse
.
succ
();
}
public
Integer
getMaxFestivalId
()
{
return
mapper
.
selectMaxFestivalId
();
}
public
VehicleHolidayPriceInfo
getByVehicleId
(
String
vehicleId
,
String
date
)
{
Example
example
=
new
Example
(
VehicleHolidayPriceInfo
.
class
);
example
.
createCriteria
().
andEqualTo
(
"vehicleId"
,
vehicleId
).
andEqualTo
(
"festivalDate"
,
date
).
andEqualTo
(
"isDel"
,
0
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleHolidayPriceInfoMapper.java
View file @
b70595ff
...
...
@@ -15,4 +15,6 @@ import java.util.List;
*/
public
interface
VehicleHolidayPriceInfoMapper
extends
Mapper
<
VehicleHolidayPriceInfo
>
{
List
<
VehicleHolidayPriceInfoVo
>
getAll
(
String
vehicleId
,
Integer
festivalId
);
Integer
selectMaxFestivalId
();
}
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleHolidayPriceInfoMapper.xml
View file @
b70595ff
...
...
@@ -13,4 +13,7 @@
</if>
</select>
<select
id=
"selectMaxFestivalId"
resultType=
"java.lang.Integer"
>
select max(festival_id) from vehicle_holiday_price_info
</select>
</mapper>
\ No newline at end of file
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