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.
48 lines
2.4 KiB
XML
48 lines
2.4 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.MaterialLibraryMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.supervision.model.MaterialLibrary">
|
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
<result property="fileResourceId" column="file_resource_id" jdbcType="VARCHAR"/>
|
|
<result property="materialName" column="material_name" jdbcType="VARCHAR"/>
|
|
<result property="materialType" column="material_type" jdbcType="INTEGER"/>
|
|
<result property="directoryId" column="directory_id" jdbcType="VARCHAR"/>
|
|
<result property="materialDesc" column="material_desc" 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,file_resource_id,material_name,
|
|
material_type,directory_id,material_desc,create_user_id,create_time,
|
|
update_user_id,update_time
|
|
</sql>
|
|
|
|
<select id="queryMaterialPage" resultType="com.supervision.vo.manage.MaterialLibraryResVo">
|
|
select ml.id as id,
|
|
ml.file_resource_id as fileResourceId,
|
|
ml.material_name as materialName,
|
|
ml.material_type as materialType,
|
|
ml.directory_id as directoryId,
|
|
ml.material_desc as materialDesc,
|
|
di.directory_name as directoryName
|
|
from vp_material_library ml
|
|
left join vp_directory_info di on ml.directory_id = di.id
|
|
where 1=1
|
|
<if test="materialLibrary.materialType != null">
|
|
and ml.material_type = #{materialLibrary.materialType}
|
|
</if>
|
|
<if test="materialLibrary.materialName != null and materialLibrary.materialName != ''">
|
|
and ml.material_name like concat('%',#{materialLibrary.materialName},'%')
|
|
</if>
|
|
<if test="materialLibrary.directoryId != null and materialLibrary.directoryId != ''">
|
|
and ml.directory_id = #{materialLibrary.directoryId}
|
|
</if>
|
|
</select>
|
|
</mapper>
|