OverseaCompanyInfoVerifyMapper.xml
7.23 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?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.overseaCompanyInfoVerify.mapper.OverseaCompanyInfoVerifyMapper">
<resultMap type="OverseaCompanyInfoVerify" id="OverseaCompanyInfoVerifyResult">
<result property="id" column="id" />
<result property="countryCodeWb" column="country_code_wb" />
<result property="countryCodeRb" column="country_code_rb" />
<result property="countryName" column="country_name" />
<result property="city" column="city" />
<result property="enterpriseName" column="enterpriseName" />
<result property="address" column="address" />
<result property="postCode" column="post_code" />
<result property="email" column="email" />
<result property="phone" column="phone" />
<result property="regNo" column="reg_no" />
<result property="handStatus" column="hand_status" />
<result property="attachment" column="attachment" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectOverseaCompanyInfoVerifyVo">
select id, country_code_wb, country_code_rb, country_name, city, enterpriseName, address, post_code, email, phone, reg_no, hand_status,attachment,create_time from oversea_company_info_verify
</sql>
<select id="selectOverseaCompanyInfoVerifyList" parameterType="OverseaCompanyInfoVerify" resultMap="OverseaCompanyInfoVerifyResult">
<include refid="selectOverseaCompanyInfoVerifyVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="countryCodeWb != null and countryCodeWb != '' "> and country_code_wb = #{countryCodeWb}</if>
<if test="countryCodeRb != null and countryCodeRb != '' "> and country_code_rb = #{countryCodeRb}</if>
<if test="countryName != null and countryName != '' "> and country_name = #{countryName}</if>
<if test="city != null and city != '' "> and city = #{city}</if>
<if test="enterpriseName != null and enterpriseName != '' "> and enterpriseName = #{enterpriseName}</if>
<if test="address != null and address != '' "> and address = #{address}</if>
<if test="postCode != null and postCode != '' "> and post_code = #{postCode}</if>
<if test="email != null and email != '' "> and email = #{email}</if>
<if test="phone != null and phone != '' "> and phone = #{phone}</if>
<if test="regNo != null "> and reg_no = #{regNo}</if>
<if test="handStatus != null "> and hand_status = #{handStatus}</if>
<if test="attachment != null "> and attachment = #{attachment}</if>
<if test="beginTime !=null and beginTime !='' ">
and create_time >= #{beginTime}
</if>
<if test="endTime !=null and endTime !='' ">
and create_time <= #{endTime}
</if>
</where>
order by create_time desc
</select>
<select id="selectOverseaCompanyInfoVerifyById" parameterType="Integer" resultMap="OverseaCompanyInfoVerifyResult">
<include refid="selectOverseaCompanyInfoVerifyVo"/>
where id = #{id}
</select>
<insert id="insertOverseaCompanyInfoVerify" parameterType="OverseaCompanyInfoVerify" useGeneratedKeys="true" keyProperty="id">
insert into oversea_company_info_verify
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="countryCodeWb != null and countryCodeWb != '' ">country_code_wb,</if>
<if test="countryCodeRb != null and countryCodeRb != '' ">country_code_rb,</if>
<if test="countryName != null and countryName != '' ">country_name,</if>
<if test="city != null and city != '' ">city,</if>
<if test="enterpriseName != null and enterpriseName != '' ">enterpriseName,</if>
<if test="address != null and address != '' ">address,</if>
<if test="postCode != null and postCode != '' ">post_code,</if>
<if test="email != null and email != '' ">email,</if>
<if test="phone != null and phone != '' ">phone,</if>
<if test="regNo != null and regNo != '' ">reg_no,</if>
<if test="handStatus != null ">hand_status,</if>
<if test="attachment != null ">attachment,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="countryCodeWb != null and countryCodeWb != '' ">#{countryCodeWb},</if>
<if test="countryCodeRb != null and countryCodeRb != '' ">#{countryCodeRb},</if>
<if test="countryName != null and countryName != '' ">#{countryName},</if>
<if test="city != null and city != '' ">#{city},</if>
<if test="enterpriseName != null and enterpriseName != '' ">#{enterpriseName},</if>
<if test="address != null and address != '' ">#{address},</if>
<if test="postCode != null and postCode != '' ">#{postCode},</if>
<if test="email != null and email != '' ">#{email},</if>
<if test="phone != null and phone != '' ">#{phone},</if>
<if test="regNo != null and regNo != '' ">#{regNo},</if>
<if test="handStatus != null ">#{handStatus},</if>
<if test="attachment != null ">#{attachment},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="updateOverseaCompanyInfoVerify" parameterType="OverseaCompanyInfoVerify">
update oversea_company_info_verify
<trim prefix="SET" suffixOverrides=",">
<if test="countryCodeWb != null and countryCodeWb != '' ">country_code_wb = #{countryCodeWb},</if>
<if test="countryCodeRb != null and countryCodeRb != '' ">country_code_rb = #{countryCodeRb},</if>
<if test="countryName != null and countryName != '' ">country_name = #{countryName},</if>
<if test="city != null and city != '' ">city = #{city},</if>
<if test="enterpriseName != null and enterpriseName != '' ">enterpriseName = #{enterpriseName},</if>
<if test="address != null and address != '' ">address = #{address},</if>
<if test="postCode != null and postCode != '' ">post_code = #{postCode},</if>
<if test="email != null and email != '' ">email = #{email},</if>
<if test="phone != null and phone != '' ">phone = #{phone},</if>
<if test="regNo != null and regNo != '' ">reg_no = #{regNo},</if>
<if test="handStatus != null ">hand_status = #{handStatus},</if>
<if test="attachment != null ">attachment = #{attachment},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteOverseaCompanyInfoVerifyById" parameterType="Integer">
delete from oversea_company_info_verify where id = #{id}
</delete>
<delete id="deleteOverseaCompanyInfoVerifyByIds" parameterType="String">
delete from oversea_company_info_verify where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>