123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <?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.xinxin.topro.sysservice.dao.mysqlmapper.SysCustomMenuMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.SysCustomMenu" >
- <id column="SCM_ID" property="scmId" jdbcType="INTEGER" />
- <result column="SM_ID" property="smId" jdbcType="INTEGER" />
- <result column="UI_ID" property="uiId" jdbcType="INTEGER" />
- <result column="SCM_Menu_Name" property="scmMenuName" jdbcType="VARCHAR" />
- <result column="SCM_Sort" property="scmSort" jdbcType="INTEGER" />
- <result column="SCM_Position" property="scmPosition" jdbcType="VARCHAR" />
- <result column="SCM_IsDel" property="scmIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- SCM_ID, SM_ID,UI_ID , SCM_Menu_Name, SCM_Sort, SCM_Position, SCM_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from sys_custom_menu
- where SCM_IsDel = 0 and SCM_ID = #{scmId,jdbcType=INTEGER}
- </select>
- <select id="selectBySMUuId" resultMap="BaseResultMap" parameterType="com.xinxin.topro.sysservice.request.SysCustomMenuInfoRequest" >
- select
- <include refid="Base_Column_List" />
- from sys_custom_menu
- where SCM_IsDel = 0 and SM_ID = #{smId,jdbcType=INTEGER} and UI_ID = #{uiId,jdbcType=INTEGER}
- </select>
- <select id="selectByPosition" resultType="java.lang.Integer" parameterType="com.xinxin.topro.sysservice.request.CustomMenuSearchRequest" >
- select
- MAX(SCM_Sort)
- from sys_custom_menu
- where SCM_IsDel = 0 and SCM_Position = #{position,jdbcType=VARCHAR} and UI_ID = #{uuId,jdbcType=INTEGER}
- </select>
- <select id="selectByRightUser" resultMap="BaseResultMap" parameterType="com.xinxin.topro.sysservice.request.CustomMenuSearchRequest" >
- select
- <include refid="Base_Column_List" />
- from sys_custom_menu
- where SCM_IsDel = 0 and UI_ID = #{uuId,jdbcType=INTEGER} and SCM_Position = #{position,jdbcType=VARCHAR}
- ORDER BY SCM_Sort ASC
- </select>
- <select id="selectByLeftUser" resultMap="BaseResultMap" parameterType="com.xinxin.topro.sysservice.request.CustomMenuSearchRequest" >
- select
- <include refid="Base_Column_List" />
- from sys_custom_menu
- where SCM_IsDel = 0 and UI_ID = #{uuId,jdbcType=INTEGER} and SCM_Position = #{position,jdbcType=VARCHAR}
- ORDER BY SCM_Sort ASC
- </select>
- <select id="selectByUser" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from sys_custom_menu
- where SCM_IsDel = 0 and UI_ID = #{uuId,jdbcType=INTEGER}
- ORDER BY SCM_Sort ASC
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from sys_custom_menu
- where SCM_ID = #{scmId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysCustomMenu" >
- insert into sys_custom_menu (SCM_ID, SM_ID, UI_ID,
- SCM_Menu_Name, SCM_Sort, SCM_Position,
- SCM_IsDel)
- values (#{scmId,jdbcType=INTEGER}, #{smId,jdbcType=INTEGER}, #{uiId,jdbcType=INTEGER},
- #{scmMenuName,jdbcType=VARCHAR}, #{scmSort,jdbcType=INTEGER}, #{scmPosition,jdbcType=VARCHAR},
- #{scmIsdel,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysCustomMenu" >
- insert into sys_custom_menu
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="scmId != null" >
- SCM_ID,
- </if>
- <if test="smId != null" >
- SM_ID,
- </if>
- <if test="uiId != null" >
- UI_ID,
- </if>
- <if test="scmMenuName != null" >
- SCM_Menu_Name,
- </if>
- <if test="scmSort != null" >
- SCM_Sort,
- </if>
- <if test="scmPosition != null" >
- SCM_Position,
- </if>
- <if test="scmIsdel != null" >
- SCM_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="scmId != null" >
- #{scmId,jdbcType=INTEGER},
- </if>
- <if test="smId != null" >
- #{smId,jdbcType=INTEGER},
- </if>
- <if test="uiId != null" >
- #{uiId,jdbcType=INTEGER},
- </if>
- <if test="scmMenuName != null" >
- #{scmMenuName,jdbcType=VARCHAR},
- </if>
- <if test="scmSort != null" >
- #{scmSort,jdbcType=INTEGER},
- </if>
- <if test="scmPosition != null" >
- #{scmPosition,jdbcType=VARCHAR},
- </if>
- <if test="scmIsdel != null" >
- #{scmIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysCustomMenu" >
- update sys_custom_menu
- <set >
- <if test="smId != null" >
- SM_ID = #{smId,jdbcType=INTEGER},
- </if>
- <if test="uiId != null" >
- UI_ID = #{uiId,jdbcType=INTEGER},
- </if>
- <if test="scmMenuName != null" >
- SCM_Menu_Name = #{scmMenuName,jdbcType=VARCHAR},
- </if>
- <if test="scmSort != null" >
- SCM_Sort = #{scmSort,jdbcType=INTEGER},
- </if>
- <if test="scmPosition != null" >
- SCM_Position = #{scmPosition,jdbcType=VARCHAR},
- </if>
- <if test="scmIsdel != null" >
- SCM_IsDel = #{scmIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where SCM_ID = #{scmId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysCustomMenu" >
- update sys_custom_menu
- set SCM_Menu_Name = #{scmMenuName,jdbcType=VARCHAR},
- where SCM_ID = #{scmId,jdbcType=INTEGER}
- </update>
- <update id="updateByStatus" parameterType="java.lang.Integer" >
- update sys_custom_menu
- set SCM_IsDel = -1
- where SCM_ID = #{scmId,jdbcType=INTEGER}
- </update>
- <update id="updateByScmIdStatus" parameterType="com.xinxin.topro.sysservice.request.SysCustomMenuInfoRequest" >
- update sys_custom_menu
- set SCM_IsDel = -1
- where SCM_ID = #{scmId,jdbcType=INTEGER}
- </update>
- <update id="updateList" parameterType="java.util.List">
- <foreach collection="list" item="item" index="index" separator=";">
- update sys_custom_menu
- set
- SCM_Sort = #{item.scmSort,jdbcType=INTEGER}
- where
- SCM_ID = #{item.scmId,jdbcType=INTEGER}
- </foreach>
- </update>
- <update id="updateBatchList" parameterType="java.util.List">
- <foreach collection="list" item="item" index="index" separator=";">
- update sys_custom_menu
- set
- SCM_Sort = #{item.scmSort,jdbcType=INTEGER}
- where
- SCM_ID = #{item.scmId,jdbcType=INTEGER}
- </foreach>
- </update>
- </mapper>
|