DgFileMapper.xml
2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?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.pashanhoo.file.mapper.DgFileMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.pashanhoo.file.entity.DgFileDO">
<id column="BSM_FILE" property="bsmFile"/>
<result column="BSM_CATALOG" property="bsmCatalog"/>
<result column="KZM" property="kzm"/>
<result column="SCRQ" property="scrq"/>
<result column="SCR" property="scr"/>
<result column="FJURL" property="fjurl"/>
<result column="FJSIZE" property="fjsize"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
BSM_FILE,
BSM_CATALOG,
KZM,
SCRQ,
SCR,
FJURL,
FJSIZE
</sql>
<resultMap id="result" type="com.pashanhoo.file.entity.vo.DgCatalogWithFileVO">
<result column="bsm_catalog" property="bsmCatalog"/>
<result column="wjmc" property="wjmc"/>
<result column="xh" property="xh"/>
<collection property="fileLists" ofType="com.pashanhoo.file.entity.vo.DgFileListVO">
<result column="bsm_file" property="bsmFile"/>
<result column="bsm_catalog" property="bsmCatalog"/>
<result column="kzm" property="kzm"/>
<result column="scrq" property="scrq"/>
<result column="scr" property="scr"/>
<result column="fjurl" property="fjurl"/>
<result column="fjsize" property="fjsize"/>
</collection>
</resultMap>
<select id="getFileList" resultType="com.pashanhoo.file.entity.vo.DgFileListVO">
select DF.*, DAC.XH, DAC.WJMC,DAC.BSM_CATALOG
from DG_FILE DF
join DG_ARCHIVES_CATALOG DAC on DAC.BSM_CATALOG = DF.BSM_CATALOG
<where>
<if test="bsmArchive != null and bsmArchive != ''">
BSM_ARCHIVES = #{bsmArchive,jdbcType=VARCHAR}
</if>
</where>
order by DAC.XH
</select>
</mapper>