OverseasreportedpricesMapper.xml
3.61 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
<?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.lhcredit.project.business.overseasreportedprices.mapper.OverseasreportedpricesMapper">
<resultMap type="Overseasreportedprices" id="OverseasreportedpricesResult">
<result property="id" column="id" />
<result property="gj" column="gj" />
<result property="en" column="en" />
<result property="jff" column="jff" />
<result property="type" column="type" />
<result property="jg" column="jg" />
</resultMap>
<sql id="selectOverseasreportedpricesVo">
select id, gj, en, jff, type, jg from overseasreportedprices
</sql>
<select id="selectOverseasreportedpricesList" parameterType="Overseasreportedprices" resultMap="OverseasreportedpricesResult">
<include refid="selectOverseasreportedpricesVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="gj != null and gj != '' "> and gj = #{gj}</if>
<if test="en != null and en != '' "> and en = #{en}</if>
<if test="jff != null and jff != '' "> and jff = #{jff}</if>
<if test="type != null and type != '' "> and type = #{type}</if>
<if test="jg != null "> and jg = #{jg}</if>
</where>
</select>
<select id="selectOverseasreportedpricesById" parameterType="Integer" resultMap="OverseasreportedpricesResult">
<include refid="selectOverseasreportedpricesVo"/>
where id = #{id}
</select>
<insert id="insertOverseasreportedprices" parameterType="Overseasreportedprices" useGeneratedKeys="true" keyProperty="id">
insert into overseasreportedprices
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="gj != null and gj != '' ">gj,</if>
<if test="en != null and en != '' ">en,</if>
<if test="jff != null and jff != '' ">jff,</if>
<if test="type != null and type != '' ">type,</if>
<if test="jg != null ">jg,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="gj != null and gj != '' ">#{gj},</if>
<if test="en != null and en != '' ">#{en},</if>
<if test="jff != null and jff != '' ">#{jff},</if>
<if test="type != null and type != '' ">#{type},</if>
<if test="jg != null ">#{jg},</if>
</trim>
</insert>
<update id="updateOverseasreportedprices" parameterType="Overseasreportedprices">
update overseasreportedprices
<trim prefix="SET" suffixOverrides=",">
<if test="gj != null and gj != '' ">gj = #{gj},</if>
<if test="en != null and en != '' ">en = #{en},</if>
<if test="jff != null and jff != '' ">jff = #{jff},</if>
<if test="type != null and type != '' ">type = #{type},</if>
<if test="jg != null ">jg = #{jg},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteOverseasreportedpricesById" parameterType="Integer">
delete from overseasreportedprices where id = #{id}
</delete>
<delete id="deleteOverseasreportedpricesByIds" parameterType="String">
delete from overseasreportedprices where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="jgbyjc" parameterType="String" resultMap="OverseasreportedpricesResult">
select * from country c,overseasreportedprices o where c.gj=o.gj and o.type=#{type} AND c.jc=#{jc}
</select>
</mapper>