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

70 lines
2.7 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 INTO `text`.`engine_maintenance` (`name`, `type`, `scope`, `engine_code`, `is_activate`, `status`,
`description`, `create_by`, `create_time`, `update_by`, `update_time`,
`remark`, `version_id`)
VALUES (#{name}, #{type}, #{scope}, #{engineCode}, #{isActivate}, #{status}, #{description}, #{createTime},
#{createTime}, #{updateTime}, #{updateTime}, #{remark}, #{versionId});
</insert>
<!-- <update id="forbiddenEngine">-->
<!-- update engine_maintenance-->
<!-- set status = 2-->
<!-- where id = #{id}-->
<!-- </update>-->
<!-- <update id="onEngine">-->
<!-- update engine_maintenance-->
<!-- set status = 1-->
<!-- where id = #{id}-->
<!-- </update>-->
<update id="closeEngine">
update engine_maintenance
set isActivate = 2
where id = #{id}
</update>
<update id="activateEngine">
update engine_maintenance
set isActivate = 1
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="select" resultType="com.muyu.domain.EngineMaintenance">
select *
from engine_maintenance
where id = #{id}
</select>
</mapper>