78 lines
2.5 KiB
XML
78 lines
2.5 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.lz.modules.flow.dao.ResultDimensionMapper">
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.lz.modules.flow.entity.ResultDimension">
|
|
<id column="id" property="id"/>
|
|
<result column="is_delete" property="isDelete"/>
|
|
<result column="gmt_create" property="gmtCreate"/>
|
|
<result column="gmt_modified" property="gmtModified"/>
|
|
<result column="name" property="name"/>
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectResultDimensionById" resultType="ResultDimension" >
|
|
select * from lz_result_dimension where id=#{id} and is_delete = 0 limit 1
|
|
</select>
|
|
|
|
|
|
<insert id="insertResultDimension" parameterType="ResultDimension" useGeneratedKeys="true" keyProperty="id" >
|
|
insert into lz_result_dimension(
|
|
<if test="name != null">name, </if>
|
|
is_delete,
|
|
gmt_create,
|
|
gmt_modified
|
|
)values(
|
|
<if test="name != null">#{ name}, </if>
|
|
0,
|
|
now(),
|
|
now()
|
|
)
|
|
</insert>
|
|
|
|
|
|
<update id="updateResultDimensionById" parameterType="ResultDimension" >
|
|
update
|
|
lz_result_dimension
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
|
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
|
<if test="name != null">name = #{name}</if>
|
|
</trim>
|
|
,gmt_modified = now()
|
|
where id = #{id}
|
|
</update>
|
|
|
|
|
|
<update id="updateCoverResultDimensionById" parameterType="ResultDimension" >
|
|
update
|
|
lz_result_dimension
|
|
set
|
|
is_delete = #{isDelete},
|
|
gmt_create = #{gmtCreate},
|
|
name = #{name}
|
|
,gmt_modified = now()
|
|
where id = #{id}
|
|
</update>
|
|
|
|
|
|
<update id="deleteResultDimensionById" parameterType="java.lang.Long">
|
|
update lz_result_dimension set is_delete = 1 where id=#{id} limit 1
|
|
</update>
|
|
|
|
<select id="selectResultDimensionAll" resultType="ResultDimension" >
|
|
select * from lz_result_dimension where is_delete = 0
|
|
</select>
|
|
|
|
</mapper>
|
|
|