MerchantDictDataMapper.xml
4.5 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
<?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.merchants.mapper.MerchantDictDataMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.merchants.entity.MerchantDictData">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="dict_sort" jdbcType="INTEGER" property="dictSort"/>
<result column="dict_label" jdbcType="VARCHAR" property="dictLabel"/>
<result column="dict_value" jdbcType="VARCHAR" property="dictValue"/>
<result column="dict_type" jdbcType="VARCHAR" property="dictType"/>
<result column="is_default" jdbcType="CHAR" property="isDefault"/>
<result column="enable_status" jdbcType="INTEGER" property="enableStatus"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
<result column="created_by" jdbcType="INTEGER" property="createdBy"/>
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate"/>
<result column="updated_by" jdbcType="INTEGER" property="updatedBy"/>
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate"/>
</resultMap>
<resultMap id="resultMap" type="cn.com.glsx.merchants.model.response.MerchantDictDataResponse">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="dict_sort" jdbcType="INTEGER" property="dictSort"/>
<result column="dict_label" jdbcType="VARCHAR" property="dictLabel"/>
<result column="dict_value" jdbcType="VARCHAR" property="dictValue"/>
<result column="dict_type" jdbcType="VARCHAR" property="dictType"/>
<result column="is_default" jdbcType="CHAR" property="isDefault"/>
<result column="enable_status" jdbcType="INTEGER" property="enableStatus"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
<result column="created_by" jdbcType="INTEGER" property="createdBy"/>
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate"/>
<result column="updated_by" jdbcType="INTEGER" property="updatedBy"/>
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate"/>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, dict_sort, dict_label, dict_value, dict_type, is_default, enable_status, remark,
del_flag, created_by, created_date, updated_by, updated_date, product_type
</sql>
<select id="findDictData" parameterType="cn.com.glsx.merchants.entity.MerchantDictData" resultMap="BaseResultMap">
SELECT * FROM platform_merchant_dict_data WHERE dict_value=#{merchantDictData.dictValue} and del_flag = 0
</select>
<select id="findMerchantDictData" parameterType="cn.com.glsx.merchants.model.request.MerchantDictDataRequest"
resultMap="resultMap">
select * from platform_merchant_dict_data
<where>
<if test="condition.dictLabel != null and condition.dictLabel != ''">
dict_label = #{condition.dictLabel}
</if>
<if test="condition.dictType != null and condition.dictType !=''">
and dict_type = #{condition.dictType}
</if>
<if test="condition.enableStatus != null and condition.enableStatus !=''">
and enable_status = #{condition.enableStatus}
</if>
</where>
</select>
<select id="findAllDictData" parameterType="cn.com.glsx.merchants.model.request.MerchantDictDataRequest"
resultMap="resultMap">
select * from platform_merchant_dict_data where del_flag=0 and enable_status=1
<if test="merchantDictDataRequest.dictType != null and merchantDictDataRequest.dictType != ''">
and dict_type=#{merchantDictDataRequest.dictType}
</if>
</select>
<select id="findByDictTypeAndDictValId" resultMap="resultMap">
select * from platform_merchant_dict_data
where del_flag = 0 and enable_status = 1
<if test="dictType != null and dictType != ''">
and dict_type = #{dictType}
</if>
<if test="dictValId != null">
and dict_value = #{dictValId}
</if>
</select>
</mapper>