244 lines
16 KiB
XML
244 lines
16 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="cn.iocoder.yudao.module.inspection.mapper.DelInspectionInfoMapper">
|
|
|
|
<resultMap type="cn.iocoder.yudao.module.inspection.entity.DelInspectionInfo" id="DelInspectionInfoResult">
|
|
<result property="id" column="id" />
|
|
<result property="inspectionOrderId" column="inspection_order_id" />
|
|
<result property="userId" column="user_id" />
|
|
<result property="userName" column="user_name" />
|
|
<result property="buyName" column="buy_name" />
|
|
<result property="buyPhone" column="buy_phone" />
|
|
<result property="userAddress" column="user_address" />
|
|
<result property="unitName" column="unit_name" />
|
|
<result property="partnerId" column="partner_id" />
|
|
<result property="workId" column="work_id" />
|
|
<result property="workerName" column="worker_name" />
|
|
<result property="workerPhone" column="worker_phone" />
|
|
<result property="workerAvatar" column="worker_avatar" />
|
|
<result property="categoryId" column="category_id" />
|
|
<result property="carNum" column="car_num" />
|
|
<result property="carModel" column="car_model" />
|
|
<result property="carNature" column="car_nature" />
|
|
<result property="carStatus" column="car_status" />
|
|
<result property="carIdNo" column="car_id_no" />
|
|
<result property="isPass" column="is_pass" />
|
|
<result property="isRetrial" column="is_retrial" />
|
|
<result property="remark" column="remark" />
|
|
<result property="customerSource" column="customer_source" />
|
|
<result property="status" column="status" />
|
|
<result property="startTime" column="start_time" />
|
|
<result property="endTime" column="end_time" />
|
|
<result property="makeCert" column="make_cert" />
|
|
<result property="year" column="year" />
|
|
<result property="month" column="month" />
|
|
<result property="day" column="day" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="creator" column="creator" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updater" column="updater" />
|
|
<result property="nextMaintenanceDate" column="next_maintenance_date" />
|
|
<result property="nextInspectionDate" column="next_inspection_date" />
|
|
<result property="otherPhone" column="other_phone" />
|
|
<result property="driverLicenesImg" column="driver_licenes_img" />
|
|
<result property="isPayOnline" column="is_pay_online" />
|
|
<result property="isPickCar" column="is_pick_car" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDelInspectionInfoVo">
|
|
select id, inspection_order_id, user_id, user_name, buy_name, buy_phone, user_address, unit_name, partner_id, work_id, worker_name, worker_phone, worker_avatar, category_id, car_num, car_model, car_nature, car_status, car_id_no, is_pass, is_retrial, remark, customer_source, status, start_time, end_time, make_cert, year, month, day, create_time, creator, update_time, updater, next_maintenance_date, next_inspection_date, other_phone, driver_licenes_img, is_pay_online, is_pick_car from del_inspection_info
|
|
</sql>
|
|
|
|
<select id="selectDelInspectionInfoList" parameterType="cn.iocoder.yudao.module.inspection.entity.DelInspectionInfo" resultMap="DelInspectionInfoResult">
|
|
<include refid="selectDelInspectionInfoVo"/>
|
|
<where>
|
|
<if test="inspectionOrderId != null "> and inspection_order_id = #{inspectionOrderId}</if>
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
<if test="buyName != null and buyName != ''"> and buy_name like concat('%', #{buyName}, '%')</if>
|
|
<if test="buyPhone != null and buyPhone != ''"> and buy_phone = #{buyPhone}</if>
|
|
<if test="userAddress != null and userAddress != ''"> and user_address = #{userAddress}</if>
|
|
<if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
|
|
<if test="partnerId != null "> and partner_id = #{partnerId}</if>
|
|
<if test="workId != null "> and work_id = #{workId}</if>
|
|
<if test="workerName != null and workerName != ''"> and worker_name like concat('%', #{workerName}, '%')</if>
|
|
<if test="workerPhone != null and workerPhone != ''"> and worker_phone = #{workerPhone}</if>
|
|
<if test="workerAvatar != null and workerAvatar != ''"> and worker_avatar = #{workerAvatar}</if>
|
|
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
|
<if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
|
|
<if test="carModel != null and carModel != ''"> and car_model = #{carModel}</if>
|
|
<if test="carNature != null and carNature != ''"> and car_nature = #{carNature}</if>
|
|
<if test="carStatus != null and carStatus != ''"> and car_status = #{carStatus}</if>
|
|
<if test="carIdNo != null and carIdNo != ''"> and car_id_no = #{carIdNo}</if>
|
|
<if test="isPass != null and isPass != ''"> and is_pass = #{isPass}</if>
|
|
<if test="isRetrial != null and isRetrial != ''"> and is_retrial = #{isRetrial}</if>
|
|
<if test="customerSource != null and customerSource != ''"> and customer_source = #{customerSource}</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="startTime != null "> and start_time = #{startTime}</if>
|
|
<if test="endTime != null "> and end_time = #{endTime}</if>
|
|
<if test="makeCert != null and makeCert != ''"> and make_cert = #{makeCert}</if>
|
|
<if test="year != null and year != ''"> and year = #{year}</if>
|
|
<if test="month != null and month != ''"> and month = #{month}</if>
|
|
<if test="day != null and day != ''"> and day = #{day}</if>
|
|
<if test="nextMaintenanceDate != null "> and next_maintenance_date = #{nextMaintenanceDate}</if>
|
|
<if test="nextInspectionDate != null "> and next_inspection_date = #{nextInspectionDate}</if>
|
|
<if test="otherPhone != null and otherPhone != ''"> and other_phone = #{otherPhone}</if>
|
|
<if test="driverLicenesImg != null and driverLicenesImg != ''"> and driver_licenes_img = #{driverLicenesImg}</if>
|
|
<if test="isPayOnline != null and isPayOnline != ''"> and is_pay_online = #{isPayOnline}</if>
|
|
<if test="isPickCar != null and isPickCar != ''"> and is_pick_car = #{isPickCar}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDelInspectionInfoById" parameterType="Long" resultMap="DelInspectionInfoResult">
|
|
<include refid="selectDelInspectionInfoVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertDelInspectionInfo" parameterType="cn.iocoder.yudao.module.inspection.entity.DelInspectionInfo" >
|
|
insert into del_inspection_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="inspectionOrderId != null">inspection_order_id,</if>
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="userName != null">user_name,</if>
|
|
<if test="buyName != null">buy_name,</if>
|
|
<if test="buyPhone != null">buy_phone,</if>
|
|
<if test="userAddress != null">user_address,</if>
|
|
<if test="unitName != null">unit_name,</if>
|
|
<if test="partnerId != null">partner_id,</if>
|
|
<if test="workId != null">work_id,</if>
|
|
<if test="workerName != null">worker_name,</if>
|
|
<if test="workerPhone != null">worker_phone,</if>
|
|
<if test="workerAvatar != null">worker_avatar,</if>
|
|
<if test="categoryId != null">category_id,</if>
|
|
<if test="carNum != null">car_num,</if>
|
|
<if test="carModel != null">car_model,</if>
|
|
<if test="carNature != null">car_nature,</if>
|
|
<if test="carStatus != null">car_status,</if>
|
|
<if test="carIdNo != null">car_id_no,</if>
|
|
<if test="isPass != null">is_pass,</if>
|
|
<if test="isRetrial != null">is_retrial,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="customerSource != null">customer_source,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="startTime != null">start_time,</if>
|
|
<if test="endTime != null">end_time,</if>
|
|
<if test="makeCert != null">make_cert,</if>
|
|
<if test="year != null">year,</if>
|
|
<if test="month != null">month,</if>
|
|
<if test="day != null">day,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="creator != null">creator,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updater != null">updater,</if>
|
|
<if test="nextMaintenanceDate != null">next_maintenance_date,</if>
|
|
<if test="nextInspectionDate != null">next_inspection_date,</if>
|
|
<if test="otherPhone != null">other_phone,</if>
|
|
<if test="driverLicenesImg != null">driver_licenes_img,</if>
|
|
<if test="isPayOnline != null">is_pay_online,</if>
|
|
<if test="isPickCar != null">is_pick_car,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="inspectionOrderId != null">#{inspectionOrderId},</if>
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="userName != null">#{userName},</if>
|
|
<if test="buyName != null">#{buyName},</if>
|
|
<if test="buyPhone != null">#{buyPhone},</if>
|
|
<if test="userAddress != null">#{userAddress},</if>
|
|
<if test="unitName != null">#{unitName},</if>
|
|
<if test="partnerId != null">#{partnerId},</if>
|
|
<if test="workId != null">#{workId},</if>
|
|
<if test="workerName != null">#{workerName},</if>
|
|
<if test="workerPhone != null">#{workerPhone},</if>
|
|
<if test="workerAvatar != null">#{workerAvatar},</if>
|
|
<if test="categoryId != null">#{categoryId},</if>
|
|
<if test="carNum != null">#{carNum},</if>
|
|
<if test="carModel != null">#{carModel},</if>
|
|
<if test="carNature != null">#{carNature},</if>
|
|
<if test="carStatus != null">#{carStatus},</if>
|
|
<if test="carIdNo != null">#{carIdNo},</if>
|
|
<if test="isPass != null">#{isPass},</if>
|
|
<if test="isRetrial != null">#{isRetrial},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="customerSource != null">#{customerSource},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="startTime != null">#{startTime},</if>
|
|
<if test="endTime != null">#{endTime},</if>
|
|
<if test="makeCert != null">#{makeCert},</if>
|
|
<if test="year != null">#{year},</if>
|
|
<if test="month != null">#{month},</if>
|
|
<if test="day != null">#{day},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="creator != null">#{creator},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updater != null">#{updater},</if>
|
|
<if test="nextMaintenanceDate != null">#{nextMaintenanceDate},</if>
|
|
<if test="nextInspectionDate != null">#{nextInspectionDate},</if>
|
|
<if test="otherPhone != null">#{otherPhone},</if>
|
|
<if test="driverLicenesImg != null">#{driverLicenesImg},</if>
|
|
<if test="isPayOnline != null">#{isPayOnline},</if>
|
|
<if test="isPickCar != null">#{isPickCar},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDelInspectionInfo" parameterType="cn.iocoder.yudao.module.inspection.entity.DelInspectionInfo">
|
|
update del_inspection_info
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="inspectionOrderId != null">inspection_order_id = #{inspectionOrderId},</if>
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
<if test="userName != null">user_name = #{userName},</if>
|
|
<if test="buyName != null">buy_name = #{buyName},</if>
|
|
<if test="buyPhone != null">buy_phone = #{buyPhone},</if>
|
|
<if test="userAddress != null">user_address = #{userAddress},</if>
|
|
<if test="unitName != null">unit_name = #{unitName},</if>
|
|
<if test="partnerId != null">partner_id = #{partnerId},</if>
|
|
<if test="workId != null">work_id = #{workId},</if>
|
|
<if test="workerName != null">worker_name = #{workerName},</if>
|
|
<if test="workerPhone != null">worker_phone = #{workerPhone},</if>
|
|
<if test="workerAvatar != null">worker_avatar = #{workerAvatar},</if>
|
|
<if test="categoryId != null">category_id = #{categoryId},</if>
|
|
<if test="carNum != null">car_num = #{carNum},</if>
|
|
<if test="carModel != null">car_model = #{carModel},</if>
|
|
<if test="carNature != null">car_nature = #{carNature},</if>
|
|
<if test="carStatus != null">car_status = #{carStatus},</if>
|
|
<if test="carIdNo != null">car_id_no = #{carIdNo},</if>
|
|
<if test="isPass != null">is_pass = #{isPass},</if>
|
|
<if test="isRetrial != null">is_retrial = #{isRetrial},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="customerSource != null">customer_source = #{customerSource},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="startTime != null">start_time = #{startTime},</if>
|
|
<if test="endTime != null">end_time = #{endTime},</if>
|
|
<if test="makeCert != null">make_cert = #{makeCert},</if>
|
|
<if test="year != null">year = #{year},</if>
|
|
<if test="month != null">month = #{month},</if>
|
|
<if test="day != null">day = #{day},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="creator != null">creator = #{creator},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updater != null">updater = #{updater},</if>
|
|
<if test="nextMaintenanceDate != null">next_maintenance_date = #{nextMaintenanceDate},</if>
|
|
<if test="nextInspectionDate != null">next_inspection_date = #{nextInspectionDate},</if>
|
|
<if test="otherPhone != null">other_phone = #{otherPhone},</if>
|
|
<if test="driverLicenesImg != null">driver_licenes_img = #{driverLicenesImg},</if>
|
|
<if test="isPayOnline != null">is_pay_online = #{isPayOnline},</if>
|
|
<if test="isPickCar != null">is_pick_car = #{isPickCar},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDelInspectionInfoById" parameterType="Long">
|
|
delete from del_inspection_info where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDelInspectionInfoByIds" parameterType="String">
|
|
delete from del_inspection_info where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|