56 lines
1.7 KiB
XML
56 lines
1.7 KiB
XML
|
|
<?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.hx.slj.modules.questionnaireSystem.dao.SurveyDirectoryDao">
|
||
|
|
<sql id="surveyDirectoryColumns">
|
||
|
|
a.id,
|
||
|
|
a.an_item_least_num AS "anItemLeastNum",
|
||
|
|
a.answer_num AS "answerNum",
|
||
|
|
a.create_date,
|
||
|
|
a.dir_type AS "dirType",
|
||
|
|
a.excerpt_num AS "excerptNum",
|
||
|
|
a.html_path AS "htmlPath",
|
||
|
|
a.is_share AS "isShare",
|
||
|
|
a.parent_id AS "parentId",
|
||
|
|
a.sid ,
|
||
|
|
a.survey_detail_id AS "surveyDetailId",
|
||
|
|
a.survey_model AS "surveyModel",
|
||
|
|
a.survey_name AS "surveyName",
|
||
|
|
a.survey_qu_num AS "surveyQuNum",
|
||
|
|
a.survey_state AS "surveyState",
|
||
|
|
a.survey_tag AS "surveyTag",
|
||
|
|
a.user_id AS "userId",
|
||
|
|
a.view_answer AS "viewAnswer",
|
||
|
|
a.visibility,
|
||
|
|
a.survey_type AS "surveyType",
|
||
|
|
a.orderby_num AS "orderbyNum",
|
||
|
|
a.edit_date AS "editDate"
|
||
|
|
</sql>
|
||
|
|
<select id="get" resultType="com.hx.slj.modules.questionnaireSystem.entity.SurveyDirectory">
|
||
|
|
SELECT
|
||
|
|
<include refid="surveyDirectoryColumns"/>
|
||
|
|
FROM t_survey_directory a
|
||
|
|
WHERE a.id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="findList" resultType="com.hx.slj.modules.questionnaireSystem.entity.SurveyDirectory">
|
||
|
|
SELECT
|
||
|
|
<include refid="surveyDirectoryColumns"/>
|
||
|
|
FROM t_survey_directory a
|
||
|
|
WHERE a.visibility = #{DEL_FLAG_NORMAL}
|
||
|
|
<choose>
|
||
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||
|
|
ORDER BY ${page.orderBy}
|
||
|
|
</when>
|
||
|
|
<otherwise>
|
||
|
|
ORDER BY a.update_date
|
||
|
|
</otherwise>
|
||
|
|
</choose>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<update id="deleteById">
|
||
|
|
UPDATE t_survey_directory SET
|
||
|
|
visibility = #{visibility}
|
||
|
|
WHERE id = #{id}
|
||
|
|
</update>
|
||
|
|
</mapper>
|