WechatMenuConfigMapper.xml 2.43 KB
<?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="cn.com.glsx.dj.wechat.mapper.WechatMenuConfigMapper" >
  <resultMap id="BaseResultMap" type="cn.com.glsx.dj.wechat.model.WechatMenuConfig" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="wechat_appid" property="wechatAppid" jdbcType="VARCHAR" />
    <result column="type" property="type" jdbcType="VARCHAR" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="menu_key" property="menuKey" jdbcType="VARCHAR" />
    <result column="url" property="url" jdbcType="VARCHAR" />
    <result column="appid" property="appid" jdbcType="VARCHAR" />
    <result column="parent_id" property="parentId"/>
    <result column="order_no" property="orderNo"/>
    <result column="pagepath" property="pagepath" jdbcType="VARCHAR" />
    <result column="created_by" property="createdBy" jdbcType="VARCHAR" />
    <result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
    <result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
    <result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
    <result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
  </resultMap>
  <resultMap id="DTOResultMap" type="cn.com.glsx.dj.wechat.dto.WechatMenuConfigDTO" extends="BaseResultMap"></resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, wechat_appid, type, name, menu_key, url, appid, pagepath,parent_id,order_no, created_by, created_date, 
    updated_by, updated_date, deleted_flag
  </sql>
  <select id="list" parameterType="cn.com.glsx.dj.wechat.dto.WechatMenuConfigDTO" resultMap="DTOResultMap">
  	select id, wechat_appid, type, name, menu_key, url, appid, pagepath,parent_id,order_no,updated_by, updated_date
    from dj_wechat_menu_config
    <where>
    	deleted_flag ='N'
    	<if test="wechatAppid != null and wechatAppid !=''">
    		and wechat_appid = #{wechatAppid}
    	</if>
    	<if test="type != null and type !=''">
    		and type = #{type}
    	</if>
    	<if test="name != null and name !=''">
    		and name like CONCAT('%',#{name},'%')
    	</if>
    	<if test="parentId != null">
    		and parent_id = #{parentId}
    	</if>
    </where>
    order by order_no desc,id desc
  </select>
</mapper>