|
- <?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.iformall.mapper.WxAuthorizerInfoMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxAuthorizerInfo">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="authorizer_appid" jdbcType="VARCHAR" property="authorizerAppid" />
- <result column="head_img" jdbcType="VARCHAR" property="headImg" />
- <result column="alias" jdbcType="VARCHAR" property="alias" />
- <result column="qrcode_url" jdbcType="VARCHAR" property="qrcodeUrl" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="authorization_status" jdbcType="INTEGER" property="authorizationStatus" />
- <result column="auth_time" jdbcType="TIMESTAMP" property="authTime" />
- <result column="current_version" jdbcType="VARCHAR" property="currentVersion" />
- <result column="current_desc" jdbcType="VARCHAR" property="currentDesc" />
- <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`authorizer_appid`,`head_img`,`alias`,`qrcode_url`,`create_time`,`authorization_status`,`auth_time`,`current_version`,`current_desc`,`release_time`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
- <if test=" null != id ">
- and `id` = #{id}
- </if>
- <if test=" null != authorizerAppid ">
- and `authorizer_appid` = #{authorizerAppid}
- </if>
- <if test=" null != headImg ">
- and `head_img` like concat('%', #{headImg},'%')
- </if>
- <if test=" null != alias ">
- and `alias` like concat('%', #{alias},'%')
- </if>
- <if test=" null != qrcodeUrl ">
- and `qrcode_url` like concat('%', #{qrcodeUrl},'%')
- </if>
- <if test=" null != createTime ">
- and `create_time` = #{createTime}
- </if>
- <if test=" null != updateTime ">
- and `update_time` = #{updateTime}
- </if>
- <if test=" null != authorizationStatus ">
- and `authorization_status` = #{authorizationStatus}
- </if>
- <if test=" null != authTime ">
- and `auth_time` = #{authTime}
- </if>
- <if test=" null != currentVersion ">
- and `current_version` = #{currentVersion}
- </if>
- <if test=" null != currentDesc ">
- and `current_desc` like concat('%', #{currentDesc},'%')
- </if>
- <if test=" null != releaseTime ">
- and `release_time` = #{releaseTime}
- </if>
- <if test=" null != ids ">
- and id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- <if test=" null != sortColumns"> order by ${sortColumns} </if>
- </sql>
-
- <select id="findList" parameterType="com.iformall.domain.po.WxAuthorizerInfo" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_authorizer_info
- <include refid="dynamicWhereConditions" />
- </select>
-
-
- <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappInfo">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="authorizer_appid" jdbcType="VARCHAR" property="authorizerAppid" />
- <result column="head_img" jdbcType="VARCHAR" property="headImg" />
- <result column="alias" jdbcType="VARCHAR" property="alias" />
- <result column="qrcode_url" jdbcType="VARCHAR" property="qrcodeUrl" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="authorization_status" jdbcType="INTEGER" property="authorizationStatus" />
- <result column="auth_time" jdbcType="TIMESTAMP" property="authTime" />
- <result column="current_version" jdbcType="VARCHAR" property="currentVersion" />
- <result column="current_desc" jdbcType="VARCHAR" property="currentDesc" />
- <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
- <result column="type" jdbcType="INTEGER" property="type" />
- <result column="name" jdbcType="TIMESTAMP" property="name" />
- </resultMap>
-
- <sql id="allVColumns">
- ai.`id`,ai.`authorizer_appid`,ai.`head_img`,ai.`alias`,ai.`qrcode_url`,ai.`create_time`,ai.`update_time`,
- ai.`authorization_status`,ai.`auth_time`,
- ai.`current_version`,ai.`current_desc`,ai.`release_time`,
- a.`type`,a.`name`
- </sql>
-
- <sql id="dynamicVWhereConditions">
- where 1 = 1
- <if test=" null != id ">
- and ai.`id` = #{id}
- </if>
- <if test=" null != name ">
- and a.`name` like concat('%', #{name},'%')
- </if>
- <if test=" null != authorizerAppid ">
- and ai.`authorizer_appid` = #{authorizerAppid}
- </if>
- <if test=" null != type ">
- and a.`type` = #{type}
- </if>
- <if test=" null != currentVersion ">
- and ai.`current_version` = #{currentVersion}
- </if>
- <if test=" null != ids ">
- and ai.id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- <if test=" null != sortColumns"> order by ${sortColumns} </if>
- </sql>
-
- <select id="findVoList" parameterType="com.iformall.domain.vo.WxWeappInfo" resultMap="VBaseResultMap">
- select <include refid="allVColumns" />
- from wx_authorizer_info ai
- left join wx_appinfo a on ai.`authorizer_appid` = a.app_id
- <include refid="dynamicVWhereConditions" />
- </select>
-
-
-
-
-
-
- </mapper>
|