|
- <?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.iformall.mapper.SellerAgentAccountMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.SellerAgentAccount">
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="seller_agent_id" jdbcType="VARCHAR" property="sellerAgentId"/>
- <result column="merchant_u_id" jdbcType="VARCHAR" property="merchantUId" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
- <result column="plat" jdbcType="VARCHAR" property="plat"/>
- </resultMap>
-
-
- <sql id="allColumns">
- `id`, `seller_agent_id`, `merchant_u_id`, `create_time`, `update_time`, `plat`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
- </if>
-
- <if test=" null != sellerAgentId ">
- and `seller_agent_id` = #{sellerAgentId}
- </if>
-
- <if test=" null != plat ">
- and `plat` = #{plat}
- </if>
-
- <if test=" null != ids ">
- and `id` in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- </sql>
-
- <select id="findList" parameterType="com.iformall.domain.po.SellerAgentAccount" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from seller_agent_account
- <include refid="dynamicWhereConditions"/>
- <if test=" null != sortColumns">order by ${sortColumns}</if>
- </select>
-
- <select id="getById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- select <include refid="allColumns"/> from seller_agent_account where `id` = #{id}
- </select>
-
- <delete id="deleteById" parameterType="java.util.HashMap" >
- delete from seller_agent_account where `id` = #{id}
- </delete>
-
- <delete id="deleteByAgentId" parameterType="java.util.HashMap" >
- delete from seller_agent_account where `seller_agent_id` = #{agentId}
- </delete>
- </mapper>
|