车辆删除还原

This commit is contained in:
zc
2026-01-05 15:17:26 +08:00
parent 5ee30c4e91
commit 945ef99da8
11 changed files with 55 additions and 14 deletions

View File

@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCarInfoList" parameterType="CarInfo" resultMap="CarInfoResult">
<include refid="selectCarInfoVo"/>
<where>
1=1 and ci.del_flag=0
<if test="delFlag != null and delFlag != ''"> ci.del_flag = #{delFlag}</if>
<if test="enableTime != null "> and ci.enable_time = #{enableTime}</if>
<if test="overdueTime != null "> and ci.overdue_time = #{overdueTime}</if>
<if test="enable != null and enable != ''"> and ci.enable = #{enable}</if>
@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="peopleId != null "> and ci.people_id = #{peopleId}</if>
<if test="peopleName != null "> and p.name = #{peopleName}</if>
<if test="unit != null "> and ci.unit = #{unit}</if>
<if test="parkId != null "> and ci.park_id = #{parkId}</if>
</where>
</select>
@@ -156,6 +157,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{customerId}
</foreach>
</update>
<update id="restore" parameterType="Long">
update car_info set del_flag = '0' where customer_id in
<foreach collection="list" item="customerId" open="(" separator="," close=")">
#{customerId}
</foreach>
</update>
<select id="selectCarInfoByCarNo" parameterType="String" resultMap="CarInfoResult">
<include refid="selectCarInfoVo"/>

View File

@@ -83,9 +83,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<update id="deleteCarParkRecordByCustomerIds" parameterType="String">
update car_park_record set sync=0 where customer_id in
<foreach item="id" collection="array" open="(" separator="," close=")">
<update id="deleteCarParkRecordByCustomerIds" parameterType="Long">
update car_park_record set sync='0' where sync = '2' and customer_id in
<foreach item="id" collection="list" open="(" separator="," close=")">
#{id}
</foreach>
</update>