48 lines
1.3 KiB
XML
48 lines
1.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.hx.slj.modules.sys.dao.UpdateDao">
|
|
|
|
<!-- start checkStatus() -->
|
|
<update id="checkStatus" statementType="STATEMENT">
|
|
UPDATE
|
|
${tableName}
|
|
SET
|
|
<if test="stauts != null and stauts != ''">
|
|
FILE_STATUS = ${status}
|
|
</if>
|
|
<if test="checkBy != null and checkBy != ''">
|
|
,CHECK_BY =${checkBy}
|
|
</if>
|
|
<if test="reason != null and reason != ''">
|
|
,CHECK_REASON = ${reason}
|
|
</if>
|
|
<if test="checkDate != null and checkDate != ''">
|
|
,CHECK_DATE = ${checkDate}
|
|
</if>
|
|
WHERE
|
|
id = ${id}
|
|
</update>
|
|
<!-- end checkStatus() -->
|
|
|
|
<!-- start getSysTime() -->
|
|
<select id="getSysTime" resultType="Date">
|
|
select sysdate from dual
|
|
</select>
|
|
<!-- end getSysTime() -->
|
|
|
|
<update id="delete">
|
|
DELETE FROM sys_area
|
|
WHERE id = #{id} OR parent_ids LIKE
|
|
<if test="dbName == 'oracle'">'%,'||#{id}||',%'</if>
|
|
<if test="dbName == 'mysql'">CONCAT('%,', #{id}, ',%')</if>
|
|
</update>
|
|
|
|
<update id="deleteByLogic">
|
|
UPDATE sys_area SET
|
|
del_flag = #{DEL_FLAG_DELETE}
|
|
WHERE id = #{id} OR parent_ids LIKE
|
|
<if test="dbName == 'oracle'">'%,'||#{id}||',%'</if>
|
|
<if test="dbName == 'mysql'">CONCAT('%,', #{id}, ',%')</if>
|
|
</update>
|
|
|
|
</mapper> |