北尚诉办
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
3.3 KiB

<?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.elink.esua.epdc.dao.PartyAuthenticationFailedDao">
<resultMap type="com.elink.esua.epdc.entity.PartyAuthenticationFailedEntity" id="partyAuthenticationFailedMap">
<result property="id" column="ID"/>
<result property="realName" column="REAL_NAME"/>
<result property="mobile" column="MOBILE"/>
<result property="identityNo" column="IDENTITY_NO"/>
<result property="post" column="POST"/>
<result property="postValue" column="POST_VALUE"/>
<result property="cadreFlag" column="CADRE_FLAG"/>
<result property="registFlag" column="REGIST_FLAG"/>
<result property="registTime" column="REGIST_TIME"/>
<result property="streetName" column="STREET_NAME"/>
<result property="streetId" column="STREET_ID"/>
<result property="communityName" column="COMMUNITY_NAME"/>
<result property="communityId" column="COMMUNITY_ID"/>
<result property="gridName" column="GRID_NAME"/>
<result property="gridId" column="GRID_ID"/>
<result property="deptId" column="DEPT_ID"/>
<result property="state" column="STATE"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="userId" column="USER_ID"/>
<result property="address" column="ADDRESS"/>
</resultMap>
<select id="selectListDto" resultType="com.elink.esua.epdc.dto.PartyAuthenticationFailedDTO">
SELECT
epaf.ID,
epaf.REAL_NAME,
epaf.IDENTITY_NO,
epaf.MOBILE,
epaf.GRID_NAME,
epaf.CREATED_TIME,
epaf.ADDRESS,
epaf.USER_ID,
epaf.ALL_DEPT_NAMES
FROM epdc_party_authentication_failed epaf
WHERE
epaf.del_flag = '0'
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
and DATE_FORMAT( epaf.created_time, '%Y-%m-%d' ) between #{startTime} and #{endTime}
</if>
<if test="identityNo != '' and identityNo != null"> and epaf.IDENTITY_NO = #{identityNo}</if>
<if test="realName != '' and realName != null"> and epaf.real_name = #{realName}</if>
<if test="mobile != '' and mobile != null"> and epaf.mobile = #{mobile}</if>
ORDER BY
epaf.CREATED_TIME desc
</select>
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.PartyAuthenticationFailedDTO">
SELECT
ID,
PARENT_DEPT_IDS,
PARENT_DEPT_NAMES,
ALL_DEPT_IDS,
ALL_DEPT_NAMES
FROM
epdc_party_authentication_failed
WHERE
FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
</select>
<update id="updateGridByDeptId">
UPDATE epdc_party_authentication_failed SET GRID_NAME = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId}
</update>
</mapper>