|
@@ -5,6 +5,7 @@
|
|
|
<!--DO-->
|
|
|
<resultMap type="com.example.nngkxxdp.entity.dos.RectificationDO" id="RectificationMap">
|
|
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="code" column="code" jdbcType="VARCHAR"/>
|
|
|
<result property="questionType" column="question_type" jdbcType="INTEGER"/>
|
|
|
<result property="errorUrl" column="error_url" jdbcType="VARCHAR"/>
|
|
|
<result property="picture" column="picture" jdbcType="VARCHAR"/>
|
|
@@ -23,6 +24,7 @@
|
|
|
<!--VO-->
|
|
|
<resultMap type="com.example.nngkxxdp.entity.vos.RectificationVO" id="RectificationVOMap">
|
|
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="code" column="code" jdbcType="VARCHAR"/>
|
|
|
<result property="questionType" column="question_type" jdbcType="INTEGER"/>
|
|
|
<result property="errorUrl" column="error_url" jdbcType="VARCHAR"/>
|
|
|
<result property="picture" column="picture" jdbcType="VARCHAR"/>
|
|
@@ -41,7 +43,7 @@
|
|
|
<!--查询单个(DO)-->
|
|
|
<select id="queryById" resultMap="RectificationMap">
|
|
|
SELECT
|
|
|
- id, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment, create_time, update_time, finish_time, isdel
|
|
|
+ id, code, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment, create_time, update_time, finish_time, isdel
|
|
|
FROM rectification
|
|
|
WHERE id = #{id}
|
|
|
</select>
|
|
@@ -49,7 +51,7 @@
|
|
|
<!--查询单个(VO)-->
|
|
|
<select id="info" resultMap="RectificationVOMap">
|
|
|
SELECT
|
|
|
- id, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment, create_time, update_time, finish_time, isdel
|
|
|
+ id, code, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment, create_time, update_time, finish_time, isdel
|
|
|
FROM rectification
|
|
|
WHERE id = #{id}
|
|
|
</select>
|
|
@@ -87,7 +89,7 @@
|
|
|
<!--所有列表-->
|
|
|
<select id="list" resultMap="RectificationVOMap">
|
|
|
SELECT
|
|
|
- id, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment,
|
|
|
+ id, code, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment,
|
|
|
create_time, update_time, finish_time, isdel
|
|
|
FROM rectification
|
|
|
<where>
|
|
@@ -98,7 +100,7 @@
|
|
|
<!--分页列表-->
|
|
|
<select id="page" resultMap="RectificationVOMap">
|
|
|
SELECT
|
|
|
- id, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment,
|
|
|
+ id, code, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment,
|
|
|
create_time, update_time, finish_time, isdel
|
|
|
FROM rectification
|
|
|
<where>
|
|
@@ -131,14 +133,17 @@
|
|
|
|
|
|
<!--新增所有列-->
|
|
|
<insert id="add">
|
|
|
- INSERT INTO rectification(id, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment, create_time, update_time, finish_time, isdel)
|
|
|
- VALUES (#{id}, #{questionType}, #{errorUrl}, #{picture}, #{questionDescription}, #{status}, #{submitter}, #{mail}, #{phone}, #{equipment}, #{createTime}, #{updateTime}, #{finishTime}, #{isdel})
|
|
|
+ INSERT INTO rectification(id, code, question_type, error_url, picture, question_description, status, submitter, mail, phone, equipment, create_time, update_time, finish_time, isdel)
|
|
|
+ VALUES (#{id}, #{code}, #{questionType}, #{errorUrl}, #{picture}, #{questionDescription}, #{status}, #{submitter}, #{mail}, #{phone}, #{equipment}, #{createTime}, #{updateTime}, #{finishTime}, #{isdel})
|
|
|
</insert>
|
|
|
|
|
|
<!--通过主键修改数据-->
|
|
|
<update id="update">
|
|
|
UPDATE rectification
|
|
|
<set>
|
|
|
+ <if test="code != null and code != ''">
|
|
|
+ code = #{code},
|
|
|
+ </if>
|
|
|
<if test="questionType != null">
|
|
|
question_type = #{questionType},
|
|
|
</if>
|
|
@@ -192,14 +197,14 @@
|
|
|
<!--通过主键受理-->
|
|
|
<delete id="work">
|
|
|
UPDATE rectification
|
|
|
- SET rectification.status = 1
|
|
|
+ SET rectification.status = 1, rectification.update_time = now()
|
|
|
WHERE id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<!--通过主键办结-->
|
|
|
<delete id="finish">
|
|
|
UPDATE rectification
|
|
|
- SET rectification.status = 2
|
|
|
+ SET rectification.status = 2, rectification.finish_time = now()
|
|
|
WHERE id = #{id}
|
|
|
</delete>
|
|
|
|