SysChannelGroupMapper.xml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ydtech.modules.admin.dao.SysChannelGroupMapper">
  6. <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.po.SysChannelGroup">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="name" column="name" jdbcType="VARCHAR"/>
  9. <result property="enabled" column="enabled" jdbcType="INTEGER"/>
  10. <result property="remark" column="remark" jdbcType="VARCHAR"/>
  11. <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
  12. <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
  13. <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
  14. <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
  15. <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
  16. <result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
  17. </resultMap>
  18. <sql id="Base_Column_List">
  19. id,name,remark,
  20. create_by,create_time,update_by,
  21. update_time
  22. </sql>
  23. <select id="getProductList" resultType="com.ydtech.modules.admin.model.po.SysChannelGroup">
  24. SELECT
  25. b.id,
  26. b.costs_description as costsDescription,
  27. c.agreement_name as agreementName
  28. FROM sys_channel_cost_relation AS a
  29. LEFT JOIN ptl_agreement_product_costs_new AS b on a.cost_id = b.id
  30. LEFT JOIN ptl_agreement as c on b.agreement_id = c.id
  31. <where>
  32. <if test="id != null">
  33. a.channel_id = #{id}
  34. </if>
  35. </where>
  36. ORDER BY c.insurance_company_id, b.agreement_id DESC
  37. </select>
  38. </mapper>