<?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.jeeplus.test.wdt.merchantCompany.mapper.SettledPlatformMapper">


    <sql id="merchantSettledPlatformColumns">
		a.id AS "id",
		a.create_by_id AS "createBy.id",
		a.create_time AS "createTime",
		a.update_by_id AS "updateBy.id",
		a.update_time AS "updateTime",
		a.del_flag AS "delFlag",
		a.remarks AS "remarks",
        a.name AS "name",
        a.sort AS "sort"
	</sql>

    <sql id="merchantSettledPlatformJoins">
		LEFT JOIN sys_user user ON user.id = a.create_by_id
	</sql>



    <select id="findById" resultType="com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO">
        SELECT
        <include refid="merchantSettledPlatformColumns"/>
        FROM merchant_settled_platform a
        <include refid="merchantSettledPlatformJoins"/>
        WHERE a.id = #{id} and a.del_flag = 0
    </select>

    <select id="findList" resultType="com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO">
        SELECT
        <include refid="merchantSettledPlatformColumns"/>
        FROM merchant_settled_platform a
        <include refid="merchantSettledPlatformJoins"/>
        ${ew.customSqlSegment}
    </select>

</mapper>
