Commit 1f70c95f authored by ZWT's avatar ZWT

得到的

parent 96ea2301
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<result column="LEV" property="lev"/> <result column="LEV" property="lev"/>
<result column="CITY_CODE" property="cityCode"/> <result column="CITY_CODE" property="cityCode"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID ID
, ,
...@@ -16,27 +17,29 @@ ...@@ -16,27 +17,29 @@
LEV, LEV,
CITY_CODE CITY_CODE
</sql> </sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from SYS_AREA FROM SYS_AREA
where WHERE
id=#{id} ID=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from SYS_AREA FROM SYS_AREA
where WHERE
id=#{id} ID=#{id}
</select> </select>
<select id="selectListAll" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap"> <select id="selectListAll" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from SYS_AREA FROM SYS_AREA
WHERE WHERE
id &lt;&gt; 120 ID &lt;&gt; 120
ORDER BY ORDER BY
PARENT_ID, PARENT_ID,
id id
...@@ -77,8 +80,8 @@ ...@@ -77,8 +80,8 @@
</select> </select>
<resultMap id="ExtResultMap" type="pps.core.system.entity.SysAreaView" extends="BaseResultMap"> <resultMap id="ExtResultMap" type="pps.core.system.entity.SysAreaView" extends="BaseResultMap">
<result column="PROVINCE" property="province" /> <result column="PROVINCE" property="province"/>
<result column="CITY" property="city" /> <result column="CITY" property="city"/>
</resultMap> </resultMap>
<select id="selectProvinceAndCity" parameterType="list" resultMap="ExtResultMap"> <select id="selectProvinceAndCity" parameterType="list" resultMap="ExtResultMap">
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<result column="MODIFY_BY_NAME" property="modifyByName"/> <result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime"/> <result column="MODIFY_TIME" property="modifyTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID ID
, ,
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
MODIFY_BY_NAME, MODIFY_BY_NAME,
MODIFY_TIME MODIFY_TIME
</sql> </sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -37,6 +39,7 @@ ...@@ -37,6 +39,7 @@
WHERE WHERE
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap">
SELECT C.ID,C.OU_ID,C.MENU_ID,A.OU_NAME,B.MENU_NAME,C.CREATE_BY_NAME,C.CREATE_TIME SELECT C.ID,C.OU_ID,C.MENU_ID,A.OU_NAME,B.MENU_NAME,C.CREATE_BY_NAME,C.CREATE_TIME
FROM SYS_ORGANIZATION A ,SYS_MENU B,SYS_AUTH_OU_SCOPE C FROM SYS_ORGANIZATION A ,SYS_MENU B,SYS_AUTH_OU_SCOPE C
...@@ -47,6 +50,7 @@ ...@@ -47,6 +50,7 @@
</if> </if>
ORDER BY A.OU_NAME ASC ,C.CREATE_TIME DESC ORDER BY A.OU_NAME ASC ,C.CREATE_TIME DESC
</select> </select>
<select id="selectListByUserGroupId" parameterType="pps.core.system.entity.SysAuthOuScopeView" <select id="selectListByUserGroupId" parameterType="pps.core.system.entity.SysAuthOuScopeView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT SELECT
...@@ -68,6 +72,7 @@ ...@@ -68,6 +72,7 @@
AND SAU.USER_GROUP_ID =#{userGroupId} AND SAU.USER_GROUP_ID =#{userGroupId}
</if> </if>
</select> </select>
<select id="selectOuIdsByUserId" parameterType="pps.core.system.entity.SysAuthOuScopeView" <select id="selectOuIdsByUserId" parameterType="pps.core.system.entity.SysAuthOuScopeView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT OU_ID, OU_NAME SELECT OU_ID, OU_NAME
...@@ -99,6 +104,7 @@ ...@@ -99,6 +104,7 @@
LEFT JOIN SYS_ORGANIZATION SO ON SAOS.OU_ID=SO.ID AND SO.IS_DELETED =1 LEFT JOIN SYS_ORGANIZATION SO ON SAOS.OU_ID=SO.ID AND SO.IS_DELETED =1
) )
</select> </select>
<select id="selectOuMediaTypeByUserId" parameterType="pps.core.system.entity.SysAuthOuScopeView" <select id="selectOuMediaTypeByUserId" parameterType="pps.core.system.entity.SysAuthOuScopeView"
resultType="pps.core.system.entity.SysAuthOuScopeView"> resultType="pps.core.system.entity.SysAuthOuScopeView">
SELECT 'GAS' AS MEDIA_TYPE SELECT 'GAS' AS MEDIA_TYPE
......
...@@ -2,28 +2,29 @@ ...@@ -2,28 +2,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysDictionaryViewMapper"> <mapper namespace="pps.core.system.mapper.SysDictionaryViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysDictionaryView"> <resultMap id="BaseResultMap" type="pps.core.system.entity.SysDictionaryView">
<id column="ID" property="id" /> <id column="ID" property="id"/>
<result column="PID" property="pid" /> <result column="PID" property="pid"/>
<result column="DIC_NAME" property="dicName" /> <result column="DIC_NAME" property="dicName"/>
<result column="SHORT_NAME" property="shortName" /> <result column="SHORT_NAME" property="shortName"/>
<result column="REMARK" property="remark" /> <result column="REMARK" property="remark"/>
<result column="SORT" property="sort" /> <result column="SORT" property="sort"/>
<result column="LEVELS" property="levels" /> <result column="LEVELS" property="levels"/>
<result column="BE_DEFAULT" property="beDefault" /> <result column="BE_DEFAULT" property="beDefault"/>
<result column="BE_HAS_CHILDREN" property="beHasChildren" /> <result column="BE_HAS_CHILDREN" property="beHasChildren"/>
<result column="DIC_TYPE" property="dicType" /> <result column="DIC_TYPE" property="dicType"/>
<result column="EFFECT_TIME" property="effectTime" /> <result column="EFFECT_TIME" property="effectTime"/>
<result column="END_TIME" property="endTime" /> <result column="END_TIME" property="endTime"/>
<result column="CREATE_NAME" property="createName" /> <result column="CREATE_NAME" property="createName"/>
<result column="CREATE_TIME" property="createTime" /> <result column="CREATE_TIME" property="createTime"/>
<result column="MODIFY_NAME" property="modifyName" /> <result column="MODIFY_NAME" property="modifyName"/>
<result column="MODIFY_TIME" property="modifyTime" /> <result column="MODIFY_TIME" property="modifyTime"/>
<result column="ALIAS" property="alias" /> <result column="ALIAS" property="alias"/>
<result column="DIC_KEY" property="dicKey" /> <result column="DIC_KEY" property="dicKey"/>
<result column="DIC_PATH" property="dicPath" /> <result column="DIC_PATH" property="dicPath"/>
<result column="USE_LOWER_LEVEL" property="useLowerLevel" /> <result column="USE_LOWER_LEVEL" property="useLowerLevel"/>
<result column="OU_NAME" property="ouName" /> <result column="OU_NAME" property="ouName"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID ID
, ,
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
DIC_PATH, DIC_PATH,
DIC_KEY DIC_KEY
</sql> </sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -53,6 +55,7 @@ ...@@ -53,6 +55,7 @@
WHERE WHERE
ID=#{id} ID=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -60,6 +63,7 @@ ...@@ -60,6 +63,7 @@
WHERE WHERE
ID=#{id} ID=#{id}
</select> </select>
<select id="selectListsByParentIds" parameterType="pps.core.system.entity.SysDictionaryView" <select id="selectListsByParentIds" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT SELECT
...@@ -74,6 +78,7 @@ ...@@ -74,6 +78,7 @@
</if> </if>
ORDER BY SORT ORDER BY SORT
</select> </select>
<select id="selectListsByParentCodes" parameterType="pps.core.system.entity.SysDictionaryView" <select id="selectListsByParentCodes" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT SELECT
...@@ -89,6 +94,7 @@ ...@@ -89,6 +94,7 @@
</where> </where>
ORDER BY CREATE_TIME DESC ORDER BY CREATE_TIME DESC
</select> </select>
<select id="selectListsByAlias" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap"> <select id="selectListsByAlias" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -103,6 +109,7 @@ ...@@ -103,6 +109,7 @@
) )
ORDER BY CREATE_TIME DESC ORDER BY CREATE_TIME DESC
</select> </select>
<select id="selectListsByByDicKeys" parameterType="pps.core.system.entity.SysDictionaryView" <select id="selectListsByByDicKeys" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT SELECT
...@@ -126,6 +133,7 @@ ...@@ -126,6 +133,7 @@
</where> </where>
ORDER BY CREATE_TIME DESC ORDER BY CREATE_TIME DESC
</select> </select>
<select id="selectSysDictionaryTree" resultType="pps.core.system.entity.SysDictionaryView"> <select id="selectSysDictionaryTree" resultType="pps.core.system.entity.SysDictionaryView">
SELECT DISTINCT SD.ID, SD.PID, SD.DIC_NAME, SD.SORT SELECT DISTINCT SD.ID, SD.PID, SD.DIC_NAME, SD.SORT
FROM SYS_DICTIONARY SD FROM SYS_DICTIONARY SD
...@@ -199,6 +207,7 @@ ...@@ -199,6 +207,7 @@
LEFT JOIN SYS_ORGANIZATION_DICTIONARY AASD ON A.OU_ID = AASD.OU_ID AND A.ID=AASD.DIC_CODE LEFT JOIN SYS_ORGANIZATION_DICTIONARY AASD ON A.OU_ID = AASD.OU_ID AND A.ID=AASD.DIC_CODE
WHERE AASD.END_TIME >NOW() WHERE AASD.END_TIME >NOW()
</select> </select>
<select id="selectListByConditionByPage" parameterType="pps.core.system.entity.SysDictionaryView" <select id="selectListByConditionByPage" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT A.OU_NAME,A.OU_ID,A.ID,A.ID AS DIC_CODE,ASD.PID AS SELECT A.OU_NAME,A.OU_ID,A.ID,A.ID AS DIC_CODE,ASD.PID AS
...@@ -219,6 +228,7 @@ ...@@ -219,6 +228,7 @@
ORDER BY ASD.EFFECT_TIME DESC ORDER BY ASD.EFFECT_TIME DESC
LIMIT #{startRow},#{endRow} LIMIT #{startRow},#{endRow}
</select> </select>
<select id="selectListByConditionByCount" parameterType="pps.core.system.entity.SysDictionaryView" <select id="selectListByConditionByCount" parameterType="pps.core.system.entity.SysDictionaryView"
resultType="java.lang.Integer"> resultType="java.lang.Integer">
SELECT COUNT(0) FROM ( SELECT COUNT(0) FROM (
...@@ -235,6 +245,7 @@ ...@@ -235,6 +245,7 @@
AND SOD.OU_ID=#{ouId} AND SOD.OU_ID=#{ouId}
</if>)A </if>)A
</select> </select>
<select id="selectChildListByCondition" parameterType="pps.core.system.entity.SysDictionaryView" <select id="selectChildListByCondition" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT A.OU_NAME, SELECT A.OU_NAME,
...@@ -261,6 +272,7 @@ ...@@ -261,6 +272,7 @@
AND SOD.DIC_CODE IS NOT NULL) A AND SOD.DIC_CODE IS NOT NULL) A
LEFT JOIN SYS_DICTIONARY ASD ON ASD.ID = A.ID LEFT JOIN SYS_DICTIONARY ASD ON ASD.ID = A.ID
</select> </select>
<select id="selectListByEquipmentType" parameterType="pps.core.system.entity.SysDictionaryView" <select id="selectListByEquipmentType" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
WITH RECURSIVE TEMPS AS WITH RECURSIVE TEMPS AS
......
...@@ -2,19 +2,20 @@ ...@@ -2,19 +2,20 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysOrganizationDictionaryViewMapper"> <mapper namespace="pps.core.system.mapper.SysOrganizationDictionaryViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysOrganizationDictionaryView"> <resultMap id="BaseResultMap" type="pps.core.system.entity.SysOrganizationDictionaryView">
<id column="ID" property="id" /> <id column="ID" property="id"/>
<result column="OU_ID" property="ouId" /> <result column="OU_ID" property="ouId"/>
<result column="PARENT_DIC_CODE" property="parentDicCode" /> <result column="PARENT_DIC_CODE" property="parentDicCode"/>
<result column="DIC_CODE" property="dicCode" /> <result column="DIC_CODE" property="dicCode"/>
<result column="EFFECT_TIME" property="effectTime" /> <result column="EFFECT_TIME" property="effectTime"/>
<result column="END_TIME" property="endTime" /> <result column="END_TIME" property="endTime"/>
<result column="CREATE_BY_ID" property="createById" /> <result column="CREATE_BY_ID" property="createById"/>
<result column="CREATE_BY_NAME" property="createByName" /> <result column="CREATE_BY_NAME" property="createByName"/>
<result column="CREATE_TIME" property="createTime" /> <result column="CREATE_TIME" property="createTime"/>
<result column="MODIFY_BY_ID" property="modifyById" /> <result column="MODIFY_BY_ID" property="modifyById"/>
<result column="MODIFY_BY_NAME" property="modifyByName" /> <result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime" /> <result column="MODIFY_TIME" property="modifyTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID ID
, ,
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
MODIFY_BY_NAME, MODIFY_BY_NAME,
MODIFY_TIME MODIFY_TIME
</sql> </sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationDictionaryView" <select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT SELECT
...@@ -38,6 +40,7 @@ ...@@ -38,6 +40,7 @@
WHERE WHERE
ID=#{id} ID=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysOrganizationDictionaryView" <select id="selectList" parameterType="pps.core.system.entity.SysOrganizationDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT SELECT
...@@ -46,6 +49,7 @@ ...@@ -46,6 +49,7 @@
WHERE WHERE
ID=#{id} ID=#{id}
</select> </select>
<select id="selectListByOuId" parameterType="pps.core.system.entity.SysOrganizationDictionaryView" <select id="selectListByOuId" parameterType="pps.core.system.entity.SysOrganizationDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT SELECT
...@@ -56,6 +60,7 @@ ...@@ -56,6 +60,7 @@
AND OU_ID=#{ouId} AND OU_ID=#{ouId}
</if> </if>
</select> </select>
<select id="selectListByDictionaryOuId" parameterType="pps.core.system.entity.SysOrganizationDictionaryView" <select id="selectListByDictionaryOuId" parameterType="pps.core.system.entity.SysOrganizationDictionaryView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT A.DIC_CODE, SELECT A.DIC_CODE,
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<result column="MODIFY_BY_NAME" property="modifyByName" /> <result column="MODIFY_BY_NAME" property="modifyByName" />
<result column="MODIFY_TIME" property="modifyTime" /> <result column="MODIFY_TIME" property="modifyTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID ID
, ,
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
MODIFY_BY_NAME, MODIFY_BY_NAME,
MODIFY_TIME MODIFY_TIME
</sql> </sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationPropertyView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationPropertyView" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -37,6 +39,7 @@ ...@@ -37,6 +39,7 @@
WHERE WHERE
ID=#{id} ID=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysOrganizationPropertyView" <select id="selectList" parameterType="pps.core.system.entity.SysOrganizationPropertyView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT SELECT
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<result column="MODIFY_BY_NAME" property="modifyByName" /> <result column="MODIFY_BY_NAME" property="modifyByName" />
<result column="MODIFY_TIME" property="modifyTime" /> <result column="MODIFY_TIME" property="modifyTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID ID
, ,
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
MODIFY_BY_NAME, MODIFY_BY_NAME,
MODIFY_TIME MODIFY_TIME
</sql> </sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -43,6 +45,7 @@ ...@@ -43,6 +45,7 @@
WHERE WHERE
ID=#{id} ID=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -50,12 +53,14 @@ ...@@ -50,12 +53,14 @@
WHERE WHERE
ID=#{id} ID=#{id}
</select> </select>
<select id="selectEffective" resultMap="BaseResultMap"> <select id="selectEffective" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM SYS_ORGANIZATION_REL FROM SYS_ORGANIZATION_REL
WHERE EFFECT_TIME &lt;= now() AND END_TIME &gt;= now() WHERE EFFECT_TIME &lt;= now() AND END_TIME &gt;= now()
</select> </select>
<select id="selectMaxSort" parameterType="String" resultType="pps.core.system.entity.SysOrganizationRelView"> <select id="selectMaxSort" parameterType="String" resultType="pps.core.system.entity.SysOrganizationRelView">
SELECT MAX(SOR.SORT) AS SORT, SELECT MAX(SOR.SORT) AS SORT,
SOR.PARENT_OU_ID SOR.PARENT_OU_ID
...@@ -72,5 +77,4 @@ ...@@ -72,5 +77,4 @@
LEFT JOIN SYS_ORGANIZATION_REL SOR2 ON SOR.PARENT_OU_ID = SOR2.OU_ID LEFT JOIN SYS_ORGANIZATION_REL SOR2 ON SOR.PARENT_OU_ID = SOR2.OU_ID
WHERE SOR2.PARENT_OU_ID = #{ouId} WHERE SOR2.PARENT_OU_ID = #{ouId}
</select> </select>
</mapper> </mapper>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM SYS_ORGANIZATION FROM SYS_ORGANIZATION
WHERE IS_DELETED =1 WHERE IS_DELETED = 1
</select> </select>
<select id="selectSysOrganizationList" parameterType="pps.core.system.entity.SysOrganizationView" <select id="selectSysOrganizationList" parameterType="pps.core.system.entity.SysOrganizationView"
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<result column="MODIFY_BY_NAME" property="modifyByName"/> <result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime"/> <result column="MODIFY_TIME" property="modifyTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID ID
, ,
......
...@@ -2,22 +2,22 @@ ...@@ -2,22 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysUserOrganizationRelViewMapper"> <mapper namespace="pps.core.system.mapper.SysUserOrganizationRelViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysUserOrganizationRelView"> <resultMap id="BaseResultMap" type="pps.core.system.entity.SysUserOrganizationRelView">
<id column="ID" property="id" /> <id column="ID" property="id"/>
<result column="OU_ID" property="ouId" /> <result column="OU_ID" property="ouId"/>
<result column="USER_ID" property="userId" /> <result column="USER_ID" property="userId"/>
<result column="CREATE_BY_ID" property="createById" /> <result column="CREATE_BY_ID" property="createById"/>
<result column="CREATE_BY_NAME" property="createByName" /> <result column="CREATE_BY_NAME" property="createByName"/>
<result column="CREATE_TIME" property="createTime" /> <result column="CREATE_TIME" property="createTime"/>
<result column="MODIFY_BY_ID" property="modifyById" /> <result column="MODIFY_BY_ID" property="modifyById"/>
<result column="MODIFY_BY_NAME" property="modifyByName" /> <result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime" /> <result column="MODIFY_TIME" property="modifyTime"/>
<result column="EFFECT_TIME" property="effectTime" /> <result column="EFFECT_TIME" property="effectTime"/>
<result column="END_TIME" property="endTime" /> <result column="END_TIME" property="endTime"/>
<result column="OU_NAME" property="ouName" /> <result column="OU_NAME" property="ouName"/>
<result column="STATION_ID" property="stationId" /> <result column="STATION_ID" property="stationId"/>
<result column="STATION_NAME" property="stationName" /> <result column="STATION_NAME" property="stationName"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID ID
, ,
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
EFFECT_TIME, EFFECT_TIME,
END_TIME END_TIME
</sql> </sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
WHERE WHERE
ID=#{id} ID=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -46,12 +48,14 @@ ...@@ -46,12 +48,14 @@
WHERE WHERE
ID=#{id} ID=#{id}
</select> </select>
<select id="selectOrgList" parameterType="pps.core.system.entity.SysUserOrganizationRelView" <select id="selectOrgList" parameterType="pps.core.system.entity.SysUserOrganizationRelView"
resultType="pps.core.system.entity.SysOrganizationView"> resultType="pps.core.system.entity.SysOrganizationView">
SELECT * SELECT *
FROM SYS_ORGANIZATION FROM SYS_ORGANIZATION
WHERE IS_DELETED = 1 WHERE IS_DELETED = 1
</select> </select>
<select id="getSysOrganizationByUserId" parameterType="pps.core.system.entity.SysUserOrganizationRelView" <select id="getSysOrganizationByUserId" parameterType="pps.core.system.entity.SysUserOrganizationRelView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT DISTINCT SUOR.ID, SELECT DISTINCT SUOR.ID,
......
...@@ -2,21 +2,21 @@ ...@@ -2,21 +2,21 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysUserRoleRelViewMapper"> <mapper namespace="pps.core.system.mapper.SysUserRoleRelViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysUserRoleRelView"> <resultMap id="BaseResultMap" type="pps.core.system.entity.SysUserRoleRelView">
<id column="ID" property="id" /> <id column="ID" property="id"/>
<result column="ROLE_ID" property="roleId" /> <result column="ROLE_ID" property="roleId"/>
<result column="ROLE_NAME" property="roleName" /> <result column="ROLE_NAME" property="roleName"/>
<result column="USER_ID" property="userId" /> <result column="USER_ID" property="userId"/>
<result column="LOGIN_NAME" property="loginName" /> <result column="LOGIN_NAME" property="loginName"/>
<result column="USER_NAME" property="userName" /> <result column="USER_NAME" property="userName"/>
<result column="OU_ID" property="ouId" /> <result column="OU_ID" property="ouId"/>
<result column="OU_NAME" property="ouName" /> <result column="OU_NAME" property="ouName"/>
<result column="CONCAT_OU_NAME" property="concatOuName" /> <result column="CONCAT_OU_NAME" property="concatOuName"/>
<result column="CREATE_BY_ID" property="createById" /> <result column="CREATE_BY_ID" property="createById"/>
<result column="CREATE_BY_NAME" property="createByName" /> <result column="CREATE_BY_NAME" property="createByName"/>
<result column="CREATE_TIME" property="createTime" /> <result column="CREATE_TIME" property="createTime"/>
<result column="MODIFY_BY_ID" property="modifyById" /> <result column="MODIFY_BY_ID" property="modifyById"/>
<result column="MODIFY_BY_NAME" property="modifyByName" /> <result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime" /> <result column="MODIFY_TIME" property="modifyTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
<select id="selectListByRoleIds" parameterType="pps.core.system.entity.SysUserRoleRelView" <select id="selectListByRoleIds" parameterType="pps.core.system.entity.SysUserRoleRelView"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
SELECT DISTINCT SELECT DISTINCT
SU.ID , SU.ID,
SU.USER_NAME, SU.USER_NAME,
SU.LOGIN_NAME, SU.LOGIN_NAME,
SU.PHONE SU.PHONE
......
...@@ -258,7 +258,6 @@ ...@@ -258,7 +258,6 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
</where> </where>
</select> </select>
...@@ -278,7 +277,6 @@ ...@@ -278,7 +277,6 @@
<if test="userName != null and userName!= ''"> <if test="userName != null and userName!= ''">
AND SU.USER_NAME LIKE CONCAT('%',#{userName},'%') AND SU.USER_NAME LIKE CONCAT('%',#{userName},'%')
</if> </if>
</where> </where>
</select> </select>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment