Helius
2021-06-30 02b38bb7c08d68fffc6af25e4ba00a456d96e94e
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
<?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.xzx.gc.user.mapper.PartnerConfigMapper">
  <resultMap id="BaseResultMap" type="com.xzx.gc.entity.PartnerConfig">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="partner_id" jdbcType="BIGINT" property="partnerId" />
    <result column="config_code" jdbcType="VARCHAR" property="configCode" />
    <result column="config_value" jdbcType="VARCHAR" property="configValue" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
  </resultMap>
    <select id="selectConfigByCode" resultType="java.lang.String">
        select id from xzx_partner_config where del_flag=0
        <if test="configCode != null and configCode != ''">
          AND config_code =#{configCode}
        </if>
        <if test="partnerId != null and partnerId != ''">
          AND partner_id =#{partnerId}
        </if>
        <if test="partnerId == null and partnerId == ''">
            AND partner_id is null
        </if>
        limit 1
    </select>
</mapper>