55 lines
2.4 KiB
XML
55 lines
2.4 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.ruoyi.airline.mapper.AirlineFileGroupInfoMapper">
|
||
|
|
|
||
|
|
<!-- 结果映射 -->
|
||
|
|
<resultMap type="com.ruoyi.airline.mapper.entity.AirlineFileGroupInfoEntity" id="AirlineFileGroupInfoResult">
|
||
|
|
<id property="id" column="id" />
|
||
|
|
<result property="groupId" column="group_id" />
|
||
|
|
<result property="airlineId" column="airline_id" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
<result property="updateBy" column="update_by" />
|
||
|
|
<result property="updateTime" column="update_time" />
|
||
|
|
<result property="delFlag" column="del_flag" />
|
||
|
|
<result property="deletedBy" column="deleted_by" />
|
||
|
|
<result property="deletedTime" column="deleted_time" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<!-- 查询分组详情列表 -->
|
||
|
|
<select id="selectGroupList" parameterType="com.ruoyi.airline.mapper.entity.AirlineFileGroupInfoEntity" resultMap="AirlineFileGroupInfoResult">
|
||
|
|
select id, group_id, airline_id, create_by, create_time, update_by, update_time, del_flag, deleted_by, deleted_time
|
||
|
|
from airline_file_group_info
|
||
|
|
where del_flag = 0
|
||
|
|
<if test="groupId != null">
|
||
|
|
and group_id = #{groupId}
|
||
|
|
</if>
|
||
|
|
<if test="airlineId != null">
|
||
|
|
and airline_id = #{airlineId}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!-- 删除分组详情(软删除) -->
|
||
|
|
<update id="deleteGroupInfo" parameterType="com.ruoyi.airline.mapper.entity.AirlineFileGroupInfoEntity">
|
||
|
|
update airline_file_group_info
|
||
|
|
set del_flag = 1,
|
||
|
|
deleted_by = #{deletedBy},
|
||
|
|
deleted_time = #{deletedTime}
|
||
|
|
where id = #{id}
|
||
|
|
<if test="groupId != null">
|
||
|
|
and group_id = #{groupId}
|
||
|
|
</if>
|
||
|
|
<if test="airlineId != null">
|
||
|
|
and airline_id = #{airlineId}
|
||
|
|
</if>
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<!-- 保存分组详情 -->
|
||
|
|
<insert id="save" parameterType="com.ruoyi.airline.mapper.entity.AirlineFileGroupInfoEntity" useGeneratedKeys="true" keyProperty="id">
|
||
|
|
insert into airline_file_group_info (group_id, airline_id, create_by, create_time, update_by, update_time, del_flag)
|
||
|
|
values (#{groupId}, #{airlineId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, 0)
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
</mapper>
|