增加一个调查问卷
This commit is contained in:
@ -10,11 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="questionId" column="question_id" />
|
||||
<result property="infoId" column="info_id" />
|
||||
<result property="indexType" column="index_type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="AnswerCountVo" id="answerCountVo">
|
||||
<result property="answer" column="answer" />
|
||||
<result property="answerCount" column="answer_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDwIndexConfigVo">
|
||||
@ -43,22 +43,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="questionId != null">question_id,</if>
|
||||
<if test="infoId != null">info_id,</if>
|
||||
<if test="indexType != null">index_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="indexName != null">#{indexName},</if>
|
||||
<if test="questionId != null">#{questionId},</if>
|
||||
<if test="infoId != null">#{infoId},</if>
|
||||
<if test="indexType != null">#{indexType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -69,11 +59,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="questionId != null">question_id = #{questionId},</if>
|
||||
<if test="infoId != null">info_id = #{infoId},</if>
|
||||
<if test="indexType != null">index_type = #{indexType},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -89,10 +74,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectIndex" resultType="com.ruoyi.dw.domain.vo.AnswerCountVo">
|
||||
<select id="selectIndex" resultMap="answerCountVo">
|
||||
select answer, count(0) as answer_count
|
||||
from dw_answer
|
||||
where indo_id = #{infoId}
|
||||
where info_id = #{infoId}
|
||||
and question_id = #{questionId}
|
||||
group by answer
|
||||
</select>
|
||||
|
Reference in New Issue
Block a user