Commit 66a85006 authored by jiaorz's avatar jiaorz

预订时间处理bug

parent a74f27cd
...@@ -943,7 +943,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -943,7 +943,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
andOperationFactor |= 1<< ( dateTime.dayOfMonth().get()-1); andOperationFactor |= 1<< ( dateTime.dayOfMonth().get()-1);
VehicleBookInfo vehicleBookInfo = getByVehicleIdAndYearMonth(vehicleId, dateTime.toString(YEARMONTH_DATE_TIME_FORMATTER)); VehicleBookInfo vehicleBookInfo = getByVehicleIdAndYearMonth(vehicleId, dateTime.toString(YEARMONTH_DATE_TIME_FORMATTER));
if(vehicleBookInfo != null) { if(vehicleBookInfo != null) {
vehicleBookInfo.setBookedDate(vehicleBookInfo.getBookedDate() & ~ andOperationFactor); vehicleBookInfo.setBookedDate(vehicleBookInfo.getBookedDate() & ~andOperationFactor);
int effected = vehicleBookInfoBiz.update(vehicleBookInfo); int effected = vehicleBookInfoBiz.update(vehicleBookInfo);
if (effected < 1) { if (effected < 1) {
return Boolean.FALSE; return Boolean.FALSE;
......
...@@ -48,16 +48,9 @@ ...@@ -48,16 +48,9 @@
</update> </update>
<update id="updateById" parameterType="com.xxfc.platform.vehicle.entity.VehicleBookInfo"> <update id="updateById" parameterType="com.xxfc.platform.vehicle.entity.VehicleBookInfo">
update vehicle_book_info set update vehicle_book_info set
<if test="vehicle != null and vehicle != ''">
vehicle = #{vehicle}
</if>
<if test="yearMonth != null and yearMonth != ''">
'year_month' = #{yearMonth}
</if>
<if test="bookedDate != null">
booked_date = #{bookedDate} booked_date = #{bookedDate}
</if> where where
where id = #{id} vehicle = #{vehicleId} and `year_month`=#{yearMonth}
</update> </update>
<select id="getByPage4YearMonth" parameterType="java.util.Map" resultType="com.xxfc.platform.vehicle.entity.VehicleBookInfo"> <select id="getByPage4YearMonth" parameterType="java.util.Map" resultType="com.xxfc.platform.vehicle.entity.VehicleBookInfo">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment