支付
This commit is contained in:
@@ -0,0 +1,203 @@
|
||||
<?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.zhwl.base.mapper.ZdyBaseCompanyMapper">
|
||||
|
||||
<resultMap type="ZdyBaseCompany" id="ZdyBaseCompanyResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="companyName" column="company_name"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="legal" column="legal"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="enterpriseCode" column="enterprise_code"/>
|
||||
<result property="businessLicense" column="business_license"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyBaseCompanyVo">
|
||||
select id,
|
||||
company_name,
|
||||
dept_id,
|
||||
address,
|
||||
legal,
|
||||
phone,
|
||||
enterprise_code,
|
||||
business_license,
|
||||
create_time,
|
||||
create_by,
|
||||
update_time,
|
||||
update_by,
|
||||
remark
|
||||
from zdy_base_company
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyBaseCompanyList" parameterType="ZdyBaseCompany" resultMap="ZdyBaseCompanyResult">
|
||||
<include refid="selectZdyBaseCompanyVo"/>
|
||||
<where>
|
||||
<if test="companyName != null and companyName != ''">
|
||||
and company_name like concat('%', #{companyName}, '%')
|
||||
</if>
|
||||
<if test="address != null and address != ''">
|
||||
and address = #{address}
|
||||
</if>
|
||||
<if test="legal != null and legal != ''">
|
||||
and legal = #{legal}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and phone = #{phone}
|
||||
</if>
|
||||
<if test="enterpriseCode != null and enterpriseCode != ''">
|
||||
and enterprise_code = #{enterpriseCode}
|
||||
</if>
|
||||
<if test="businessLicense != null and businessLicense != ''">
|
||||
and business_license = #{businessLicense}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyBaseCompanyById" parameterType="Long"
|
||||
resultMap="ZdyBaseCompanyResult">
|
||||
<include refid="selectZdyBaseCompanyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyBaseCompany" parameterType="ZdyBaseCompany" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_base_company
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="companyName != null">company_name,
|
||||
</if>
|
||||
<if test="address != null">address,
|
||||
</if>
|
||||
<if test="legal != null">legal,
|
||||
</if>
|
||||
<if test="phone != null">phone,
|
||||
</if>
|
||||
<if test="enterpriseCode != null">enterprise_code,
|
||||
</if>
|
||||
<if test="businessLicense != null">business_license,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="companyName != null">#{companyName},
|
||||
</if>
|
||||
<if test="address != null">#{address},
|
||||
</if>
|
||||
<if test="legal != null">#{legal},
|
||||
</if>
|
||||
<if test="phone != null">#{phone},
|
||||
</if>
|
||||
<if test="enterpriseCode != null">#{enterpriseCode},
|
||||
</if>
|
||||
<if test="businessLicense != null">#{businessLicense},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyBaseCompany" parameterType="ZdyBaseCompany">
|
||||
update zdy_base_company
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="companyName != null">company_name =
|
||||
#{companyName},
|
||||
</if>
|
||||
<if test="address != null">address =
|
||||
#{address},
|
||||
</if>
|
||||
<if test="legal != null">legal =
|
||||
#{legal},
|
||||
</if>
|
||||
<if test="phone != null">phone =
|
||||
#{phone},
|
||||
</if>
|
||||
<if test="enterpriseCode != null">enterprise_code =
|
||||
#{enterpriseCode},
|
||||
</if>
|
||||
<if test="businessLicense != null">business_license =
|
||||
#{businessLicense},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyBaseCompanyById" parameterType="Long">
|
||||
delete
|
||||
from zdy_base_company
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyBaseCompanyByIds" parameterType="String">
|
||||
delete from zdy_base_company where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateZdyBaseCompanyByDeptId" parameterType="ZdyBaseCompany">
|
||||
update zdy_base_company
|
||||
set company_name = #{companyName}
|
||||
where dept_id = #{deptId}
|
||||
</update>
|
||||
<select id="selectZdyBaseCompanyByDeptId" parameterType="Long"
|
||||
resultMap="ZdyBaseCompanyResult">
|
||||
<include refid="selectZdyBaseCompanyVo"/>
|
||||
where dept_id = #{deptId} limit 1
|
||||
</select>
|
||||
|
||||
<select id="countByCompanyName" resultType="int">
|
||||
select count(1)
|
||||
from zdy_base_company
|
||||
where company_name = #{companyName}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,138 @@
|
||||
<?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.zhwl.base.mapper.ZdyBaseEmployeeCardLogMapper">
|
||||
|
||||
<resultMap type="ZdyBaseEmployeeCardLog" id="ZdyBaseEmployeeCardLogResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="cardNo" column="card_no"/>
|
||||
<result property="employeeId" column="employee_id"/>
|
||||
<result property="employeeName" column="employee_name"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyBaseEmployeeCardLogVo">
|
||||
select id,
|
||||
card_no,
|
||||
employee_id,
|
||||
employee_name,
|
||||
create_time,
|
||||
create_by,
|
||||
update_time,
|
||||
update_by,
|
||||
remark
|
||||
from zdy_base_employee_card_log
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyBaseEmployeeCardLogList" parameterType="ZdyBaseEmployeeCardLog"
|
||||
resultMap="ZdyBaseEmployeeCardLogResult">
|
||||
<include refid="selectZdyBaseEmployeeCardLogVo"/>
|
||||
<where>
|
||||
<if test="cardNo != null and cardNo != ''">
|
||||
and card_no = #{cardNo}
|
||||
</if>
|
||||
<if test="employeeId != null ">
|
||||
and employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="employeeName != null and employeeName != ''">
|
||||
and employee_name like concat('%', #{employeeName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyBaseEmployeeCardLogById" parameterType="Long"
|
||||
resultMap="ZdyBaseEmployeeCardLogResult">
|
||||
<include refid="selectZdyBaseEmployeeCardLogVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyBaseEmployeeCardLog" parameterType="ZdyBaseEmployeeCardLog" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_base_employee_card_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cardNo != null">card_no,
|
||||
</if>
|
||||
<if test="employeeId != null">employee_id,
|
||||
</if>
|
||||
<if test="employeeName != null">employee_name,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cardNo != null">#{cardNo},
|
||||
</if>
|
||||
<if test="employeeId != null">#{employeeId},
|
||||
</if>
|
||||
<if test="employeeName != null">#{employeeName},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyBaseEmployeeCardLog" parameterType="ZdyBaseEmployeeCardLog">
|
||||
update zdy_base_employee_card_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cardNo != null">card_no =
|
||||
#{cardNo},
|
||||
</if>
|
||||
<if test="employeeId != null">employee_id =
|
||||
#{employeeId},
|
||||
</if>
|
||||
<if test="employeeName != null">employee_name =
|
||||
#{employeeName},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyBaseEmployeeCardLogById" parameterType="Long">
|
||||
delete
|
||||
from zdy_base_employee_card_log
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyBaseEmployeeCardLogByIds" parameterType="String">
|
||||
delete from zdy_base_employee_card_log where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,149 @@
|
||||
<?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.zhwl.base.mapper.ZdyBaseEmployeeCardMapper">
|
||||
|
||||
<resultMap type="ZdyBaseEmployeeCard" id="ZdyBaseEmployeeCardResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="cardNo" column="card_no"/>
|
||||
<result property="cardStatus" column="card_status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="employeeName" column="employeeName"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyBaseEmployeeCardVo">
|
||||
SELECT
|
||||
bec.id,
|
||||
bec.card_no,
|
||||
bec.card_status,
|
||||
bec.create_time,
|
||||
bec.create_by,
|
||||
bec.update_time,
|
||||
bec.update_by,
|
||||
bec.remark,
|
||||
be.NAME AS employeeName,
|
||||
bec.dept_id
|
||||
FROM
|
||||
zdy_base_employee_card bec
|
||||
LEFT JOIN zdy_base_employee be ON bec.card_no = be.card_no
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyBaseEmployeeCardList" parameterType="ZdyBaseEmployeeCard"
|
||||
resultMap="ZdyBaseEmployeeCardResult">
|
||||
<include refid="selectZdyBaseEmployeeCardVo"/>
|
||||
left join sys_dept d on d.dept_id = bec.dept_id
|
||||
<where>
|
||||
<if test="cardNo != null and cardNo != ''">
|
||||
and bec.card_no = #{cardNo}
|
||||
</if>
|
||||
<if test="cardStatus != null ">
|
||||
and bec.card_status = #{cardStatus}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyBaseEmployeeCardById" parameterType="Long"
|
||||
resultMap="ZdyBaseEmployeeCardResult">
|
||||
<include refid="selectZdyBaseEmployeeCardVo"/>
|
||||
where bec.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyBaseEmployeeCard" parameterType="ZdyBaseEmployeeCard" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_base_employee_card
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cardNo != null">card_no,
|
||||
</if>
|
||||
<if test="cardStatus != null">card_status,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cardNo != null">#{cardNo},
|
||||
</if>
|
||||
<if test="cardStatus != null">#{cardStatus},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyBaseEmployeeCard" parameterType="ZdyBaseEmployeeCard">
|
||||
update zdy_base_employee_card
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cardNo != null">card_no =
|
||||
#{cardNo},
|
||||
</if>
|
||||
<if test="cardStatus != null">card_status =
|
||||
#{cardStatus},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyBaseEmployeeCardById" parameterType="Long">
|
||||
delete
|
||||
from zdy_base_employee_card
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyBaseEmployeeCardByIds" parameterType="String">
|
||||
delete from zdy_base_employee_card where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="selectZdyBaseEmployeeCardByCardNo" parameterType="String"
|
||||
resultMap="ZdyBaseEmployeeCardResult">
|
||||
<include refid="selectZdyBaseEmployeeCardVo"/>
|
||||
where bec.card_no = #{cardNo} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,309 @@
|
||||
<?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.zhwl.base.mapper.ZdyBaseEmployeeMapper">
|
||||
|
||||
<resultMap type="ZdyBaseEmployee" id="ZdyBaseEmployeeResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="companyId" column="company_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="idCard" column="id_card"/>
|
||||
<result property="cardNo" column="card_no"/>
|
||||
<result property="cardId" column="card_id"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="duty" column="duty"/>
|
||||
<result property="employeeStatus" column="employee_status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="companyName" column="company_name"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZdyEmployeeCardGraph" id="ZdyEmployeeCardGraphResult">
|
||||
<result property="dataTime" column="data_time"/>
|
||||
<result property="cardNo" column="card_no"/>
|
||||
<result property="deviceName" column="device_name"/>
|
||||
<result property="employeeName" column="name"/>
|
||||
<result property="employeePhone" column="phone"/>
|
||||
<result property="employeeId" column="employee_id"/>
|
||||
<result property="openDoor" column="open_door"/>
|
||||
<result property="serial" column="serial"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyBaseEmployeeVo">
|
||||
select be.id,
|
||||
be.company_id,
|
||||
be.name,
|
||||
be.phone,
|
||||
be.id_card,
|
||||
be.card_no,
|
||||
be.card_id,
|
||||
be.sex,
|
||||
be.duty,
|
||||
be.employee_status,
|
||||
be.del_flag,
|
||||
be.create_time,
|
||||
be.create_by,
|
||||
be.update_time,
|
||||
be.update_by,
|
||||
be.remark,
|
||||
bc.company_name,
|
||||
be.dept_id
|
||||
from zdy_base_employee be
|
||||
left join zdy_base_company bc on be.company_id = bc.id
|
||||
</sql>
|
||||
|
||||
<sql id = "whereZdyEmployeeCardGraph">
|
||||
<if test="cardNo != null and cardNo != ''">
|
||||
and l.card_no = #{cardNo}
|
||||
</if>
|
||||
<if test="openDoor != null">
|
||||
and l.open_door = #{openDoor}
|
||||
</if>
|
||||
<if test="deviceName != null and deviceName != ''">
|
||||
and g.device_name like concat('%', #{deviceName}, '%')
|
||||
</if>
|
||||
<if test="employeeName != null and employeeName != ''">
|
||||
and be.name like concat('%', #{employeeName}, '%')
|
||||
</if>
|
||||
<if test="employeePhone != null and employeePhone != ''">
|
||||
and be.phone = #{employeePhone}
|
||||
</if>
|
||||
<if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
|
||||
and l.create_time between #{params.beginDataTime} and #{params.endDataTime}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<sql id = "whereInZdyEmployeeCardGraph">
|
||||
<if test="cardNo != null and cardNo != ''">
|
||||
and l.card_no = #{cardNo}
|
||||
</if>
|
||||
<if test="openDoor != null">
|
||||
and l.open_door = #{openDoor}
|
||||
</if>
|
||||
<if test="deviceName != null and deviceName != ''">
|
||||
and l.serial in (select serial_no from zdy_device_gate where device_name like concat('%', #{deviceName}, '%') )
|
||||
</if>
|
||||
<if test="employeeName != null and employeeName != ''">
|
||||
and be.name like concat('%', #{employeeName}, '%')
|
||||
</if>
|
||||
<if test="employeePhone != null and employeePhone != ''">
|
||||
and be.phone = #{employeePhone}
|
||||
</if>
|
||||
<if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
|
||||
and l.create_time between #{params.beginDataTime} and #{params.endDataTime}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyBaseEmployeeList" parameterType="ZdyBaseEmployee" resultMap="ZdyBaseEmployeeResult">
|
||||
<include refid="selectZdyBaseEmployeeVo"/>
|
||||
left join sys_dept d on d.dept_id = be.dept_id
|
||||
<where>
|
||||
be.del_flag = 0
|
||||
<if test="companyId != null ">
|
||||
and be.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and be.name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and be.phone = #{phone}
|
||||
</if>
|
||||
<if test="idCard != null and idCard != ''">
|
||||
and be.id_card = #{idCard}
|
||||
</if>
|
||||
<if test="cardNo != null and cardNo != ''">
|
||||
and be.card_no = #{cardNo}
|
||||
</if>
|
||||
<if test="cardId != null ">
|
||||
and be.card_id = #{cardId}
|
||||
</if>
|
||||
<if test="sex != null and sex != ''">
|
||||
and be.sex = #{sex}
|
||||
</if>
|
||||
<if test="duty != null and duty != ''">
|
||||
and be.duty = #{duty}
|
||||
</if>
|
||||
<if test="employeeStatus != null ">
|
||||
and be.employee_status = #{employeeStatus}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyBaseEmployeeById" parameterType="Long"
|
||||
resultMap="ZdyBaseEmployeeResult">
|
||||
<include refid="selectZdyBaseEmployeeVo"/>
|
||||
where be.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyBaseEmployee" parameterType="ZdyBaseEmployee" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_base_employee
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="companyId != null">company_id,
|
||||
</if>
|
||||
<if test="name != null">name,
|
||||
</if>
|
||||
<if test="phone != null">phone,
|
||||
</if>
|
||||
<if test="idCard != null">id_card,
|
||||
</if>
|
||||
<if test="cardNo != null">card_no,
|
||||
</if>
|
||||
<if test="cardId != null">card_id,
|
||||
</if>
|
||||
<if test="sex != null">sex,
|
||||
</if>
|
||||
<if test="duty != null">duty,
|
||||
</if>
|
||||
<if test="employeeStatus != null">employee_status,
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="companyId != null">#{companyId},
|
||||
</if>
|
||||
<if test="name != null">#{name},
|
||||
</if>
|
||||
<if test="phone != null">#{phone},
|
||||
</if>
|
||||
<if test="idCard != null">#{idCard},
|
||||
</if>
|
||||
<if test="cardNo != null">#{cardNo},
|
||||
</if>
|
||||
<if test="cardId != null">#{cardId},
|
||||
</if>
|
||||
<if test="sex != null">#{sex},
|
||||
</if>
|
||||
<if test="duty != null">#{duty},
|
||||
</if>
|
||||
<if test="employeeStatus != null">#{employeeStatus},
|
||||
</if>
|
||||
<if test="delFlag != null">#{delFlag},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyBaseEmployee" parameterType="ZdyBaseEmployee">
|
||||
update zdy_base_employee
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="companyId != null">company_id =
|
||||
#{companyId},
|
||||
</if>
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="phone != null">phone =
|
||||
#{phone},
|
||||
</if>
|
||||
<if test="idCard != null">id_card =
|
||||
#{idCard},
|
||||
</if>
|
||||
<if test="cardNo != null">card_no =
|
||||
#{cardNo},
|
||||
</if>
|
||||
<if test="cardId != null">card_id =
|
||||
#{cardId},
|
||||
</if>
|
||||
<if test="sex != null">sex =
|
||||
#{sex},
|
||||
</if>
|
||||
<if test="duty != null">duty =
|
||||
#{duty},
|
||||
</if>
|
||||
<if test="employeeStatus != null">employee_status =
|
||||
#{employeeStatus},
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag =
|
||||
#{delFlag},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyBaseEmployeeById" parameterType="Long">
|
||||
delete
|
||||
from zdy_base_employee
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyBaseEmployeeByIds" parameterType="String">
|
||||
delete from zdy_base_employee where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="selectEmployeeByIdCardAndPhone" resultMap="ZdyBaseEmployeeResult">
|
||||
<include refid="selectZdyBaseEmployeeVo"/>
|
||||
where be.id_card = #{idCard} and be.phone = #{phone} and be.del_flag = 0 limit 1
|
||||
</select>
|
||||
<select id="selectZdyBaseEmployeeByCardNo" parameterType="String"
|
||||
resultMap="ZdyBaseEmployeeResult">
|
||||
<include refid="selectZdyBaseEmployeeVo"/>
|
||||
where be.card_no = #{cardNo} and del_flag = 0 limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectZdyEmployeeCardGraphList" resultMap="ZdyEmployeeCardGraphResult">
|
||||
SELECT
|
||||
l.create_time AS data_time, l.serial, l.card_no, l.open_door, g.device_name, be.name, be.phone, l.employee_id
|
||||
FROM zdy_device_gate_card_log l
|
||||
LEFT JOIN zdy_base_employee be ON be.id = l.employee_id
|
||||
LEFT JOIN zdy_device_gate g ON g.serial_no = l.serial
|
||||
left join sys_dept d on d.dept_id = be.dept_id
|
||||
WHERE l.type = '0' and l.employee_id is not null and be.id is not null and g.del_flag != 1
|
||||
<include refid="whereZdyEmployeeCardGraph"/>
|
||||
${params.dataScope}
|
||||
order by l.id desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,204 @@
|
||||
<?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.zhwl.base.mapper.ZdyBaseOnlinePlatformMapper">
|
||||
|
||||
<resultMap type="ZdyBaseOnlinePlatform" id="ZdyBaseOnlinePlatformResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="appid" column="appid"/>
|
||||
<result property="appName" column="app_name"/>
|
||||
<result property="scenicId" column="scenic_id"/>
|
||||
<result property="serviceChannel" column="service_channel"/>
|
||||
<result property="bodyInfo" column="body_info"/>
|
||||
<result property="authenticationStatus" column="authentication_status"/>
|
||||
<result property="registrationStatus" column="registration_status"/>
|
||||
<result property="authorizationTime" column="authorization_time"/>
|
||||
<result property="qrCode" column="qr_code"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyBaseOnlinePlatformVo">
|
||||
select id, appid,scenic_id, app_name, service_channel, body_info, authentication_status, registration_status, authorization_time, qr_code, image, create_time, create_by, update_time, update_by, remark
|
||||
from zdy_base_online_platform
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyBaseOnlinePlatformList" parameterType="ZdyBaseOnlinePlatform" resultMap="ZdyBaseOnlinePlatformResult">
|
||||
<include refid="selectZdyBaseOnlinePlatformVo"/>
|
||||
<where>
|
||||
<if test="appid != null and appid != ''">
|
||||
and appid = #{appid}
|
||||
</if>
|
||||
<if test="appName != null and appName != ''">
|
||||
and app_name like concat('%', #{appName}, '%')
|
||||
</if>
|
||||
<if test="serviceChannel != null and serviceChannel != ''">
|
||||
and service_channel = #{serviceChannel}
|
||||
</if>
|
||||
<if test="bodyInfo != null and bodyInfo != ''">
|
||||
and body_info = #{bodyInfo}
|
||||
</if>
|
||||
<if test="authenticationStatus != null and authenticationStatus != ''">
|
||||
and authentication_status = #{authenticationStatus}
|
||||
</if>
|
||||
<if test="registrationStatus != null ">
|
||||
and registration_status = #{registrationStatus}
|
||||
</if>
|
||||
<if test="authorizationTime != null ">
|
||||
and authorization_time = #{authorizationTime}
|
||||
</if>
|
||||
<if test="qrCode != null and qrCode != ''">
|
||||
and qr_code = #{qrCode}
|
||||
</if>
|
||||
<if test="image != null and image != ''">
|
||||
and image = #{image}
|
||||
</if>
|
||||
<if test="scenicId != null">
|
||||
and scenic_id = #{scenicId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyBaseOnlinePlatformById" parameterType="Long"
|
||||
resultMap="ZdyBaseOnlinePlatformResult">
|
||||
<include refid="selectZdyBaseOnlinePlatformVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyBaseOnlinePlatform" parameterType="ZdyBaseOnlinePlatform" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_base_online_platform
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="appid != null">appid,
|
||||
</if>
|
||||
<if test="appName != null">app_name,
|
||||
</if>
|
||||
<if test="serviceChannel != null">service_channel,
|
||||
</if>
|
||||
<if test="bodyInfo != null">body_info,
|
||||
</if>
|
||||
<if test="authenticationStatus != null">authentication_status,
|
||||
</if>
|
||||
<if test="registrationStatus != null">registration_status,
|
||||
</if>
|
||||
<if test="authorizationTime != null">authorization_time,
|
||||
</if>
|
||||
<if test="qrCode != null">qr_code,
|
||||
</if>
|
||||
<if test="image != null">image,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="appid != null">#{appid},
|
||||
</if>
|
||||
<if test="appName != null">#{appName},
|
||||
</if>
|
||||
<if test="serviceChannel != null">#{serviceChannel},
|
||||
</if>
|
||||
<if test="bodyInfo != null">#{bodyInfo},
|
||||
</if>
|
||||
<if test="authenticationStatus != null">#{authenticationStatus},
|
||||
</if>
|
||||
<if test="registrationStatus != null">#{registrationStatus},
|
||||
</if>
|
||||
<if test="authorizationTime != null">#{authorizationTime},
|
||||
</if>
|
||||
<if test="qrCode != null">#{qrCode},
|
||||
</if>
|
||||
<if test="image != null">#{image},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="scenicId != null">#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyBaseOnlinePlatform" parameterType="ZdyBaseOnlinePlatform">
|
||||
update zdy_base_online_platform
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="appid != null">appid =
|
||||
#{appid},
|
||||
</if>
|
||||
<if test="appName != null">app_name =
|
||||
#{appName},
|
||||
</if>
|
||||
<if test="serviceChannel != null">service_channel =
|
||||
#{serviceChannel},
|
||||
</if>
|
||||
<if test="bodyInfo != null">body_info =
|
||||
#{bodyInfo},
|
||||
</if>
|
||||
<if test="authenticationStatus != null">authentication_status =
|
||||
#{authenticationStatus},
|
||||
</if>
|
||||
<if test="registrationStatus != null">registration_status =
|
||||
#{registrationStatus},
|
||||
</if>
|
||||
<if test="authorizationTime != null">authorization_time =
|
||||
#{authorizationTime},
|
||||
</if>
|
||||
<if test="qrCode != null">qr_code =
|
||||
#{qrCode},
|
||||
</if>
|
||||
<if test="image != null">image =
|
||||
#{image},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyBaseOnlinePlatformById" parameterType="Long">
|
||||
delete from zdy_base_online_platform where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyBaseOnlinePlatformByIds" parameterType="String">
|
||||
delete from zdy_base_online_platform where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,132 @@
|
||||
<?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.zhwl.base.mapper.ZdyBasePackageMapper">
|
||||
|
||||
<resultMap type="ZdyBasePackage" id="ZdyBasePackageResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="version" column="version"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateType" column="update_type"/>
|
||||
<result property="updatePackage" column="update_package"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyBasePackageVo">
|
||||
select id, version, content, create_time, create_by, update_time, update_by,update_type,update_package
|
||||
from zdy_base_package
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyBasePackageList" parameterType="ZdyBasePackage" resultMap="ZdyBasePackageResult">
|
||||
<include refid="selectZdyBasePackageVo"/>
|
||||
<where>
|
||||
<if test="version != null and version != ''">
|
||||
and version = #{version}
|
||||
</if>
|
||||
<if test="updateType != null and updateType != ''">
|
||||
and update_type = #{updateType}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyBasePackageById" parameterType="Long"
|
||||
resultMap="ZdyBasePackageResult">
|
||||
<include refid="selectZdyBasePackageVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyBasePackage" parameterType="ZdyBasePackage" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_base_package
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="version != null and version != ''">version,
|
||||
</if>
|
||||
<if test="content != null">content,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="updateType != null">update_type,
|
||||
</if>
|
||||
<if test="updatePackage != null">update_package,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="version != null and version != ''">#{version},
|
||||
</if>
|
||||
<if test="content != null">#{content},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateType != null">#{updateType},
|
||||
</if>
|
||||
<if test="updatePackage != null">#{updatePackage},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyBasePackage" parameterType="ZdyBasePackage">
|
||||
update zdy_base_package
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="version != null and version != ''">version =
|
||||
#{version},
|
||||
</if>
|
||||
<if test="content != null">content =
|
||||
#{content},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateType != null">update_type =
|
||||
#{updateType},
|
||||
</if>
|
||||
<if test="updatePackage != null">update_package =
|
||||
#{updatePackage},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyBasePackageById" parameterType="Long">
|
||||
delete
|
||||
from zdy_base_package
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyBasePackageByIds" parameterType="String">
|
||||
delete from zdy_base_package where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="selectZdyBasePackage" resultMap="ZdyBasePackageResult">
|
||||
<include refid="selectZdyBasePackageVo"/>
|
||||
where update_type = #{updateType} and version = #{version} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,187 @@
|
||||
<?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.zhwl.base.mapper.ZdyHolidayVacationsMapper">
|
||||
|
||||
<resultMap type="ZdyHolidayVacations" id="ZdyHolidayVacationsResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="holidayName" column="holiday_name"/>
|
||||
<result property="holidayType" column="holiday_type"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="holidayDict" column="holiday_dict"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyHolidayVacationsVo">
|
||||
select id,
|
||||
holiday_name,
|
||||
holiday_type,
|
||||
start_time,
|
||||
end_time,
|
||||
create_time,
|
||||
create_by,
|
||||
update_time,
|
||||
update_by,
|
||||
remark,
|
||||
holiday_dict
|
||||
from zdy_holiday_vacations
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyHolidayVacationsList" parameterType="ZdyHolidayVacations"
|
||||
resultMap="ZdyHolidayVacationsResult">
|
||||
<include refid="selectZdyHolidayVacationsVo"/>
|
||||
<where>
|
||||
<if test="holidayName != null and holidayName != ''">
|
||||
and holiday_name like concat('%', #{holidayName}, '%')
|
||||
</if>
|
||||
<if test="holidayType != null and holidayType != ''">
|
||||
and holiday_type = #{holidayType}
|
||||
</if>
|
||||
<if test="startTime != null ">
|
||||
and start_time = #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null ">
|
||||
and end_time = #{endTime}
|
||||
</if>
|
||||
<if test="rangeStartDateTime != null ">
|
||||
and start_time >= #{rangeStartDateTime}
|
||||
</if>
|
||||
<if test="rangeEndDateTime != null ">
|
||||
and start_time <= #{rangeEndDateTime}
|
||||
</if>
|
||||
<if test="holidayDict != null ">
|
||||
and holiday_dict = #{holidayDict}
|
||||
</if>
|
||||
<if test="nowDate != null ">
|
||||
and #{nowDate} <= end_time
|
||||
</if>
|
||||
</where>
|
||||
order by start_time asc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyHolidayVacationsById" parameterType="Long"
|
||||
resultMap="ZdyHolidayVacationsResult">
|
||||
<include refid="selectZdyHolidayVacationsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyHolidayVacations" parameterType="ZdyHolidayVacations" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_holiday_vacations
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="holidayName != null and holidayName != ''">holiday_name,
|
||||
</if>
|
||||
<if test="holidayType != null">holiday_type,
|
||||
</if>
|
||||
<if test="startTime != null">start_time,
|
||||
</if>
|
||||
<if test="endTime != null">end_time,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
<if test="holidayDict != null">holiday_dict,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="holidayName != null and holidayName != ''">#{holidayName},
|
||||
</if>
|
||||
<if test="holidayType != null">#{holidayType},
|
||||
</if>
|
||||
<if test="startTime != null">#{startTime},
|
||||
</if>
|
||||
<if test="endTime != null">#{endTime},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="holidayDict != null">#{holidayDict},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyHolidayVacations" parameterType="ZdyHolidayVacations">
|
||||
update zdy_holiday_vacations
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="holidayName != null and holidayName != ''">holiday_name =
|
||||
#{holidayName},
|
||||
</if>
|
||||
<if test="holidayType != null">holiday_type =
|
||||
#{holidayType},
|
||||
</if>
|
||||
<if test="startTime != null">start_time =
|
||||
#{startTime},
|
||||
</if>
|
||||
<if test="endTime != null">end_time =
|
||||
#{endTime},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="holidayDict != null">holiday_dict =
|
||||
#{holidayDict},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyHolidayVacationsById" parameterType="Long">
|
||||
delete
|
||||
from zdy_holiday_vacations
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyHolidayVacationsByIds" parameterType="String">
|
||||
delete from zdy_holiday_vacations where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteZdyHolidayVacationsByHolidayType">
|
||||
delete
|
||||
from zdy_holiday_vacations
|
||||
where holiday_type in (1,2)
|
||||
</delete>
|
||||
|
||||
<select id="selectByQueryDate" resultMap="ZdyHolidayVacationsResult">
|
||||
<include refid="selectZdyHolidayVacationsVo"/>
|
||||
<![CDATA[
|
||||
where start_time <= DATE_FORMAT(#{queryDate}, '%Y-%m-%d')
|
||||
and end_time >= DATE_FORMAT(#{queryDate}, '%Y-%m-%d')
|
||||
]]>
|
||||
and holiday_type in (1,2)
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user