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.
90 lines
3.8 KiB
90 lines
3.8 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.epmet.dao.yantai.DataSyncUserDataDao">
|
|
|
|
<resultMap type="com.epmet.entity.yantai.DataSyncUserDataEntity" id="dataSyncUserDataMap">
|
|
<result property="id" column="ID"/>
|
|
<result property="gender" column="GENDER"/>
|
|
<result property="mobileTelephoneNumber" column="MOBILE_TELEPHONE_NUMBER"/>
|
|
<result property="orderNumber" column="ORDER_NUMBER"/>
|
|
<result property="position" column="POSITION"/>
|
|
<result property="positionLevel" column="POSITION_LEVEL"/>
|
|
<result property="telephoneNumber" column="TELEPHONE_NUMBER"/>
|
|
<result property="userGuid" column="USER_GUID"/>
|
|
<result property="userName" column="USER_NAME"/>
|
|
<result property="userPath" column="USER_PATH"/>
|
|
<result property="organizationId" column="ORGANIZATION_ID"/>
|
|
<result property="delFlag" column="DEL_FLAG"/>
|
|
<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="customerId" column="CUSTOMER_ID"/>
|
|
<result property="status" column="STATUS"/>
|
|
<result property="staffId" column="STAFF_ID"/>
|
|
<result property="remark" column="REMARK"/>
|
|
</resultMap>
|
|
|
|
<!-- 运营端,统一认证 列表返参 -->
|
|
<select id="pageUser" parameterType="com.epmet.dto.form.yantai.YtUserPageFormDTO" resultType="com.epmet.dto.result.yantai.YtUserPageResDTO">
|
|
SELECT
|
|
u.USER_GUID AS userGuid,
|
|
u.ORGANIZATION_ID AS organizationId,
|
|
(case when o.PARENT_ORG_NAME is not null and LENGTH(o.PARENT_ORG_NAME)>0
|
|
then concat(o.PARENT_ORG_NAME,o.ORGANIZATIO_NABBREVIATION)
|
|
else o.ORGANIZATIO_NABBREVIATION
|
|
end)as orgName,
|
|
u.USER_NAME AS userName,
|
|
u.TELEPHONE_NUMBER AS telephoneNumber,
|
|
u.GENDER AS gender,
|
|
u.`STATUS` AS status,
|
|
IFNULL(u.STAFF_ID,'') AS staffId,
|
|
IFNULL(u.REMARK, '' ) AS remark,
|
|
u.CUSTOMER_ID as customerId
|
|
FROM
|
|
data_sync_user_data u
|
|
LEFT JOIN data_sync_org_data o ON ( u.ORGANIZATION_ID = o.ORGANIZATION_ID )
|
|
WHERE
|
|
u.DEL_FLAG = '0'
|
|
AND o.DEL_FLAG = '0'
|
|
<if test="null != type and type =='0'">
|
|
<if test='null != orgId and "" != orgId'>
|
|
AND u.ORGANIZATION_ID = #{orgId}
|
|
</if>
|
|
</if>
|
|
|
|
<if test="null != type and type =='1'">
|
|
<if test='null != orgId and "" != orgId'>
|
|
AND (o.ORGANIZATION_ID = #{orgId} OR o.pids LIKE concat( '%', #{orgId}, '%' ) )
|
|
</if>
|
|
</if>
|
|
|
|
<if test='null != name and "" != name'>
|
|
AND u.USER_NAME LIKE concat( '%', #{name}, '%' )
|
|
</if>
|
|
|
|
<if test='null != mobile and "" != mobile'>
|
|
AND u.MOBILE_TELEPHONE_NUMBER LIKE concat( '%', #{mobile}, '%' )
|
|
</if>
|
|
|
|
<if test='null != status and "" != status'>
|
|
AND u.`STATUS` = #{status}
|
|
</if>
|
|
order by o.ORDER_NUMBER asc,u.ORDER_NUMBER asc
|
|
</select>
|
|
|
|
<update id="updateStaff" parameterType="map">
|
|
UPDATE data_sync_user_data
|
|
SET UPDATED_BY = #{operUserId},
|
|
UPDATED_TIME = NOW(),
|
|
`STATUS` = '1',
|
|
STAFF_ID = #{staffId},
|
|
CUSTOMER_ID = #{customerId}
|
|
WHERE
|
|
MOBILE_TELEPHONE_NUMBER = #{mobile}
|
|
AND USER_NAME = #{name}
|
|
AND del_flag = '0'
|
|
</update>
|
|
</mapper>
|