| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- <?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="com.bz.smart_city.dao.ShipRepairLogMapper">
- <resultMap id="BaseResultMap" type="com.bz.smart_city.entity.ShipRepairLog">
- <!--@mbg.generated-->
- <id column="id" property="id" />
- <result column="receipt_id" property="receiptId" />
- <result column="task_id" property="taskId" />
- <result column="task_name" property="taskName" />
- <result column="receive_task_time" property="receiveTaskTime" />
- <result column="action_user_id" property="actionUserId" />
- <result column="action" property="action" />
- <result column="action_option" property="actionOption" />
- <result column="action_time" property="actionTime" />
- <result column="comment" property="comment" />
- <result column="status" property="status" />
- <result column="create_by" property="createBy" />
- <result column="update_by" property="updateBy" />
- <result column="date_create" property="dateCreate" />
- <result column="date_update" property="dateUpdate" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id, receipt_id, task_id, task_name, receive_task_time, action_user_id, `action`,
- action_option, action_time, `comment`, `status`, create_by, update_by, date_create,
- date_update
- </sql>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bz.smart_city.entity.ShipRepairLog" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into sc_ship_repair_log
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="receiptId != null">
- receipt_id,
- </if>
- <if test="taskId != null">
- task_id,
- </if>
- <if test="taskName != null">
- task_name,
- </if>
- <if test="receiveTaskTime != null">
- receive_task_time,
- </if>
- <if test="actionUserId != null">
- action_user_id,
- </if>
- <if test="action != null">
- `action`,
- </if>
- <if test="actionOption != null">
- action_option,
- </if>
- <if test="actionContext != null">
- action_context,
- </if>
- <if test="actionTime != null">
- action_time,
- </if>
- <if test="comment != null">
- `comment`,
- </if>
- <if test="status != null">
- `status`,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="updateBy != null">
- update_by,
- </if>
- <if test="dateCreate != null">
- date_create,
- </if>
- <if test="dateUpdate != null">
- date_update,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="receiptId != null">
- #{receiptId},
- </if>
- <if test="taskId != null">
- #{taskId},
- </if>
- <if test="taskName != null">
- #{taskName},
- </if>
- <if test="receiveTaskTime != null">
- #{receiveTaskTime},
- </if>
- <if test="actionUserId != null">
- #{actionUserId},
- </if>
- <if test="action != null">
- #{action},
- </if>
- <if test="actionOption != null">
- #{actionOption},
- </if>
- <if test="actionContext != null">
- #{actionContext},
- </if>
- <if test="actionTime != null">
- #{actionTime},
- </if>
- <if test="comment != null">
- #{comment},
- </if>
- <if test="status != null">
- #{status},
- </if>
- <if test="createBy != null">
- #{createBy},
- </if>
- <if test="updateBy != null">
- #{updateBy},
- </if>
- <if test="dateCreate != null">
- #{dateCreate},
- </if>
- <if test="dateUpdate != null">
- #{dateUpdate},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.bz.smart_city.entity.ShipRepairLog">
- <!--@mbg.generated-->
- update sc_ship_repair_log
- <set>
- <if test="receiptId != null">
- receipt_id = #{receiptId},
- </if>
- <if test="taskId != null">
- task_id = #{taskId},
- </if>
- <if test="taskName != null">
- task_name = #{taskName},
- </if>
- <if test="receiveTaskTime != null">
- receive_task_time = #{receiveTaskTime},
- </if>
- <if test="actionUserId != null">
- action_user_id = #{actionUserId},
- </if>
- <if test="action != null">
- `action` = #{action},
- </if>
- <if test="actionOption != null">
- action_option = #{actionOption},
- </if>
- <if test="actionTime != null">
- action_time = #{actionTime},
- </if>
- <if test="comment != null">
- `comment` = #{comment},
- </if>
- <if test="status != null">
- `status` = #{status},
- </if>
- <if test="createBy != null">
- create_by = #{createBy},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy},
- </if>
- <if test="dateCreate != null">
- date_create = #{dateCreate},
- </if>
- <if test="dateUpdate != null">
- date_update = #{dateUpdate},
- </if>
- </set>
- where id = #{id}
- </update>
- <resultMap id="EnhanceBaseResultMap" type="com.bz.smart_city.dto.repair.ShipAndRepairLogDTO">
- <id column="id" property="id" />
- <result column="receipt_id" property="receiptId" />
- <result column="task_id" property="taskId" />
- <result column="task_name" property="taskName" />
- <result column="receive_task_time" property="receiveTaskTime" />
- <result column="action_user_id" property="actionUserId" />
- <result column="action" property="action" />
- <result column="action_option" property="actionOption" />
- <result column="action_time" property="actionTime" />
- <result column="comment" property="comment" />
- <result column="status" property="status" />
- <result column="create_by" property="createBy" />
- <result column="update_by" property="updateBy" />
- <result column="date_create" property="dateCreate" />
- <result column="date_update" property="dateUpdate" />
- <collection property="relationFiles" column="task_id" ofType="com.bz.smart_city.entity.SrrRelationFile" select="com.bz.smart_city.dao.SrrRelationFileMapper.selectRelationFileByTaskId"/>
- </resultMap>
-
- <select id="getLogList" resultMap="EnhanceBaseResultMap">
- select
- <include refid="Base_Column_List" />
- from sc_ship_repair_log
- where status = 1
- and receipt_id = #{receiptId}
- </select>
- </mapper>
|