| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?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.ydtech.modules.admin.dao.SysChannelGroupInfoMapper">
- <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.po.SysChannelGroupInfo">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="channelId" column="channel_id" jdbcType="BIGINT"/>
- <result property="gradeId" column="grade_id" jdbcType="BIGINT"/>
- <result property="gradeName" column="grade_name" jdbcType="VARCHAR"/>
- <result property="jqCostsProportion" column="jq_costs_proportion" jdbcType="VARCHAR"/>
- <result property="syCostsProportion" column="sy_costs_proportion" jdbcType="VARCHAR"/>
- <result property="noCostsProportion" column="no_costs_proportion" jdbcType="VARCHAR"/>
- <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
- <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
- <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
- </resultMap>
- <sql id="Base_Column_List">
- a.id,a.channel_id,a.grade_id,a.grade_name,a.jq_costs_proportion,
- a.sy_costs_proportion,a.no_costs_proportion,a.create_by,
- a.create_time,a.update_by,a.update_time
- </sql>
- <select id="queryProportion" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM
- sys_channel_group_info a
- WHERE
- a.channel_id = (
- SELECT b.channel_id
- FROM sys_channel_cost_relation b
- WHERE b.cost_id = #{productId}
- )
- AND
- a.grade_id = (
- SELECT c.grade_id
- FROM sys_channel_area_relation c
- WHERE c.area_id = #{deptId}
- )
- </select>
- </mapper>
|