|
|
|
@ -17,17 +17,18 @@
|
|
|
|
|
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
|
|
|
|
<result column="MODIFIED_USER" property="modifiedUser" />
|
|
|
|
|
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
|
|
|
|
<result column="EXIST_USER" property="existUser" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="UserResourceDto" type="com.foreverwin.mesnac.dispatch.dto.UserResourceDto" extends="BaseResultMap">
|
|
|
|
|
<result column="SEQ" property="seq"/>
|
|
|
|
|
<result column="RESOURCE_DESCRIPTION" property="resrceDescription"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
HANDLE, SITE, RESOURCE_BO, RESRCE, RESRCE_DESCRIPTION, USER_ID, USER_DESCRIPTION, TEMPORARY_USER, STATUS, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
|
|
|
|
|
HANDLE, SITE, RESOURCE_BO, RESRCE, RESRCE_DESCRIPTION, USER_ID, USER_DESCRIPTION, TEMPORARY_USER, STATUS, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME, EXIST_USER
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
@ -74,6 +75,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.existUser!=null"> AND EXIST_USER=#{ew.entity.existUser}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -97,6 +99,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.existUser!=null"> AND EXIST_USER=#{ew.entity.existUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -128,6 +131,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.existUser!=null"> AND EXIST_USER=#{ew.entity.existUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -159,6 +163,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.existUser!=null"> AND EXIST_USER=#{ew.entity.existUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -190,6 +195,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.existUser!=null"> AND EXIST_USER=#{ew.entity.existUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -221,6 +227,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.existUser!=null"> AND EXIST_USER=#{ew.entity.existUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -252,6 +259,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.existUser!=null"> AND EXIST_USER=#{ew.entity.existUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -279,6 +287,7 @@
|
|
|
|
|
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
|
|
|
|
<if test="modifiedUser!=null">MODIFIED_USER,</if>
|
|
|
|
|
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
|
|
|
|
<if test="existUser!=null">EXIST_USER,</if>
|
|
|
|
|
</trim> VALUES
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
#{handle},
|
|
|
|
@ -294,6 +303,7 @@
|
|
|
|
|
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
|
|
|
|
<if test="modifiedUser!=null">#{modifiedUser},</if>
|
|
|
|
|
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
|
|
|
|
<if test="existUser!=null">#{existUser},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -316,6 +326,7 @@
|
|
|
|
|
#{createdDateTime},
|
|
|
|
|
#{modifiedUser},
|
|
|
|
|
#{modifiedDateTime},
|
|
|
|
|
#{existUser},
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -334,6 +345,7 @@
|
|
|
|
|
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
|
|
|
|
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
|
|
|
|
|
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
|
|
|
|
<if test="et.existUser!=null">EXIST_USER=#{et.existUser},</if>
|
|
|
|
|
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
@ -352,6 +364,7 @@
|
|
|
|
|
CREATED_DATE_TIME=#{et.createdDateTime},
|
|
|
|
|
MODIFIED_USER=#{et.modifiedUser},
|
|
|
|
|
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
|
|
|
|
|
EXIST_USER=#{et.existUser},
|
|
|
|
|
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
@ -370,6 +383,7 @@
|
|
|
|
|
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
|
|
|
|
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
|
|
|
|
|
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
|
|
|
|
<if test="et.existUser!=null">EXIST_USER=#{et.existUser},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="ew!=null">
|
|
|
|
@ -387,6 +401,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.existUser!=null"> AND EXIST_USER=#{ew.entity.existUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -435,6 +450,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.existUser!=null"> AND EXIST_USER=#{ew.entity.existUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -452,6 +468,7 @@
|
|
|
|
|
</foreach>)
|
|
|
|
|
</delete>
|
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
|
|
|
|
|
|
<select id="findEnableList" resultMap="BaseResultMap">
|
|
|
|
|
SELECT <include refid="Base_Column_List"></include>
|
|
|
|
|
FROM Z_USER_RESOURCE
|
|
|
|
@ -467,9 +484,9 @@
|
|
|
|
|
<select id="findEmployeeList" resultType="com.foreverwin.mesnac.meapi.model.NwaUser">
|
|
|
|
|
SELECT DISTINCT A.SITE, A.USER_ID USER_NAME, B.FIRST_NAME, B.LAST_NAME, NVL(B.FULL_NAME, A.USER_DESCRIPTION) FULL_NAME
|
|
|
|
|
FROM Z_USER_RESOURCE A
|
|
|
|
|
INNER JOIN RESOURCE_TYPE_RESOURCE WM ON WM.RESOURCE_BO = A.RESOURCE_BO
|
|
|
|
|
INNER JOIN RESOURCE_TYPE RT ON RT.HANDLE = WM.RESOURCE_TYPE_BO
|
|
|
|
|
LEFT JOIN Z_NWA_USER B ON A.SITE = B.SITE AND A.USER_ID = B.USER_NAME
|
|
|
|
|
INNER JOIN RESOURCE_TYPE_RESOURCE WM ON WM.RESOURCE_BO = A.RESOURCE_BO
|
|
|
|
|
INNER JOIN RESOURCE_TYPE RT ON RT.HANDLE = WM.RESOURCE_TYPE_BO
|
|
|
|
|
LEFT JOIN Z_NWA_USER B ON A.SITE = B.SITE AND A.USER_ID = B.USER_NAME
|
|
|
|
|
WHERE A.SITE = #{site} AND RT.RESOURCE_TYPE = #{resourceType}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -493,10 +510,11 @@
|
|
|
|
|
<if test="user != null and user != ''">
|
|
|
|
|
USER_ID LIKE '%${user}%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="resource != null and resource != ''">
|
|
|
|
|
<if test="resource != null and resource != ''">
|
|
|
|
|
AND RESRCE LIKE '%${resource}%'
|
|
|
|
|
</if>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|