|
@@ -1,70 +0,0 @@
|
|
|
-<?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="InterfacesMapper" >
|
|
|
- <sql id="TableName">
|
|
|
- hz_interfaces
|
|
|
- </sql>
|
|
|
-
|
|
|
- <sql id="Columns">
|
|
|
- ID id,DEPT_ID deptId,INTERFACES_NAME interfacesName,INTERFACES_TYPE interfacesType,URL url,IS_USE 'use',DESCRIBES describes,ORG_ID orgId,ORDER_NUM orderNum
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="list" resultType="am.lodge.platform.model.Interfaces" >
|
|
|
- SELECT
|
|
|
- <include refid="Columns"/>
|
|
|
- FROM
|
|
|
- <include refid="TableName"/>
|
|
|
- <where>
|
|
|
- <if test="id !=null">and id=#{id} </if>
|
|
|
- <if test="deptId !=null">and DEPT_ID=#{deptId} </if>
|
|
|
- <if test="interfacesName != null">and INTERFACES_NAME like CONCAT('%',#{interfacesName},'%') </if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="checkForName" resultType="int" parameterType="am.lodge.platform.model.Interfaces">
|
|
|
- SELECT
|
|
|
- COUNT(0)
|
|
|
- FROM
|
|
|
- <include refid="TableName"/>
|
|
|
- <where>
|
|
|
- <if test="id != null"> id<![CDATA[!= ]]>#{id} </if>
|
|
|
- <if test="interfacesName != null">AND INTERFACES_NAME=#{interfacesName}</if>
|
|
|
- <if test="orgId != null">AND ORG_ID=#{orgId}</if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="listForPage" resultType="am.lodge.platform.model.Interfaces" >
|
|
|
- SELECT
|
|
|
- A.ID id,A.DEPT_ID deptId,A.INTERFACES_NAME interfacesName,A.INTERFACES_TYPE interfacesType,A.URL url,A.IS_USE 'use',
|
|
|
- A.DESCRIBES describes,A.ORG_ID orgId,A.ORDER_NUM orderNum
|
|
|
- FROM
|
|
|
- hz_interfaces A
|
|
|
- <where>
|
|
|
- <if test="id !=null">AND A.ID=#{id} </if>
|
|
|
- <if test="deptId !=null">AND A.DEPT_ID=#{deptId} </if>
|
|
|
- <if test="interfacesName != null">AND A.INTERFACES_NAME like CONCAT('%',#{interfacesName},'%') </if>
|
|
|
- <if test="use !=null">AND A.IS_USE=#{use} </if>
|
|
|
- <if test="orgId != null">AND A.ORG_ID=#{orgId}</if>
|
|
|
- </where>
|
|
|
- ORDER BY A.ORDER_NUM
|
|
|
- </select>
|
|
|
-
|
|
|
- <delete id="deleteByTypeId">
|
|
|
- DELETE FROM
|
|
|
- <include refid="TableName"/>
|
|
|
- WHERE
|
|
|
- DEPT_ID IN
|
|
|
- <foreach collection="deptId.split(',')" index="index" item="deptId" open="(" separator="," close=")">
|
|
|
- #{deptId}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="deleteTypeId">
|
|
|
- DELETE FROM
|
|
|
- <include refid="TableName"/>
|
|
|
- WHERE
|
|
|
- DEPT_ID=#{deptId}
|
|
|
- </delete>
|
|
|
-
|
|
|
-
|
|
|
-</mapper>
|