ScrmMagicCubeCustomerMapper.xml
5.15 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
<?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="cn.com.glsx.entmicro.mapper.ScrmMagicCubeCustomerMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.magic.ScrmMagicCubeCustomer">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="created_by" jdbcType="INTEGER" property="createdBy"/>
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
<result column="updated_by" jdbcType="INTEGER" property="updatedBy"/>
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime"/>
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
<result column="customer_name" jdbcType="VARCHAR" property="customerName"/>
<result column="customer_phone" jdbcType="VARCHAR" property="customerPhone"/>
<result column="customer_sex" jdbcType="BIT" property="customerSex"/>
<result column="customer_idcard_no" jdbcType="VARCHAR" property="customerIdcardNo"/>
<result column="car_buying_date" jdbcType="DATE" property="carBuyingDate"/>
<result column="recent_maintenance_date" jdbcType="DATE" property="recentMaintenanceDate"/>
<result column="recent_arrival_date" jdbcType="DATE" property="recentArrivalDate"/>
<result column="effective_date_of_commercial_insurance" jdbcType="DATE"
property="effectiveDateOfCommercialInsurance"/>
<result column="commercial_insurance_expiration_date" jdbcType="DATE"
property="commercialInsuranceExpirationDate"/>
<result column="car_series" jdbcType="VARCHAR" property="carSeries"/>
<result column="car_model" jdbcType="VARCHAR" property="carModel"/>
<result column="import_type" jdbcType="BIT" property="importType"/>
<result column="import_flag" jdbcType="VARCHAR" property="importFlag"/>
<result column="customer_type" jdbcType="INTEGER" property="customerType"/>
<result column="wait_renewal_flag" jdbcType="INTEGER" property="waitRenewalFlag"/>
<result column="wait_regular_maintain_flag" jdbcType="INTEGER" property="waitRegularMaintainFlag"/>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, created_by, created_time, updated_by, updated_time, del_flag, customer_name,
customer_phone, customer_sex, customer_idcard_no, car_buying_date, recent_maintenance_date,
recent_arrival_date, effective_date_of_commercial_insurance, commercial_insurance_expiration_date,
car_series, car_model, import_type, import_flag, customer_type, wait_renewal_flag,
wait_regular_maintain_flag
</sql>
<resultMap id="ResultMap" type="cn.com.glsx.entmicro.model.response.ScrmMagicCubeCustomerResponese"
extends="BaseResultMap">
</resultMap>
<insert id="inserts" parameterType="arraylist">
insert into scrm_magic_cube_customer(id,created_by, created_time, updated_by, updated_time, del_flag,
customer_name, customer_phone, customer_sex, customer_idcard_no, car_buying_date, recent_maintenance_date,
recent_arrival_date, effective_date_of_commercial_insurance, commercial_insurance_expiration_date, car_series,
car_model, import_type, import_flag, customer_type, wait_renewal_flag, wait_regular_maintain_flag)
values
<foreach collection="scrmMagicCubeCustomers" item="entity" separator=",">
(#{entity.id},#{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy}, #{entity.updatedTime},
#{entity.delFlag}, #{entity.customerName}, #{entity.customerPhone}, #{entity.customerSex},
#{entity.customerIdcardNo},
#{entity.carBuyingDate}, #{entity.recentMaintenanceDate}, #{entity.recentArrivalDate},
#{entity.effectiveDateOfCommercialInsurance},
#{entity.commercialInsuranceExpirationDate}, #{entity.carSeries}, #{entity.carModel}, #{entity.importType},
#{entity.importFlag},
#{entity.customerType},#{entity.waitRenewalFlag},#{entity.waitRegularMaintainFlag})
</foreach>
</insert>
<select id="selectByImportFlag" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from scrm_magic_cube_customer
where import_flag = #{importFlag} and import_type=0 and del_flag=0
</select>
<select id="selectWaitRenewalByImportFlag"
resultType="cn.com.glsx.entmicro.model.response.ScrmMagicCubeCustomerResponese">
select
<include refid="Base_Column_List"/>
from scrm_magic_cube_customer
where import_flag = #{importFlag} and wait_renewal_flag=1 and del_flag=0
</select>
<select id="selectWaitRegularMaintainByImportFlag"
resultType="cn.com.glsx.entmicro.model.response.ScrmMagicCubeCustomerResponese">
select
<include refid="Base_Column_List"/>
from scrm_magic_cube_customer
where import_flag = #{importFlag} and wait_regular_maintain_flag=1 and del_flag=0
</select>
</mapper>