You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
3.5 KiB
XML
77 lines
3.5 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.supervision.mapper.AskTemplateQuestionLibraryMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.supervision.model.AskTemplateQuestionLibrary">
|
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
|
<result property="dictId" column="dict_id" jdbcType="BIGINT"/>
|
|
<result property="code" column="code" jdbcType="VARCHAR"/>
|
|
<result property="standardQuestion" column="standard_question" jdbcType="VARCHAR"/>
|
|
<result property="createUserId" column="create_user_id" jdbcType="VARCHAR"/>
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
<result property="updateUserId" column="update_user_id" jdbcType="VARCHAR"/>
|
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id
|
|
,dict_id,code,standard_question,create_user_id,
|
|
create_time,update_user_id,update_time
|
|
</sql>
|
|
|
|
|
|
<resultMap id="askQuestionLibraryResultMap" type="com.supervision.vo.manage.AskQuestionLibraryResVo">
|
|
<id property="id" column="id" />
|
|
<result property="code" column="code" />
|
|
<result property="code" column="code" />
|
|
<result property="dictId" column="dictId" />
|
|
<result property="libraryQuestionId" column="libraryQuestionId" />
|
|
<result property="nameZhPath" column="nameZhPath" />
|
|
</resultMap>
|
|
|
|
|
|
<sql id="queryListsql">
|
|
select
|
|
atql.id as id,
|
|
atql.id as libraryQuestionId,
|
|
cd.code as code,
|
|
atql.dict_id as dictId,
|
|
cd.parent_id as parentDictId,
|
|
atql.standard_question as standardQuestion,
|
|
cd.name_zh_path as nameZhPath,
|
|
cd.name_zh as nameZh
|
|
from vp_ask_template_question_library atql
|
|
left join vp_common_dic cd on atql.dict_id = cd.id
|
|
<where>
|
|
<!--排除掉默认系统异常问题数据-->
|
|
atql.id != '1739875168974536705'
|
|
<if test="askQuestionLibrary.code != null and askQuestionLibrary.code != '' ">
|
|
and cd.code = #{askQuestionLibrary.code}
|
|
</if>
|
|
<if test="askQuestionLibrary.description != null and askQuestionLibrary.description != '' ">
|
|
and atql.standard_question like CONCAT('%', #{askQuestionLibrary.description}, '%')
|
|
</if>
|
|
<if test="askQuestionLibrary.dictId != null and askQuestionLibrary.dictId != '' ">
|
|
and atql.dict_id = #{askQuestionLibrary.dictId}
|
|
</if>
|
|
<if test="askQuestionLibrary.similarityDescription != null and askQuestionLibrary.similarityDescription != '' ">
|
|
and atql.id in (
|
|
select vatqs.library_id from vp_ask_template_question_similarity vatqs
|
|
where vatqs.similarity_question like CONCAT('%', #{askQuestionLibrary.similarityDescription}, '%'))
|
|
</if>
|
|
|
|
</where>
|
|
order by cd.id asc ,atql.create_time desc
|
|
</sql>
|
|
|
|
<select id="queryList" resultMap="askQuestionLibraryResultMap" parameterType="com.supervision.vo.manage.AskQuestionLibraryReqVo">
|
|
<include refid="queryListsql"></include>
|
|
</select>
|
|
|
|
<select id="queryPageList" resultMap="askQuestionLibraryResultMap" resultType="com.supervision.vo.manage.AskQuestionLibraryResVo">
|
|
<include refid="queryListsql"></include>
|
|
</select>
|
|
</mapper>
|