cloud-etl-engine/cloud-etl-server/src/main/resources/mapper/EngineMapper.xml

82 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.muyu.mapper.EngineMapper">
<insert id="add">
insert
engine_maintenance values
(
0,
#{name},
#{engineCode},
#{description},
#{type},
#{scope},
#{status},
#{isActivate},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark}
)
</insert>
<update id="forbiddenEngine">
update engine_maintenance
set status = 1
where id = #{id}
</update>
<update id="onEngine">
update engine_maintenance
set status = 2
where id = #{id}
</update>
<update id="closeEngine">
update engine_maintenance
set status = 3
where id = #{id}
</update>
<update id="activateEngine">
update engine_maintenance
set status = 4
where id = #{id}
</update>
<delete id="deletes">
delete
from engine_maintenance
where id = #{id}
</delete>
<select id="getMaintenanceList" resultType="com.muyu.domain.EngineMaintenance">
select * from engine_maintenance left join engine_version on engine_maintenance.version_id = engine_version.id
<where>
<if test="name != null and name != ''">
and name like concat('%',#{name},'%')
</if>
<if test="engineCode != null and engineCode != ''">
and engine_code = #{engineCode}
</if>
<if test="description != null and description != ''">
and description = #{description}
</if>
<if test="isActivate != null and isActivate != ''">
and is_activate = #{isActivate}
</if>
<if test="type !=null and type != ''">
and type = #{type}
</if>
<if test="scope !=null and scope != ''">
and scope = #{scope}
</if>
<if test="status !=null and status != ''">
and status = #{status}
</if>
</where>
</select>
<select id="selectVersionList" resultType="com.muyu.domain.EngineMaintenance">
select * from engine_maintenance left join engine_version on engine_maintenance.version_id = engine_version.id
where version_id = #{versionId}
</select>
</mapper>