| 123456789101112131415161718192021222324252627282930313233343536 |
- <?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.SysChannelAreaRelationMapper">
- <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.po.SysChannelAreaRelation">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="gradeId" column="grade_id" jdbcType="BIGINT"/>
- <result property="areaId" column="area_id" jdbcType="BIGINT"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,grade_id,area_id
- </sql>
- <select id="queryRelationList"
- parameterType="com.ydtech.modules.admin.model.vo.SysChannelVo"
- resultType="com.ydtech.modules.admin.model.po.SysChannelAreaRelation">
- select
- a.area_id as areaId,
- b.name
- from sys_channel_area_relation as a
- left join sys_dept as b on a.area_id = b.id
- <where>
- <if test="sysChannelVo.gradeId != null ">
- and a.grade_id = #{sysChannelVo.gradeId}
- </if>
- <if test="sysChannelVo.id != null and sysChannelVo.id != '' ">
- and a.area_id = #{sysChannelVo.id}
- </if>
- <if test="sysChannelVo.name != null and sysChannelVo.name != '' ">
- and b.name like CONCAT('%', #{sysChannelVo.name}, '%')
- </if>
- </where>
- </select>
- </mapper>
|