<?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.station.mapper.MjTeamMapper">
|
|
<resultMap type="MjTeam" id="MjTeamResult">
|
<result property="id" column="id" />
|
<result property="teamName" column="team_name" />
|
<result property="teamNumber" column="team_number" />
|
<result property="areaNumber" column="area_number" />
|
<result property="descriptions" column="descriptions" />
|
<result property="equipmentUpdateStatus" column="equipment_update_status" />
|
<result property="createTime" column="create_time" />
|
<result property="updateTime" column="update_time" />
|
<result property="createBy" column="create_by" />
|
<result property="updateBy" column="update_by" />
|
<result property="delFlag" column="del_flag" />
|
</resultMap>
|
|
<sql id="selectMjTeamVo">
|
select id, team_name, team_number, area_number, descriptions, equipment_update_status, create_time, update_time, create_by, update_by, del_flag from mj_team
|
</sql>
|
|
<select id="selectMjTeamList" parameterType="MjTeam" resultMap="MjTeamResult">
|
<include refid="selectMjTeamVo"/>
|
<where>
|
<if test="id != null and id != ''">id = #{id}</if>
|
<if test="teamName != null and teamName != ''"> and team_name like concat('%', #{teamName}, '%')</if>
|
<if test="teamNumber != null "> and team_number = #{teamNumber}</if>
|
<if test="areaNumber != null "> and area_number = #{areaNumber}</if>
|
<if test="descriptions != null and descriptions != ''"> and descriptions = #{descriptions}</if>
|
<if test="equipmentUpdateStatus != null "> and equipment_update_status = #{equipmentUpdateStatus}</if>
|
</where>
|
</select>
|
|
<select id="selectMjTeamById" parameterType="String" resultMap="MjTeamResult">
|
<include refid="selectMjTeamVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="getName" resultType="java.lang.String">
|
select team_name from mj_team where id = #{orderId}
|
</select>
|
|
<insert id="insertMjTeam" parameterType="MjTeam">
|
insert into mj_team
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="teamName != null">team_name,</if>
|
<if test="teamNumber != null">team_number,</if>
|
<if test="areaNumber != null">area_number,</if>
|
<if test="descriptions != null">descriptions,</if>
|
<if test="equipmentUpdateStatus != null">equipment_update_status,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="delFlag != null">del_flag,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="teamName != null">#{teamName},</if>
|
<if test="teamNumber != null">#{teamNumber},</if>
|
<if test="areaNumber != null">#{areaNumber},</if>
|
<if test="descriptions != null">#{descriptions},</if>
|
<if test="equipmentUpdateStatus != null">#{equipmentUpdateStatus},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
</trim>
|
</insert>
|
|
<update id="updateMjTeam" parameterType="MjTeam">
|
update mj_team
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="teamName != null">team_name = #{teamName},</if>
|
<if test="teamNumber != null">team_number = #{teamNumber},</if>
|
<if test="areaNumber != null">area_number = #{areaNumber},</if>
|
<if test="descriptions != null">descriptions = #{descriptions},</if>
|
<if test="equipmentUpdateStatus != null">equipment_update_status = #{equipmentUpdateStatus},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteMjTeamById" parameterType="String">
|
delete from mj_team where id = #{id}
|
</delete>
|
|
<delete id="deleteMjTeamByIds" parameterType="String">
|
delete from mj_team where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|