From 22899f74279a47f4ec79e1325f8489d948ced005 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 15 九月 2023 17:24:44 +0800
Subject: [PATCH] 修改2.0 9.15
---
standard-server/src/main/resources/mapper/MbomMapper.xml | 53 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/standard-server/src/main/resources/mapper/MbomMapper.xml b/standard-server/src/main/resources/mapper/MbomMapper.xml
index 4a312a6..341494c 100644
--- a/standard-server/src/main/resources/mapper/MbomMapper.xml
+++ b/standard-server/src/main/resources/mapper/MbomMapper.xml
@@ -31,19 +31,52 @@
</resultMap>
<select id="selectAllMbom" resultMap="oneMap">
select m.id mid,
- m.name mname,
- unit,
- num,
- specifications,
- t.name tname,
- father
+ m.name mname,
+ unit,
+ num,
+ specifications,
+ t.name tname,
+ father
from mom_ocean.mbom m
- left join mom_ocean.technology t on m.technology_id = t.id
+ left join mom_ocean.technology t on m.technology_id = t.id
where m.state = 1
- and m.version = #{version}
- and specifications_id = #{specificationsId}
+ and m.version = #{version}
+ and specifications_id = #{specificationsId}
<if test="message!=null and message!=''">
- and m.name like concat('%',#{message},'%')
+ and t.name like concat('%',#{message},'%')
</if>
</select>
+
+ <!--鏍规嵁鍨嬪彿id鏌ヨ璇ュ瀷鍙蜂笅鎵�鏈夊伐鑹洪渶瑕佺殑鐗╂枡娓呭崟-->
+ <select id="selAllBySpeId" resultType="com.yuanchu.mom.pojo.Mbom">
+ select *
+ from mom_ocean.mbom
+ where state = 1
+ and version = #{version}
+ and technology_id in (select id
+ from mom_ocean.technology
+ where technology.state = 1
+ and specifications_id = #{specificationsId})
+ </select>
+
+ <!--鏍规嵁宸ヨ壓璺嚎id鍒犻櫎鐗╂枡娓呭崟-->
+ <update id="delMbomByTecId">
+ update mom_ocean.mbom
+ set state=0
+ where technology_id = #{id}
+ </update>
+
+ <!--鏍规嵁宸ヨ壓璺嚎id鎵归噺鍒犻櫎-->
+ <update id="delAllByTecId">
+ update mom_ocean.mbom
+ set state=0
+ where technology_id in (${ids})
+ </update>
+
+ <!--鏍规嵁鐗╂枡娓呭崟id鎵归噺鍒犻櫎-->
+ <update id="delAllMbom">
+ update mom_ocean.mbom
+ set state=0
+ where id in (${ids})
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3