| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <?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.hcloud.microservice.org.dao.BaseAuthorizationMapper">
- <resultMap id="BaseResultMap" type="com.hcloud.microservice.org.facade.entity.BaseAuthorization">
- <id column="guid" jdbcType="CHAR" property="guid" />
- <result column="parent_guid" jdbcType="CHAR" property="parentGuid" />
- <result column="fk_product_guid" jdbcType="CHAR" property="fkProductGuid" />
- <result column="fun_name" jdbcType="VARCHAR" property="funName" />
- <result column="auth_str" jdbcType="VARCHAR" property="authStr" />
- <result column="file_url" jdbcType="VARCHAR" property="fileUrl" />
- <result column="ico" jdbcType="VARCHAR" property="ico" />
- <result column="remark" jdbcType="VARCHAR" property="remark" />
- <result column="orderby" jdbcType="INTEGER" property="orderby" />
- <result column="node_type" jdbcType="INTEGER" property="nodeType" />
- <result column="is_forbid" jdbcType="INTEGER" property="isForbid" />
- <result column="state" jdbcType="INTEGER" property="state" />
- <result column="create_user" jdbcType="CHAR" property="createUser" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="modified_user" jdbcType="CHAR" property="modifiedUser" />
- <result column="modified_time" jdbcType="TIMESTAMP" property="modifiedTime" />
- </resultMap>
- <sql id="Base_Column_List">
- guid, parent_guid, fk_product_guid, fun_name, auth_str, file_url, ico, remark, orderby,
- node_type,is_forbid, state, create_user, create_time, modified_user, modified_time
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_base_authorization
- where guid = #{guid,jdbcType=CHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from t_base_authorization
- where guid = #{guid,jdbcType=CHAR}
- </delete>
- <insert id="insert" parameterType="com.hcloud.microservice.org.facade.entity.BaseAuthorization">
- insert into t_base_authorization (guid, parent_guid, fk_product_guid,
- fun_name, auth_str, file_url,
- ico, remark, orderby, node_type,
- is_forbid, state, create_user,
- create_time, modified_user, modified_time
- )
- values (#{guid,jdbcType=CHAR}, #{parentGuid,jdbcType=CHAR}, #{fkProductGuid,jdbcType=CHAR},
- #{funName,jdbcType=VARCHAR}, #{authStr,jdbcType=VARCHAR}, #{fileUrl,jdbcType=VARCHAR},
- #{ico,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{orderby,jdbcType=INTEGER},
- #{nodeType,jdbcType=INTEGER},#{isForbid,jdbcType=INTEGER}, #{state,jdbcType=INTEGER}, #{createUser,jdbcType=CHAR},
- #{createTime,jdbcType=TIMESTAMP}, #{modifiedUser,jdbcType=CHAR}, #{modifiedTime,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.hcloud.microservice.org.facade.entity.BaseAuthorization">
- insert into t_base_authorization
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="guid != null">
- guid,
- </if>
- <if test="parentGuid != null">
- parent_guid,
- </if>
- <if test="fkProductGuid != null">
- fk_product_guid,
- </if>
- <if test="funName != null">
- fun_name,
- </if>
- <if test="authStr != null">
- auth_str,
- </if>
- <if test="fileUrl != null">
- file_url,
- </if>
- <if test="ico != null">
- ico,
- </if>
- <if test="remark != null">
- remark,
- </if>
- <if test="orderby != null">
- orderby,
- </if>
- <if test="nodeType != null">
- node_type,
- </if>
- <if test="isForbid != null">
- is_forbid,
- </if>
- <if test="state != null">
- state,
- </if>
- <if test="createUser != null">
- create_user,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="modifiedUser != null">
- modified_user,
- </if>
- <if test="modifiedTime != null">
- modified_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="guid != null">
- #{guid,jdbcType=CHAR},
- </if>
- <if test="parentGuid != null">
- #{parentGuid,jdbcType=CHAR},
- </if>
- <if test="fkProductGuid != null">
- #{fkProductGuid,jdbcType=CHAR},
- </if>
- <if test="funName != null">
- #{funName,jdbcType=VARCHAR},
- </if>
- <if test="authStr != null">
- #{authStr,jdbcType=VARCHAR},
- </if>
- <if test="fileUrl != null">
- #{fileUrl,jdbcType=VARCHAR},
- </if>
- <if test="ico != null">
- #{ico,jdbcType=VARCHAR},
- </if>
- <if test="remark != null">
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="orderby != null">
- #{orderby,jdbcType=INTEGER},
- </if>
- <if test="nodeType != null">
- #{nodeType,jdbcType=INTEGER},
- </if>
- <if test="isForbid != null">
- #{isForbid,jdbcType=INTEGER},
- </if>
- <if test="state != null">
- #{state,jdbcType=INTEGER},
- </if>
- <if test="createUser != null">
- #{createUser,jdbcType=CHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="modifiedUser != null">
- #{modifiedUser,jdbcType=CHAR},
- </if>
- <if test="modifiedTime != null">
- #{modifiedTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.hcloud.microservice.org.facade.entity.BaseAuthorization">
- update t_base_authorization
- <set>
- <if test="parentGuid != null">
- parent_guid = #{parentGuid,jdbcType=CHAR},
- </if>
- <if test="fkProductGuid != null">
- fk_product_guid = #{fkProductGuid,jdbcType=CHAR},
- </if>
- <if test="funName != null">
- fun_name = #{funName,jdbcType=VARCHAR},
- </if>
- <if test="authStr != null">
- auth_str = #{authStr,jdbcType=VARCHAR},
- </if>
- <if test="fileUrl != null">
- file_url = #{fileUrl,jdbcType=VARCHAR},
- </if>
- <if test="ico != null">
- ico = #{ico,jdbcType=VARCHAR},
- </if>
- <if test="remark != null">
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- <if test="orderby != null">
- orderby = #{orderby,jdbcType=INTEGER},
- </if>
- <if test="nodeType != null">
- node_type=#{nodeType,jdbcType=INTEGER},
- </if>
- <if test="isForbid != null">
- is_forbid = #{isForbid,jdbcType=INTEGER},
- </if>
- <if test="state != null">
- state = #{state,jdbcType=INTEGER},
- </if>
- <if test="createUser != null">
- create_user = #{createUser,jdbcType=CHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="modifiedUser != null">
- modified_user = #{modifiedUser,jdbcType=CHAR},
- </if>
- <if test="modifiedTime != null">
- modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where guid = #{guid,jdbcType=CHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.hcloud.microservice.org.facade.entity.BaseAuthorization">
- update t_base_authorization
- set parent_guid = #{parentGuid,jdbcType=CHAR},
- fk_product_guid = #{fkProductGuid,jdbcType=CHAR},
- fun_name = #{funName,jdbcType=VARCHAR},
- auth_str = #{authStr,jdbcType=VARCHAR},
- file_url = #{fileUrl,jdbcType=VARCHAR},
- ico = #{ico,jdbcType=VARCHAR},
- remark = #{remark,jdbcType=VARCHAR},
- orderby = #{orderby,jdbcType=INTEGER},
- node_type = #{nodeType,jdbcType=INTEGER},
- is_forbid = #{isForbid,jdbcType=INTEGER},
- state = #{state,jdbcType=INTEGER},
- create_user = #{createUser,jdbcType=CHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- modified_user = #{modifiedUser,jdbcType=CHAR},
- modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
- where guid = #{guid,jdbcType=CHAR}
- </update>
- <select id="searchBaseAuthInfoByPage" parameterType="com.hcloud.microserver.commoncore.base.PageBean" resultType="com.hcloud.microservice.org.bo.BaseAuthBO">
- SELECT
- aa.guid,
- aa.fun_name AS funName,
- aa.file_url AS fileUrl,
- aa.auth_str AS authStr,
- aa.ico,
- aa.orderby,
- aa.is_forbid AS isForbid,
- aa.node_type AS nodeType,
- aa.create_time AS createTime
- FROM
- t_base_authorization aa
- <where>
- <if test="data.funName!=null and data.funName!=''">
- aa.fun_name LIKE CONCAT(#{data.funName},'%')
- </if>
- <if test="data.fileUrl!=null and data.fileUrl!=''">
- AND aa.file_url = #{data.fileUrl}
- </if>
- </where>
- </select>
- <select id="searchMenuAuthInfo" resultType="com.hcloud.microservice.org.bo.BaseAuthBO">
- SELECT
- aa.guid,
- aa.parent_guid AS parentGuid,
- aa.fun_name AS funName,
- aa.file_url AS fileUrl,
- aa.auth_str AS authStr,
- aa.ico,
- aa.orderby,
- aa.is_forbid AS isForbid,
- aa.create_time AS createTime
- FROM
- t_base_authorization aa
- WHERE
- aa.is_forbid=0
- AND aa.node_type = 0
- </select>
- <select id="searchAllBaseAuthInfo" resultType="com.hcloud.microservice.org.bo.BaseAuthBO">
- SELECT
- aa.guid,
- aa.fk_product_guid AS fkProductGuid,
- aa.parent_guid AS parentGuid,
- aa.fun_name AS funName,
- aa.file_url AS fileUrl,
- aa.auth_str AS authStr,
- aa.ico,
- aa.orderby,
- aa.is_forbid AS isForbid,
- aa.node_type AS nodeType,
- aa.create_time AS createTime
- FROM
- t_base_authorization aa
- WHERE
- aa.is_forbid=0
- </select>
- </mapper>
|