后台服务
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

61 строка
2.3 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.iformall.mapper.SellerAgentAccountMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.SellerAgentAccount">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="seller_agent_id" jdbcType="VARCHAR" property="sellerAgentId"/>
  7. <result column="merchant_u_id" jdbcType="VARCHAR" property="merchantUId" />
  8. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  9. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  10. <result column="plat" jdbcType="VARCHAR" property="plat"/>
  11. </resultMap>
  12. <sql id="allColumns">
  13. `id`, `seller_agent_id`, `merchant_u_id`, `create_time`, `update_time`, `plat`
  14. </sql>
  15. <sql id="dynamicWhereConditions">
  16. where 1 = 1
  17. <if test=" null != id ">
  18. and `id` = #{id}
  19. </if>
  20. <if test=" null != sellerAgentId ">
  21. and `seller_agent_id` = #{sellerAgentId}
  22. </if>
  23. <if test=" null != plat ">
  24. and `plat` = #{plat}
  25. </if>
  26. <if test=" null != ids ">
  27. and `id` in
  28. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  29. #{idItem}
  30. </foreach>
  31. </if>
  32. </sql>
  33. <select id="findList" parameterType="com.iformall.domain.po.SellerAgentAccount" resultMap="BaseResultMap">
  34. select
  35. <include refid="allColumns"/>
  36. from seller_agent_account
  37. <include refid="dynamicWhereConditions"/>
  38. <if test=" null != sortColumns">order by ${sortColumns}</if>
  39. </select>
  40. <select id="getById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  41. select <include refid="allColumns"/> from seller_agent_account where `id` = #{id}
  42. </select>
  43. <delete id="deleteById" parameterType="java.util.HashMap" >
  44. delete from seller_agent_account where `id` = #{id}
  45. </delete>
  46. <delete id="deleteByAgentId" parameterType="java.util.HashMap" >
  47. delete from seller_agent_account where `seller_agent_id` = #{agentId}
  48. </delete>
  49. </mapper>