工单表结构修改

This commit is contained in:
2025-12-24 17:12:29 +08:00
parent 812109fcab
commit 6109bc2505
5 changed files with 58 additions and 6 deletions

View File

@@ -11,6 +11,10 @@
<result column="type" property="type" jdbcType="VARCHAR"/>
<result column="device" property="device" jdbcType="VARCHAR"/>
<result column="device_code" property="deviceCode" jdbcType="VARCHAR"/>
<result column="device_name_plate" property="deviceNamePlate" jdbcType="VARCHAR"/>
<result column="device_name_plate_img" property="deviceNamePlateImg" jdbcType="VARCHAR"/>
<result column="address" property="address" jdbcType="VARCHAR"/>
<result column="description" property="description" jdbcType="VARCHAR"/>
<result column="imgs" property="imgs" jdbcType="ARRAY" typeHandler="org.xyzh.common.jdbc.handler.StringArrayTypeHandler"/>
<result column="emergency" property="emergency" jdbcType="VARCHAR"/>
<result column="status" property="status" jdbcType="VARCHAR"/>
@@ -23,19 +27,29 @@
</resultMap>
<sql id="Base_Column_List">
workcase_id, optsn, user_id, username, phone, type, device, device_code, imgs,
emergency, status, processor, creator, create_time, update_time, delete_time, deleted
workcase_id, optsn, user_id, username, phone, type, device, device_code, device_name_plate, device_name_plate_img,
address, description, imgs, emergency, status, processor, creator, create_time, update_time, delete_time, deleted
</sql>
<insert id="insertWorkcase" parameterType="org.xyzh.api.workcase.dto.TbWorkcaseDTO">
INSERT INTO workcase.tb_workcase (
optsn, workcase_id, user_id, username, phone, type, device, device_code, creator
optsn, workcase_id, user_id, username, phone, type, device_name_plate_img, creator
<if test="device != null">, device</if>
<if test="deviceCode != null">, device_code</if>
<if test="deviceNamePlate != null">, device_name_plate</if>
<if test="address != null">, address</if>
<if test="description != null">, description</if>
<if test="imgs != null">, imgs</if>
<if test="emergency != null">, emergency</if>
<if test="status != null">, status</if>
<if test="processor != null">, processor</if>
) VALUES (
#{optsn}, #{workcaseId}, #{userId}, #{username}, #{phone}, #{type}, #{device}, #{deviceCode}, #{creator}
#{optsn}, #{workcaseId}, #{userId}, #{username}, #{phone}, #{type}, #{deviceNamePlateImg}, #{creator}
<if test="device != null">, #{device}</if>
<if test="deviceCode != null">, #{deviceCode}</if>
<if test="deviceNamePlate != null">, #{deviceNamePlate}</if>
<if test="address != null">, #{address}</if>
<if test="description != null">, #{description}</if>
<if test="imgs != null">, #{imgs, typeHandler=org.xyzh.common.jdbc.handler.StringArrayTypeHandler}</if>
<if test="emergency != null">, #{emergency}</if>
<if test="status != null">, #{status}</if>
@@ -52,6 +66,10 @@
<if test="type != null and type != ''">type = #{type},</if>
<if test="device != null and device != ''">device = #{device},</if>
<if test="deviceCode != null and deviceCode != ''">device_code = #{deviceCode},</if>
<if test="deviceNamePlate != null and deviceNamePlate != ''">device_name_plate = #{deviceNamePlate},</if>
<if test="deviceNamePlateImg != null and deviceNamePlateImg != ''">device_name_plate_img = #{deviceNamePlateImg},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="description != null and description != ''">description = #{description},</if>
<if test="imgs != null">imgs = #{imgs, typeHandler=org.xyzh.common.jdbc.handler.StringArrayTypeHandler},</if>
<if test="emergency != null and emergency != ''">emergency = #{emergency},</if>
<if test="status != null and status != ''">status = #{status},</if>