ScrmMagicCubeCustomerCountMapper.xml
3.38 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
<?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.ScrmMagicCubeCustomerCountMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.magic.ScrmMagicCubeCustomerCount">
<!--
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="entmicro_number" jdbcType="INTEGER" property="entmicroNumber" />
<result column="wait_add_entmicro_number" jdbcType="INTEGER" property="waitAddEntmicroNumber" />
<result column="wait_add_entmicro_total" jdbcType="INTEGER" property="waitAddEntmicroTotal" />
<result column="new_customer_number" jdbcType="INTEGER" property="newCustomerNumber" />
<result column="import_number" jdbcType="INTEGER" property="importNumber" />
<result column="total_number" jdbcType="INTEGER" property="totalNumber" />
<result column="wait_renewal_number" jdbcType="INTEGER" property="waitRenewalNumber" />
<result column="wait_total" jdbcType="INTEGER" property="waitTotal" />
<result column="wait_regular_maintain_number" jdbcType="INTEGER" property="waitRegularMaintainNumber" />
<result column="wait_regular_maintain_total" jdbcType="INTEGER" property="waitRegularMaintainTotal" />
<result column="import_flag" jdbcType="VARCHAR" property="importFlag" />
<result column="import_staff_name" jdbcType="VARCHAR" property="importStaffName" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="total_entmicro_number" jdbcType="INTEGER" property="totalEntmicroNumber" />
<result column="total_magic_cube_number" jdbcType="INTEGER" property="totalMagicCubeNumber" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, created_by, created_time, updated_by, updated_time, del_flag, entmicro_number,
wait_add_entmicro_number, wait_add_entmicro_total, new_customer_number, import_number,
total_number, wait_renewal_number, wait_total, wait_regular_maintain_number, wait_regular_maintain_total,
import_flag, import_staff_name, merchant_id, total_entmicro_number, total_magic_cube_number
</sql>
<resultMap id="ResultMap" type="cn.com.glsx.entmicro.model.response.ScrmMagicCubeCustomerCountResponse"
extends="BaseResultMap">
</resultMap>
<select id="selectByCondition" resultMap="ResultMap">
select <include refid="Base_Column_List" /> from scrm_magic_cube_customer_count
where 1=1
<if test="condition.startTime != null and condition.endTime != null ">
and created_time between #{condition.startTime} and #{condition.endTime}
</if>
<if test="condition.merchantId !=null">
and merchant_id = #{condition.merchantId}
</if>
order by created_time desc
</select>
<select id="selectById" resultMap="ResultMap">
select <include refid="Base_Column_List" /> from scrm_magic_cube_customer_count
where id=#{id}
</select>
</mapper>