|
|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ktg.mes.md.mapper.MdWorkshopMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="MdWorkshop" id="MdWorkshopResult">
|
|
|
<result property="workshopId" column="workshop_id" />
|
|
|
<result property="workshopCode" column="workshop_code" />
|
|
|
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectMdWorkshopList" parameterType="MdWorkshop" resultMap="MdWorkshopResult">
|
|
|
<include refid="selectMdWorkshopVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="workshopCode != null and workshopCode != ''"> and workshop_code = #{workshopCode}</if>
|
|
|
<if test="workshopName != null and workshopName != ''"> and workshop_name like concat('%', #{workshopName}, '%')</if>
|
|
|
<if test="area != null "> and area = #{area}</if>
|
|
|
@@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectMdWorkshopByWorkshopId" parameterType="Long" resultMap="MdWorkshopResult">
|
|
|
<include refid="selectMdWorkshopVo"/>
|
|
|
where workshop_id = #{workshopId}
|
|
|
@@ -108,15 +108,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</trim>
|
|
|
where workshop_id = #{workshopId}
|
|
|
</update>
|
|
|
+ <update id="updateMdWorkshopJoin" parameterType="MdWorkshop">
|
|
|
+ update is_hardware
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="workshopCode != null and workshopCode != ''">workshop_code = #{workshopCode},</if>
|
|
|
+ <if test="workshopName != null and workshopName != ''">workshop_name = #{workshopName},</if>
|
|
|
+ </trim>
|
|
|
+ where workshop_id = #{workshopId}
|
|
|
+ </update>
|
|
|
|
|
|
<delete id="deleteMdWorkshopByWorkshopId" parameterType="Long">
|
|
|
delete from md_workshop where workshop_id = #{workshopId}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteMdWorkshopByWorkshopIds" parameterType="String">
|
|
|
- delete from md_workshop where workshop_id in
|
|
|
+ delete from md_workshop where workshop_id in
|
|
|
<foreach item="workshopId" collection="array" open="(" separator="," close=")">
|
|
|
#{workshopId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-</mapper>
|
|
|
+</mapper>
|