You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
6.5 KiB
XML
134 lines
6.5 KiB
XML
1 year ago
|
<?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.os.mes.base.mapper.BaseTeamMembersMapper">
|
||
|
|
||
|
<resultMap type="BaseTeamMembers" id="BaseTeamMembersResult">
|
||
|
<result property="objId" column="obj_id"/>
|
||
|
<result property="teamCode" column="team_code"/>
|
||
|
<result property="teamName" column="team_name"/>
|
||
|
<result property="teamHead" column="team_head"/>
|
||
|
<result property="stationCode" column="station_code"/>
|
||
|
<result property="classes" column="classes"/>
|
||
|
<result property="startTime" column="start_time"/>
|
||
|
<result property="endTime" column="end_time"/>
|
||
|
<result property="dineTime" column="dine_time"/>
|
||
|
<result property="isFlag" column="is_flag"/>
|
||
|
<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="machineCode" column="machine_code"/>
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectBaseTeamMembersVo">
|
||
|
select obj_id,
|
||
|
team_code,
|
||
|
team_name,
|
||
|
team_head,
|
||
|
station_code,
|
||
|
classes,
|
||
|
start_time,
|
||
|
end_time,
|
||
|
dine_time,
|
||
|
is_flag,
|
||
|
create_by,
|
||
|
create_time,
|
||
|
update_by,
|
||
|
update_time,
|
||
|
machine_code
|
||
|
from base_team_members
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectBaseTeamMembersList" parameterType="BaseTeamMembers" resultMap="BaseTeamMembersResult">
|
||
|
<include refid="selectBaseTeamMembersVo"/>
|
||
|
<where>
|
||
|
<if test="teamCode != null and teamCode != ''">and team_code = #{teamCode}</if>
|
||
|
<if test="teamName != null and teamName != ''">and team_name like concat('%', #{teamName}, '%')</if>
|
||
|
<if test="teamHead != null and teamHead != ''">and team_head = #{teamHead}</if>
|
||
|
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</if>
|
||
|
<if test="classes != null and classes != ''">and classes = #{classes}</if>
|
||
|
<if test="startTime != null and startTime != ''">and start_time = #{startTime}</if>
|
||
|
<if test="endTime != null and endTime != ''">and end_time = #{endTime}</if>
|
||
|
<if test="dineTime != null and dineTime != ''">and dine_time = #{dineTime}</if>
|
||
|
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if>
|
||
|
<if test="machineCode != null and machineCode != ''">and machine_code = #{machineCode}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectBaseTeamMembersByObjId" parameterType="Long" resultMap="BaseTeamMembersResult">
|
||
|
<include refid="selectBaseTeamMembersVo"/>
|
||
|
where obj_id = #{objId}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertBaseTeamMembers" parameterType="BaseTeamMembers" useGeneratedKeys="true" keyProperty="objId">
|
||
|
insert into base_team_members
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="teamCode != null">team_code,</if>
|
||
|
<if test="teamName != null">team_name,</if>
|
||
|
<if test="teamHead != null">team_head,</if>
|
||
|
<if test="stationCode != null">station_code,</if>
|
||
|
<if test="classes != null">classes,</if>
|
||
|
<if test="startTime != null">start_time,</if>
|
||
|
<if test="endTime != null">end_time,</if>
|
||
|
<if test="dineTime != null">dine_time,</if>
|
||
|
<if test="isFlag != null">is_flag,</if>
|
||
|
<if test="createBy != null">create_by,</if>
|
||
|
<if test="createTime != null">create_time,</if>
|
||
|
<if test="updateBy != null">update_by,</if>
|
||
|
<if test="updateTime != null">update_time,</if>
|
||
|
<if test="machineCode != null">machine_code,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="teamCode != null">#{teamCode},</if>
|
||
|
<if test="teamName != null">#{teamName},</if>
|
||
|
<if test="teamHead != null">#{teamHead},</if>
|
||
|
<if test="stationCode != null">#{stationCode},</if>
|
||
|
<if test="classes != null">#{classes},</if>
|
||
|
<if test="startTime != null">#{startTime},</if>
|
||
|
<if test="endTime != null">#{endTime},</if>
|
||
|
<if test="dineTime != null">#{dineTime},</if>
|
||
|
<if test="isFlag != null">#{isFlag},</if>
|
||
|
<if test="createBy != null">#{createBy},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
<if test="machineCode != null">#{machineCode},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateBaseTeamMembers" parameterType="BaseTeamMembers">
|
||
|
update base_team_members
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="teamCode != null">team_code = #{teamCode},</if>
|
||
|
<if test="teamName != null">team_name = #{teamName},</if>
|
||
|
<if test="teamHead != null">team_head = #{teamHead},</if>
|
||
|
<if test="stationCode != null">station_code = #{stationCode},</if>
|
||
|
<if test="classes != null">classes = #{classes},</if>
|
||
|
<if test="startTime != null">start_time = #{startTime},</if>
|
||
|
<if test="endTime != null">end_time = #{endTime},</if>
|
||
|
<if test="dineTime != null">dine_time = #{dineTime},</if>
|
||
|
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
<if test="machineCode != null">machine_code = #{machineCode},</if>
|
||
|
</trim>
|
||
|
where obj_id = #{objId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteBaseTeamMembersByObjId" parameterType="Long">
|
||
|
delete
|
||
|
from base_team_members
|
||
|
where obj_id = #{objId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteBaseTeamMembersByObjIds" parameterType="String">
|
||
|
delete from base_team_members where obj_id in
|
||
|
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||
|
#{objId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|