|
@@ -9,13 +9,15 @@
|
|
<result column="question_is_qc_detect" property="questionIsQcDetect" jdbcType="BIT" />
|
|
<result column="question_is_qc_detect" property="questionIsQcDetect" jdbcType="BIT" />
|
|
<result column="question_create_time" property="questionCreateTime" jdbcType="TIMESTAMP" />
|
|
<result column="question_create_time" property="questionCreateTime" jdbcType="TIMESTAMP" />
|
|
<result column="question_update_time" property="questionUpdateTime" jdbcType="TIMESTAMP" />
|
|
<result column="question_update_time" property="questionUpdateTime" jdbcType="TIMESTAMP" />
|
|
|
|
+ <result column="question_resolved_num" property="questionResolvedNum" jdbcType="INTEGER" />
|
|
|
|
+ <result column="question_not_solved_num" property="questionNotSolvedNum" jdbcType="INTEGER" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<resultMap id="ResultMapWithBLOBs" type="ComplaintQuestionInfo" extends="BaseResultMap" >
|
|
<resultMap id="ResultMapWithBLOBs" type="ComplaintQuestionInfo" extends="BaseResultMap" >
|
|
<result column="question_profile" property="questionProfile" jdbcType="LONGVARCHAR" />
|
|
<result column="question_profile" property="questionProfile" jdbcType="LONGVARCHAR" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<sql id="Base_Column_List" >
|
|
<sql id="Base_Column_List" >
|
|
question_id, small_class_id, question_name, question_state, question_is_qc_detect,
|
|
question_id, small_class_id, question_name, question_state, question_is_qc_detect,
|
|
- question_create_time, question_update_time
|
|
|
|
|
|
+ question_create_time, question_update_time,question_resolved_num,question_not_solved_num
|
|
</sql>
|
|
</sql>
|
|
<sql id="Blob_Column_List" >
|
|
<sql id="Blob_Column_List" >
|
|
question_profile
|
|
question_profile
|
|
@@ -32,7 +34,7 @@
|
|
<select id="listComplaintQuestionInfo" resultMap="BaseResultMap" parameterType="ComplaintQuestionInfo" >
|
|
<select id="listComplaintQuestionInfo" resultMap="BaseResultMap" parameterType="ComplaintQuestionInfo" >
|
|
select
|
|
select
|
|
question_id, small_class_id, question_name, question_state, question_is_qc_detect,question_profile,
|
|
question_id, small_class_id, question_name, question_state, question_is_qc_detect,question_profile,
|
|
- question_create_time, question_update_time
|
|
|
|
|
|
+ question_create_time, question_update_time,question_resolved_num,question_not_solved_num
|
|
from tb_rst_complaint_question
|
|
from tb_rst_complaint_question
|
|
<where>
|
|
<where>
|
|
<if test="smallClassId !=null">
|
|
<if test="smallClassId !=null">
|
|
@@ -50,11 +52,12 @@
|
|
<insert id="insert" parameterType="ComplaintQuestionInfo" >
|
|
<insert id="insert" parameterType="ComplaintQuestionInfo" >
|
|
insert into tb_rst_complaint_question (question_id, small_class_id, question_name,
|
|
insert into tb_rst_complaint_question (question_id, small_class_id, question_name,
|
|
question_state, question_is_qc_detect, question_create_time,
|
|
question_state, question_is_qc_detect, question_create_time,
|
|
- question_update_time, question_profile
|
|
|
|
|
|
+ question_update_time, question_profile,question_resolved_num,question_not_solved_num
|
|
)
|
|
)
|
|
values (#{questionId,jdbcType=INTEGER}, #{smallClassId,jdbcType=INTEGER}, #{questionName,jdbcType=VARCHAR},
|
|
values (#{questionId,jdbcType=INTEGER}, #{smallClassId,jdbcType=INTEGER}, #{questionName,jdbcType=VARCHAR},
|
|
#{questionState,jdbcType=BIT}, #{questionIsQcDetect,jdbcType=BIT}, #{questionCreateTime,jdbcType=TIMESTAMP},
|
|
#{questionState,jdbcType=BIT}, #{questionIsQcDetect,jdbcType=BIT}, #{questionCreateTime,jdbcType=TIMESTAMP},
|
|
- #{questionUpdateTime,jdbcType=TIMESTAMP}, #{questionProfile,jdbcType=LONGVARCHAR}
|
|
|
|
|
|
+ #{questionUpdateTime,jdbcType=TIMESTAMP}, #{questionProfile,jdbcType=LONGVARCHAR}, #{questionResolvedNum,jdbcType=INTEGER}
|
|
|
|
+ , #{questionNotSolvedNum,jdbcType=INTEGER}
|
|
)
|
|
)
|
|
</insert>
|
|
</insert>
|
|
<update id="updateQuestionById" parameterType="ComplaintQuestionInfo" >
|
|
<update id="updateQuestionById" parameterType="ComplaintQuestionInfo" >
|
|
@@ -81,6 +84,12 @@
|
|
<if test="questionProfile != null" >
|
|
<if test="questionProfile != null" >
|
|
question_profile = #{questionProfile,jdbcType=LONGVARCHAR},
|
|
question_profile = #{questionProfile,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="questionResolvedNum != null" >
|
|
|
|
+ question_resolved_num = question_resolved_num+1,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="questionNotSolvedNum != null" >
|
|
|
|
+ question_not_solved_num = question_not_solved_num+1,
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
where question_id = #{questionId,jdbcType=INTEGER}
|
|
where question_id = #{questionId,jdbcType=INTEGER}
|
|
</update>
|
|
</update>
|