DgFileMapper.xml
2.25 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
53
54
55
56
57
58
59
<?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">
<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"/>
<result column="xh" property="xh"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
BSM_FILE,
BSM_CATALOG,
KZM,
SCRQ,
SCR,
FJURL,
FJSIZE,
XH
</sql>
<resultMap id="result" type="com.pashanhoo.file.entity.vo.DgCatalogWithFileVO">
<result column="bsm_catalog" property="bsmCatalog"/>
<result column="wjmc" property="wjmc"/>
<result column="catalogXh" property="catalogXh"/>
<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"/>
<result column="XH" property="xh"/>
</collection>
</resultMap>
<select id="getFileList" resultMap="result">
select DF.*, DAC.XH as catalogXh, 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 DF.XH,DAC.XH
</select>
<!--<update id="updateFileSort">-->
<!-- update DG_FILE set-->
<!--</update>-->
</mapper>