287 lines
7.3 KiB
XML
287 lines
7.3 KiB
XML
|
<?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.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper">
|
||
|
|
||
|
<!--表名 -->
|
||
|
<sql id="tableName">
|
||
|
XGF_USER_DETAILS
|
||
|
</sql>
|
||
|
|
||
|
<!-- 字段 -->
|
||
|
<sql id="Field">
|
||
|
f.XFG_USER_DETAILS_ID,
|
||
|
f.XGF_USER_ID,
|
||
|
f.XGF_USER_NAME,
|
||
|
f.BELONG_TO_CORP,
|
||
|
f.BELONG_TO_CORP_NAME,
|
||
|
f.PHONE,
|
||
|
f.CREAT_TIME,
|
||
|
f.DEPART_STATE,
|
||
|
f.ISDELETE,
|
||
|
f.AGE,
|
||
|
f.HKLOCAL,
|
||
|
f.ADDRESS,
|
||
|
f.DEGREE_OF_EDUCATION,
|
||
|
f.DEGREE_OF_EDUCATION_NAME,
|
||
|
f.CORP_START_DATE,
|
||
|
f.POST_ID,
|
||
|
f.POST_NAME,
|
||
|
f.WORK_SIGN,
|
||
|
f.JOINED_DATE,
|
||
|
f.WORK_DATE,
|
||
|
f.PHOTO,
|
||
|
f.DATE_OF_BIRTH,
|
||
|
f.ISPAY,
|
||
|
f.ISPAY_NUMBER,
|
||
|
f.IS_SAFETY_TELL,
|
||
|
f.IS_SAFETY_TIME,
|
||
|
f.IS_INJURIES_PAY,
|
||
|
f.IS_SIGN_LABOR,
|
||
|
f.SEX,
|
||
|
f.ENTRY_DATE,
|
||
|
f.PERSON_WORK_TYPE,
|
||
|
f.PERSON_WORK_TYPE_NAME,
|
||
|
f.NATIONALITY,
|
||
|
f.NATIONALITY_NAME,
|
||
|
f.POLITICAL_TIME,
|
||
|
f.POLITICAL_STATUS,
|
||
|
f.POLITICAL_STATUS_NAME,
|
||
|
f.IS_INJURIES_PAY_TIME,
|
||
|
f.IS_LEVEL_THREE,
|
||
|
f.IS_BODY_ADAPT,
|
||
|
f.IS_SPECIAL_JOB,
|
||
|
f.CORPINFO_ID
|
||
|
</sql>
|
||
|
|
||
|
<!-- 字段用于新增 -->
|
||
|
<sql id="Field2">
|
||
|
XFG_USER_DETAILS_ID,
|
||
|
XGF_USER_ID,
|
||
|
XGF_USER_NAME,
|
||
|
BELONG_TO_CORP,
|
||
|
BELONG_TO_CORP_NAME,
|
||
|
PHONE,
|
||
|
CREAT_TIME,
|
||
|
DEPART_STATE,
|
||
|
ISDELETE,
|
||
|
AGE,
|
||
|
HKLOCAL,
|
||
|
ADDRESS,
|
||
|
DEGREE_OF_EDUCATION,
|
||
|
DEGREE_OF_EDUCATION_NAME,
|
||
|
CORP_START_DATE,
|
||
|
POST_ID,
|
||
|
POST_NAME,
|
||
|
WORK_SIGN,
|
||
|
JOINED_DATE,
|
||
|
WORK_DATE,
|
||
|
PHOTO,
|
||
|
DATE_OF_BIRTH,
|
||
|
ISPAY,
|
||
|
ISPAY_NUMBER,
|
||
|
IS_SAFETY_TELL,
|
||
|
IS_SAFETY_TIME,
|
||
|
IS_INJURIES_PAY,
|
||
|
IS_SIGN_LABOR,
|
||
|
SEX,
|
||
|
ENTRY_DATE,
|
||
|
PERSON_WORK_TYPE,
|
||
|
PERSON_WORK_TYPE_NAME,
|
||
|
NATIONALITY,
|
||
|
NATIONALITY_NAME,
|
||
|
POLITICAL_TIME,
|
||
|
POLITICAL_STATUS,
|
||
|
POLITICAL_STATUS_NAME,
|
||
|
IS_INJURIES_PAY_TIME,
|
||
|
IS_LEVEL_THREE,
|
||
|
IS_BODY_ADAPT,
|
||
|
IS_SPECIAL_JOB,
|
||
|
CORPINFO_ID
|
||
|
</sql>
|
||
|
|
||
|
<!-- 字段值 -->
|
||
|
<sql id="FieldValue">
|
||
|
#{XFG_USER_DETAILS_ID}
|
||
|
,
|
||
|
#{XGF_USER_ID},
|
||
|
#{XGF_USER_NAME},
|
||
|
#{BELONG_TO_CORP},
|
||
|
#{BELONG_TO_CORP_NAME},
|
||
|
#{PHONE},
|
||
|
#{CREAT_TIME},
|
||
|
#{DEPART_STATE},
|
||
|
#{ISDELETE},
|
||
|
#{AGE},
|
||
|
#{HKLOCAL},
|
||
|
#{ADDRESS},
|
||
|
#{DEGREE_OF_EDUCATION},
|
||
|
#{DEGREE_OF_EDUCATION_NAME},
|
||
|
#{CORP_START_DATE},
|
||
|
#{POST_ID},
|
||
|
#{POST_NAME},
|
||
|
#{WORK_SIGN},
|
||
|
#{JOINED_DATE},
|
||
|
#{WORK_DATE},
|
||
|
#{PHOTO},
|
||
|
#{DATE_OF_BIRTH},
|
||
|
#{ISPAY},
|
||
|
#{ISPAY_NUMBER},
|
||
|
#{IS_SAFETY_TELL},
|
||
|
#{IS_SAFETY_TIME},
|
||
|
#{IS_INJURIES_PAY},
|
||
|
#{IS_SIGN_LABOR},
|
||
|
#{SEX},
|
||
|
#{ENTRY_DATE},
|
||
|
#{PERSON_WORK_TYPE},
|
||
|
#{PERSON_WORK_TYPE_NAME},
|
||
|
#{NATIONALITY},
|
||
|
#{NATIONALITY_NAME},
|
||
|
#{POLITICAL_TIME},
|
||
|
#{POLITICAL_STATUS},
|
||
|
#{POLITICAL_STATUS_NAME},
|
||
|
#{IS_INJURIES_PAY_TIME},
|
||
|
#{IS_LEVEL_THREE},
|
||
|
#{IS_BODY_ADAPT},
|
||
|
#{IS_SPECIAL_JOB},
|
||
|
#{CORPINFO_ID}
|
||
|
</sql>
|
||
|
|
||
|
<!-- 新增-->
|
||
|
<insert id="save" parameterType="pd">
|
||
|
insert into
|
||
|
<include refid="tableName"></include>
|
||
|
(
|
||
|
<include refid="Field2"></include>
|
||
|
) values (
|
||
|
<include refid="FieldValue"></include>
|
||
|
)
|
||
|
</insert>
|
||
|
|
||
|
<!-- 删除-->
|
||
|
<delete id="delete" parameterType="pd">
|
||
|
update
|
||
|
<include refid="tableName"></include>
|
||
|
set
|
||
|
ISDELETE = '1'
|
||
|
where
|
||
|
XGF_USER_ID = #{XGF_USER_ID}
|
||
|
</delete>
|
||
|
|
||
|
<!-- 修改 -->
|
||
|
<update id="edit" parameterType="pd">
|
||
|
update
|
||
|
<include refid="tableName"></include>
|
||
|
set
|
||
|
XFG_USER_DETAILS_ID = #{XFG_USER_DETAILS_ID},
|
||
|
XGF_USER_ID = #{XGF_USER_ID},
|
||
|
XGF_USER_NAME = #{XGF_USER_NAME},
|
||
|
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||
|
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||
|
PHONE = #{PHONE},
|
||
|
CREAT_TIME = #{CREAT_TIME},
|
||
|
DEPART_STATE = #{DEPART_STATE},
|
||
|
ISDELETE = #{ISDELETE},
|
||
|
AGE = #{AGE},
|
||
|
HKLOCAL = #{HKLOCAL},
|
||
|
ADDRESS = #{ADDRESS},
|
||
|
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},},
|
||
|
DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME},
|
||
|
CORP_START_DATE = #{CORP_START_DATE},
|
||
|
POST_ID = #{POST_ID},
|
||
|
POST_NAME = #{POST_NAME},
|
||
|
WORK_SIGN = #{WORK_SIGN},
|
||
|
JOINED_DATE = #{JOINED_DATE},
|
||
|
WORK_DATE = #{WORK_DATE},
|
||
|
PHOTO = #{PHOTO},
|
||
|
DATE_OF_BIRTH = #{DATE_OF_BIRTH},
|
||
|
ISPAY = #{ISPAY},
|
||
|
ISPAY_NUMBER = #{ISPAY_NUMBER},
|
||
|
IS_SAFETY_TELL = #{IS_SAFETY_TELL},
|
||
|
IS_SAFETY_TIME = #{IS_SAFETY_TIME},
|
||
|
IS_INJURIES_PAY = #{IS_INJURIES_PAY},
|
||
|
IS_SIGN_LABOR = #{IS_SIGN_LABOR},
|
||
|
SEX = #{SEX},
|
||
|
ENTRY_DATE = #{ENTRY_DATE},
|
||
|
PERSON_WORK_TYPE = #{PERSON_WORK_TYPE},
|
||
|
PERSON_WORK_TYPE_NAME = #{PERSON_WORK_TYPE_NAME},
|
||
|
NATIONALITY = #{NATIONALITY},
|
||
|
NATIONALITY_NAME = #{NATIONALITY_NAME},
|
||
|
POLITICAL_TIME = #{POLITICAL_TIME},
|
||
|
POLITICAL_STATUS = #{POLITICAL_STATUS},
|
||
|
POLITICAL_STATUS_NAME = #{POLITICAL_STATUS_NAME},
|
||
|
IS_INJURIES_PAY_TIME = #{IS_INJURIES_PAY_TIME},
|
||
|
IS_LEVEL_THREE = #{IS_LEVEL_THREE},
|
||
|
IS_BODY_ADAPT = #{IS_BODY_ADAPT},
|
||
|
IS_SPECIAL_JOB = #{IS_SPECIAL_JOB},
|
||
|
CORPINFO_ID = #{CORPINFO_ID}
|
||
|
where
|
||
|
XFG_USER_DETAILS_ID = #{XFG_USER_DETAILS_ID}
|
||
|
</update>
|
||
|
|
||
|
<!-- 通过ID获取数据 -->
|
||
|
<select id="findById" parameterType="pd" resultType="pd">
|
||
|
select
|
||
|
<include refid="Field"></include>
|
||
|
from
|
||
|
<include refid="tableName"></include>
|
||
|
f
|
||
|
where
|
||
|
f.XFG_USER_DETAILS_ID = #{XFG_USER_DETAILS_ID}
|
||
|
</select>
|
||
|
|
||
|
<!-- 列表 -->
|
||
|
<select id="listPage" parameterType="page" resultType="pd">
|
||
|
select
|
||
|
*
|
||
|
from
|
||
|
<include refid="tableName"></include>
|
||
|
f
|
||
|
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||
|
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||
|
and(f.BELONG_TO_CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%'))
|
||
|
</if>
|
||
|
ORDER BY f.CREATED_TIME DESC
|
||
|
</select>
|
||
|
|
||
|
<!-- 列表(全部) -->
|
||
|
<select id="listAll" parameterType="pd" resultType="pd">
|
||
|
select
|
||
|
*
|
||
|
<include refid="Field"></include>
|
||
|
from
|
||
|
<include refid="tableName"></include>
|
||
|
f
|
||
|
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||
|
</select>
|
||
|
|
||
|
<!-- 批量删除 -->
|
||
|
<delete id="deleteAll" parameterType="pd">
|
||
|
update
|
||
|
<include refid="tableName"></include>
|
||
|
set
|
||
|
ISDELETE = '1',
|
||
|
OPERATOR = #{OPERATOR},
|
||
|
OPERATTIME = #{OPERATTIME}
|
||
|
where
|
||
|
XFG_USER_DETAILS_ID in
|
||
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||
|
#{item}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
<!-- 列表(根据多选ID查询数据) -->
|
||
|
<select id="listByIds" parameterType="pd" resultType="pd">
|
||
|
select
|
||
|
<include refid="Field"></include>
|
||
|
from
|
||
|
<include refid="tableName"></include>
|
||
|
f
|
||
|
where f.ISDELETE = '0'
|
||
|
and XFG_USER_DETAILS_ID in
|
||
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||
|
#{item}
|
||
|
</foreach>
|
||
|
</select>
|
||
|
|
||
|
</mapper>
|