<?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.cloud.user.dao.GolDictDao">
|
|
<select id="getTeacherPact" resultType="java.util.Map">
|
|
select lable,value,revJson from sys_dict
|
WHERE delFlag = '0'
|
<if test="id != null and id != ''">
|
and id = #{id}
|
</if>
|
<if test="orgId != null and orgId != ''">
|
and orgId = #{orgId}
|
</if>
|
<if test="type != null and type != ''">
|
and type = #{type}
|
</if>
|
<if test="module != null and module != ''">
|
and module = #{module}
|
</if>
|
ORDER BY sort
|
</select>
|
|
<select id="getPeoType" resultType="java.util.Map" parameterType="map">
|
|
select id,lable,value from sys_dict
|
WHERE delFlag = '0'
|
<if test="id != null and id != ''">
|
and id = #{id}
|
</if>
|
<if test="orgId != null and orgId != ''">
|
and orgId = #{orgId}
|
</if>
|
<if test="type != null and type != ''">
|
and type = #{type}
|
</if>
|
<if test="module != null and module != ''">
|
and module = #{module}
|
</if>
|
ORDER BY sort
|
</select>
|
|
<select id="getOrgType" resultType="java.util.Map">
|
|
select id,lable,value,scope from glo_dict
|
<include refid="where" />
|
</select>
|
|
<sql id = "where">
|
WHERE delFlag = '0'
|
<if test="id != null and id != ''">
|
and id = #{id}
|
</if>
|
<if test="type != null and type != ''">
|
and type = #{type}
|
</if>
|
<if test="module != null and module != ''">
|
and module = #{module}
|
</if>
|
<if test="value != null and value != ''">
|
and ${value} < value
|
</if>
|
ORDER BY sort
|
</sql>
|
|
<select id="getGloDictsCount" resultType="Integer">
|
select
|
count(id)
|
from glo_dict
|
where delFlag = '0'
|
<if test="type != null and type != ''">
|
and type = #{type}
|
</if>
|
<if test="id != null and id != ''">
|
and id = #{id}
|
</if>
|
<if test="value != null and value != ''">
|
and value = #{value}
|
</if>
|
</select>
|
|
<select id="getGloDicts" resultType="java.util.Map">
|
select *
|
from glo_dict
|
where delFlag = '0'
|
<if test="type != null and type != ''">
|
and type = #{type}
|
</if>
|
<if test="id != null and id != ''">
|
and id = #{id}
|
</if>
|
<if test="value != null and value != ''">
|
and value = #{value}
|
</if>
|
ORDER by sort
|
<if test="start != null and length != null">
|
limit #{start},#{length}
|
</if>
|
</select>
|
|
<update id="deleteGloDicts" parameterType="Integer">
|
UPDATE glo_dict set delFlag = '1' WHERE id = #{id}
|
</update>
|
|
|
|
<resultMap id="BaseResultMap" type="com.cloud.model.sys.GloDict">
|
<id column="id" jdbcType="INTEGER" property="id" />
|
<result column="orgId" jdbcType="INTEGER" property="orgId" />
|
<result column="parentId" jdbcType="INTEGER" property="parentId" />
|
<result column="value" jdbcType="VARCHAR" property="value" />
|
<result column="lable" jdbcType="VARCHAR" property="lable" />
|
<result column="type" jdbcType="VARCHAR" property="type" />
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
<result column="sort" jdbcType="INTEGER" property="sort" />
|
<result column="scope" jdbcType="VARCHAR" property="scope" />
|
<result column="enabled" jdbcType="VARCHAR" property="enabled" />
|
<result column="revJson" jdbcType="VARCHAR" property="revJson" />
|
<result column="delFlag" jdbcType="VARCHAR" property="delFlag" />
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
</resultMap>
|
<sql id="Base_Column_List">
|
id, orgId, parentId, value, lable, type, description, sort, scope, enabled,revJson, delFlag,
|
createTime, updateTime
|
</sql>
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from glo_dict
|
where id = #{id,jdbcType=INTEGER}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
delete from glo_dict
|
where id = #{id,jdbcType=INTEGER}
|
</delete>
|
<insert id="insert" parameterType="com.cloud.model.sys.GloDict">
|
insert into glo_dict (id, orgId, parentId,
|
value, lable, type,
|
description, sort, scope,
|
enabled,revJson, delFlag,
|
createTime,updateTime)
|
values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER},
|
#{value,jdbcType=VARCHAR}, #{lable,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
#{description,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{scope,jdbcType=VARCHAR},
|
#{enabled,jdbcType=VARCHAR}, #{revJson,jdbcType=VARCHAR},#{delFlag,jdbcType=VARCHAR},
|
#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective">
|
insert into glo_dict
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
id,
|
</if>
|
<if test="orgId != null">
|
orgId,
|
</if>
|
<if test="parentId != null">
|
parentId,
|
</if>
|
<if test="value != null">
|
value,
|
</if>
|
<if test="lable != null">
|
lable,
|
</if>
|
<if test="type != null">
|
type,
|
</if>
|
<if test="description != null">
|
description,
|
</if>
|
<if test="sort != null">
|
sort,
|
</if>
|
<if test="scope != null">
|
scope,
|
</if>
|
<if test="enabled != null">
|
enabled,
|
</if>
|
<if test="revJson != null">
|
revJson,
|
</if>
|
<if test="delFlag != null">
|
delFlag,
|
</if>
|
<if test="createTime != null">
|
createTime,
|
</if>
|
<if test="updateTime != null">
|
updateTime,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
#{id,jdbcType=INTEGER},
|
</if>
|
<if test="orgId != null">
|
#{orgId,jdbcType=INTEGER},
|
</if>
|
<if test="parentId != null">
|
#{parentId,jdbcType=INTEGER},
|
</if>
|
<if test="value != null">
|
#{value,jdbcType=VARCHAR},
|
</if>
|
<if test="lable != null">
|
#{lable,jdbcType=VARCHAR},
|
</if>
|
<if test="type != null">
|
#{type,jdbcType=VARCHAR},
|
</if>
|
<if test="description != null">
|
#{description,jdbcType=VARCHAR},
|
</if>
|
<if test="sort != null">
|
#{sort,jdbcType=INTEGER},
|
</if>
|
<if test="scope != null">
|
#{scope,jdbcType=VARCHAR},
|
</if>
|
<if test="enabled != null">
|
#{enabled,jdbcType=VARCHAR},
|
</if>
|
<if test="revJson != null">
|
#{revJson,jdbcType=VARCHAR},
|
</if>
|
<if test="delFlag != null">
|
#{delFlag,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null">
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective">
|
update glo_dict
|
<set>
|
<if test="orgId != null">
|
orgId = #{orgId,jdbcType=INTEGER},
|
</if>
|
<if test="parentId != null">
|
parentId = #{parentId,jdbcType=INTEGER},
|
</if>
|
<if test="value != null">
|
value = #{value,jdbcType=VARCHAR},
|
</if>
|
<if test="lable != null">
|
lable = #{lable,jdbcType=VARCHAR},
|
</if>
|
<if test="type != null">
|
type = #{type,jdbcType=VARCHAR},
|
</if>
|
<if test="description != null">
|
description = #{description,jdbcType=VARCHAR},
|
</if>
|
<if test="sort != null">
|
sort = #{sort,jdbcType=INTEGER},
|
</if>
|
<if test="scope != null">
|
scope = #{scope,jdbcType=VARCHAR},
|
</if>
|
<if test="enabled != null">
|
enabled = #{enabled,jdbcType=VARCHAR},
|
</if>
|
<if test="revJson != null">
|
revJson = #{revJson,jdbcType=VARCHAR},
|
</if>
|
<if test="delFlag != null">
|
delFlag = #{delFlag,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
createTime = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null">
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
</set>
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.cloud.model.sys.GloDict">
|
update glo_dict
|
set orgId = #{orgId,jdbcType=INTEGER},
|
parentId = #{parentId,jdbcType=INTEGER},
|
value = #{value,jdbcType=VARCHAR},
|
lable = #{lable,jdbcType=VARCHAR},
|
type = #{type,jdbcType=VARCHAR},
|
description = #{description,jdbcType=VARCHAR},
|
sort = #{sort,jdbcType=INTEGER},
|
scope = #{scope,jdbcType=VARCHAR},
|
revJson = #{revJson,jdbcType=VARCHAR},
|
enabled = #{enabled,jdbcType=VARCHAR},
|
delFlag = #{delFlag,jdbcType=VARCHAR},
|
createTime = #{createTime,jdbcType=TIMESTAMP},
|
updateTime = #{updateTime,jdbcType=TIMESTAMP}
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
|
|
</mapper>
|