79 lines
3.8 KiB
XML
79 lines
3.8 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.evo.personnelMatters.mapper.RzHolidayMapper">
|
|
|
|
<resultMap type="RzHoliday" id="RzHolidayResult">
|
|
<result property="id" column="id" />
|
|
<!-- <result property="holiday" column="holiday" />-->
|
|
<result property="remarks" column="remarks" />
|
|
<result property="specialFlag" column="special_flag" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectRzHolidayVo">
|
|
select id, holiday, remarks,special_flag,del_flag, create_by, create_time, update_by, update_time from bs_holidays
|
|
</sql>
|
|
|
|
<select id="selectRzHolidayList" parameterType="RzHoliday" resultMap="RzHolidayResult">
|
|
<include refid="selectRzHolidayVo"/>
|
|
<where>
|
|
del_flag = '0'
|
|
<!-- <if test="holiday != null "> and holiday = #{holiday}</if> -->
|
|
<if test="remarks != null "> and remarks = #{remarks}</if>
|
|
<if test="specialFlag != null "> and special_flag = #{specialFlag}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectRzHolidayById" parameterType="Long" resultMap="RzHolidayResult">
|
|
<include refid="selectRzHolidayVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertRzHoliday" parameterType="RzHoliday" useGeneratedKeys="true" keyProperty="id">
|
|
insert into bs_holidays
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="holiday != null">holiday,</if>
|
|
<if test="remarks != null">remarks,</if>
|
|
<if test="specialFlag != null">special_flag,</if>
|
|
<if test="delFlag != null">del_flag,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="holiday != null">#{holiday},</if>
|
|
<if test="remarks != null">#{remarks},</if>
|
|
<if test="specialFlag != null">#{specialFlag},</if>
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateRzHoliday" parameterType="RzHoliday">
|
|
update bs_holidays
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="holiday != null">holiday = #{holiday},</if>
|
|
<if test="remarks != null">remarks = #{remarks},</if>
|
|
<if test="specialFlag != null">special_flag = #{specialFlag},</if>
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
|
|
</mapper>
|