|
@@ -1,13 +1,14 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.slibra.business.mapper.AutoFeedbackMapper">
|
|
<mapper namespace="com.slibra.business.mapper.AutoFeedbackMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="AutoFeedback" id="AutoFeedbackResult">
|
|
<resultMap type="AutoFeedback" id="AutoFeedbackResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="reqTime" column="req_time" />
|
|
<result property="reqTime" column="req_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
+ <result property="source" column="source" />
|
|
<result property="feedbackType" column="feedback_type" />
|
|
<result property="feedbackType" column="feedback_type" />
|
|
<result property="basePara" column="base_para" />
|
|
<result property="basePara" column="base_para" />
|
|
<result property="controlCoef" column="control_coef" />
|
|
<result property="controlCoef" column="control_coef" />
|
|
@@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectAutoFeedbackVo">
|
|
<sql id="selectAutoFeedbackVo">
|
|
- select id, req_time, update_time, feedback_type, base_para, control_coef, cate, subcate, coef, cf, ext from auto_feedback
|
|
|
|
|
|
+ select id, req_time, update_time, source, feedback_type, base_para, control_coef, cate, subcate, coef, cf, ext from auto_feedback
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectAutoFeedbackList" parameterType="AutoFeedback" resultMap="AutoFeedbackResult">
|
|
<select id="selectAutoFeedbackList" parameterType="AutoFeedback" resultMap="AutoFeedbackResult">
|
|
@@ -27,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<where>
|
|
<where>
|
|
1 = 1
|
|
1 = 1
|
|
<if test="reqTime != null and reqTime != ''"> and req_time = #{reqTime}</if>
|
|
<if test="reqTime != null and reqTime != ''"> and req_time = #{reqTime}</if>
|
|
|
|
+ <if test="source != null "> and source = #{source}</if>
|
|
<if test="feedbackType != null and feedbackType != ''"> and feedback_type = #{feedbackType}</if>
|
|
<if test="feedbackType != null and feedbackType != ''"> and feedback_type = #{feedbackType}</if>
|
|
<if test="basePara != null "> and base_para = #{basePara}</if>
|
|
<if test="basePara != null "> and base_para = #{basePara}</if>
|
|
<if test="controlCoef != null "> and control_coef = #{controlCoef}</if>
|
|
<if test="controlCoef != null "> and control_coef = #{controlCoef}</if>
|
|
@@ -36,19 +38,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="cf != null and cf != ''"> and cf = #{cf}</if>
|
|
<if test="cf != null and cf != ''"> and cf = #{cf}</if>
|
|
<if test="ext != null and ext != ''"> and ext = #{ext}</if>
|
|
<if test="ext != null and ext != ''"> and ext = #{ext}</if>
|
|
</where>
|
|
</where>
|
|
- order by id desc
|
|
|
|
|
|
+ and del_flag = 0 order by id desc
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectAutoFeedbackById" parameterType="Long" resultMap="AutoFeedbackResult">
|
|
<select id="selectAutoFeedbackById" parameterType="Long" resultMap="AutoFeedbackResult">
|
|
<include refid="selectAutoFeedbackVo"/>
|
|
<include refid="selectAutoFeedbackVo"/>
|
|
where id = #{id} and del_flag = 0
|
|
where id = #{id} and del_flag = 0
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertAutoFeedback" parameterType="AutoFeedback" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertAutoFeedback" parameterType="AutoFeedback" useGeneratedKeys="true" keyProperty="id">
|
|
insert into auto_feedback
|
|
insert into auto_feedback
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="reqTime != null">req_time,</if>
|
|
<if test="reqTime != null">req_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
+ <if test="source != null">source,</if>
|
|
<if test="feedbackType != null">feedback_type,</if>
|
|
<if test="feedbackType != null">feedback_type,</if>
|
|
<if test="basePara != null">base_para,</if>
|
|
<if test="basePara != null">base_para,</if>
|
|
<if test="controlCoef != null">control_coef,</if>
|
|
<if test="controlCoef != null">control_coef,</if>
|
|
@@ -57,10 +60,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="coef != null">coef,</if>
|
|
<if test="coef != null">coef,</if>
|
|
<if test="cf != null">cf,</if>
|
|
<if test="cf != null">cf,</if>
|
|
<if test="ext != null">ext,</if>
|
|
<if test="ext != null">ext,</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="reqTime != null">#{reqTime},</if>
|
|
<if test="reqTime != null">#{reqTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ <if test="source != null">#{source},</if>
|
|
<if test="feedbackType != null">#{feedbackType},</if>
|
|
<if test="feedbackType != null">#{feedbackType},</if>
|
|
<if test="basePara != null">#{basePara},</if>
|
|
<if test="basePara != null">#{basePara},</if>
|
|
<if test="controlCoef != null">#{controlCoef},</if>
|
|
<if test="controlCoef != null">#{controlCoef},</if>
|
|
@@ -69,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="coef != null">#{coef},</if>
|
|
<if test="coef != null">#{coef},</if>
|
|
<if test="cf != null">#{cf},</if>
|
|
<if test="cf != null">#{cf},</if>
|
|
<if test="ext != null">#{ext},</if>
|
|
<if test="ext != null">#{ext},</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateAutoFeedback" parameterType="AutoFeedback">
|
|
<update id="updateAutoFeedback" parameterType="AutoFeedback">
|
|
@@ -77,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="reqTime != null">req_time = #{reqTime},</if>
|
|
<if test="reqTime != null">req_time = #{reqTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
+ <if test="source != null">source = #{source},</if>
|
|
<if test="feedbackType != null">feedback_type = #{feedbackType},</if>
|
|
<if test="feedbackType != null">feedback_type = #{feedbackType},</if>
|
|
<if test="basePara != null">base_para = #{basePara},</if>
|
|
<if test="basePara != null">base_para = #{basePara},</if>
|
|
<if test="controlCoef != null">control_coef = #{controlCoef},</if>
|
|
<if test="controlCoef != null">control_coef = #{controlCoef},</if>
|
|
@@ -90,10 +95,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
<delete id="deleteAutoFeedbackById" parameterType="Long">
|
|
<delete id="deleteAutoFeedbackById" parameterType="Long">
|
|
- delete from auto_feedback where id = #{id}
|
|
|
|
|
|
+ update auto_feedback set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteAutoFeedbackByIds" parameterType="String">
|
|
<delete id="deleteAutoFeedbackByIds" parameterType="String">
|
|
@@ -103,8 +108,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
+ <!-- 2025年04月27日14:46:01 下面是新增的SQL,不允许删除或者覆盖 -->
|
|
<delete id="deleteAll" >
|
|
<delete id="deleteAll" >
|
|
<!--truncate table auto_feedback -->
|
|
<!--truncate table auto_feedback -->
|
|
delete from auto_feedback
|
|
delete from auto_feedback
|
|
</delete>
|
|
</delete>
|
|
|
|
+
|
|
|
|
+ <select id="selectAutoFeedbackLatestByPool" resultMap="AutoFeedbackResult">
|
|
|
|
+ <include refid="selectAutoFeedbackVo"/>
|
|
|
|
+ where source = #{type} order by id desc limit 1
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|