DgArchivesMapper.xml
3.72 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?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.archive.mapper.DgArchivesMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.pashanhoo.archive.entity.DgArchivesDO">
<id column="BSM_ARCHIVES" property="bsmArchives" />
<result column="AJBT" property="ajbt" />
<result column="ZTC" property="ztc" />
<result column="FLH" property="flh" />
<result column="MLH" property="mlh" />
<result column="AJH" property="ajh" />
<result column="ND" property="nd" />
<result column="JS" property="js" />
<result column="YS" property="ys" />
<result column="BGQX" property="bgqx" />
<result column="QSRQ" property="qsrq" />
<result column="ZZRQ" property="zzrq" />
<result column="MJ" property="mj" />
<result column="HH" property="hh" />
<result column="CFWZ" property="cfwz" />
<result column="CJR" property="cjr" />
<result column="CJRQ" property="cjrq" />
<result column="HCR" property="hcr" />
<result column="BZ" property="bz" />
<result column="SMZT" property="smzt" />
<result column="DAZT" property="dazt" />
<result column="CDJGBM" property="cdjgbm" />
<result column="DALY" property="daly" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
BSM_ARCHIVES, AJBT, ZTC, FLH, MLH, AJH, ND, JS, YS, BGQX, QSRQ, ZZRQ, MJ, HH, CFWZ, CJR, CJRQ, HCR, BZ, SMZT, DAZT, CDJGBM, DALY
</sql>
<update id="updateArchivesInfoByReceiveIdList">
update DG_ARCHIVES a set a.dazt=#{dazt,jdbcType=VARCHAR} where exists (
select 1 from dg_receive_relation b where a.BSM_ARCHIVES=b.BSM_ARCHIVES
and b.bms_receive in
<foreach collection="idList" index="index" item="item"
separator="," open="(" close=")">
#{item,jdbcType=VARCHAR}
</foreach>
)
</update>
<select id="searchArchive" resultType="com.pashanhoo.archive.entity.vo.SearchArchiveVO">
select rownum as xh,
DA.BSM_ARCHIVES,
DA.DAZT,
DA.DALY,
DA.AJH,
DA.CFWZ,
DA.HH,
D.BDCQZH,
D.QLR,
D.YWR,
DB.YWH,
D.BDCDYH,
DB.QLLX
from DG_ARCHIVES DA
join DG_BUSINESS DB on DA.BSM_ARCHIVES = DB.BSM_ARCHIVES
join DG_BDCDY D on DA.BSM_ARCHIVES = D.BSM_ARCHIVES
<where>
<if test="request.ajh != null and request.ajh != ''">
AJH = #{request.ajh,jdbcType=VARCHAR}
</if>
<if test="request.mlh != null and request.mlh != ''">
and MLH = #{request.mlh,jdbcType=VARCHAR}
</if>
<if test="request.hh != null and request.hh != ''">
and HH = #{request.hh,jdbcType=VARCHAR}
</if>
<if test="request.dazt != null and request.dazt != ''">
and DAZT = #{request.dazt,jdbcType=VARCHAR}
</if>
<if test="request.ywh != null and request.ywh != ''">
and YWH = #{request.ywh,jdbcType=VARCHAR}
</if>
<if test="request.bdcqzh != null and request.bdcqzh != ''">
and BDCQZH = #{request.bdcqzh,jdbcType=VARCHAR}
</if>
<if test="request.bdcdyh != null and request.bdcdyh != ''">
and BDCDYH = #{request.bdcdyh,jdbcType=VARCHAR}
</if>
<if test="request.qllx != null and request.qllx != ''">
and QLLX = #{request.qllx,jdbcType=VARCHAR}
</if>
</where>
</select>
</mapper>