| | |
| | | <result property="driverId" column="driver_id" /> |
| | | <result property="dispatchId" column="dispatch_id" /> |
| | | <result property="status" column="status" /> |
| | | <result property="vehicleId" column="vehicle_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTmsDriverDispatchVo"> |
| | | select thisTab.id, thisTab.driver_id, thisTab.dispatch_id, thisTab.status from tms_driver_dispatch AS thisTab |
| | | select thisTab.id, thisTab.driver_id, thisTab.dispatch_id, thisTab.status , thisTab.vehicle_id from tms_driver_dispatch AS thisTab |
| | | </sql> |
| | | <sql id="selectTmsDriverDispatchVoCount"> |
| | | select count(0) from tms_driver_dispatch as thisTab |
| | |
| | | <if test="driverId != null "> and thisTab.driver_id = #{driverId}</if> |
| | | <if test="dispatchId != null "> and thisTab.dispatch_id = #{dispatchId}</if> |
| | | <if test="status != null "> and thisTab.status = #{status}</if> |
| | | <if test="vehicleId != null "> and thisTab.vehicle_id = #{vehicleId}</if> |
| | | </sql> |
| | | |
| | | <!--查询--> |
| | |
| | | <if test="driverId != null">driver_id,</if> |
| | | <if test="dispatchId != null">dispatch_id,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="vehicleId != null">vehicle_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="driverId != null">#{driverId},</if> |
| | | <if test="dispatchId != null">#{dispatchId},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="vehicleId != null">#{vehicleId},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="insertTmsDriverDispatchBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into tms_driver_dispatch |
| | | <trim prefix="(" suffix=") values" suffixOverrides=","> |
| | | id,driver_id,dispatch_id,status, |
| | | id,driver_id,dispatch_id,status,vehicle_id, |
| | | </trim> |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | <trim prefix="(" suffix=") " suffixOverrides=","> |
| | | #{item.id},#{item.driverId},#{item.dispatchId},#{item.status}, |
| | | #{item.id},#{item.driverId},#{item.dispatchId},#{item.status},#{item.vehicleId}, |
| | | </trim> |
| | | </foreach> |
| | | </insert> |
| | |
| | | <if test="driverId != null">driver_id = #{driverId},</if> |
| | | <if test="dispatchId != null">dispatch_id = #{dispatchId},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="vehicleId != null">vehicle_id = #{vehicleId},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <if test="item.driverId != null">driver_id = #{item.driverId},</if> |
| | | <if test="item.dispatchId != null">dispatch_id = #{item.dispatchId},</if> |
| | | <if test="item.status != null">status = #{item.status},</if> |
| | | <if test="item.vehicleId != null">vehicle_id = #{item.vehicleId},</if> |
| | | </trim> |
| | | where id = #{item.id} |
| | | </foreach> |