You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weaver-hrm-organization/src/com/engine/organization/mapper/codesetting/CodeRuleMapper.xml

76 lines
2.4 KiB
XML

3 years ago
<?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.engine.organization.mapper.codesetting.CodeRuleMapper">
<select id="getCodeRuleId" resultType="long">
select t.id
from JCL_CODERULE t
where serial_type = #{serialType}
</select>
<update id="updateCodeRule" parameterType="com.engine.organization.entity.codesetting.po.CodeRulePO">
update JCL_CODERULE
<set>
serial_enable = #{serialEnable}
oneself_type = #{oneselfType}
creator=#{creator},
update_time=#{updateTime},
</set>
WHERE id = #{codeRuleId} AND delete_type = 0
</update>
<insert id="insertCodeRule" parameterType="com.engine.organization.entity.codesetting.po.CodeRulePO" keyProperty="id"
keyColumn="id" useGeneratedKeys="true">
INSERT INTO JCL_CODERULE
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="creator != null">
creator,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="serial_type != null ">
serial_type,
</if>
<if test="serial_enable != null ">
serial_enable,
</if>
<if test="oneself_type != null ">
oneself_type,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="creator != null">
#{creator},
</if>
<if test="deleteType != null">
#{deleteType},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="serialType != null ">
serialType,
</if>
<if test="serialEnable != null ">
serialEnable,
</if>
<if test="oneselfType != null ">
oneselfType,
</if>
</trim>
</insert>
</mapper>