From 6955a2c758385c6c2e0d14350a11bdbf4f99780b Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 06 八月 2025 14:02:43 +0800
Subject: [PATCH] 1、实现作物实体管理;2、实现计算参数管理。

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml
index 20d6f6d..bac046b 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml
@@ -17,6 +17,10 @@
     <!--@mbg.generated-->
     id, `name`, start_dt, end_dt, stopped, remarks, create_dt, deleted
   </sql>
+  <sql id="Part_Column_List">
+    <!--@mbg.generated-->
+    id, `name`, start_dt, end_dt, stopped, remarks, create_dt
+  </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
     select 
@@ -24,6 +28,15 @@
     from md_crops
     where id = #{id,jdbcType=BIGINT}
   </select>
+
+  <select id="selectById" parameterType="java.lang.Long" resultType="com.dy.pipIrrGlobal.voMd.VoCrops">
+    <!--@mbg.generated-->
+    select
+    <include refid="Base_Column_List" />
+    from md_crops
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     <!--@mbg.generated-->
     delete from md_crops
@@ -134,4 +147,50 @@
       deleted = #{deleted,jdbcType=TINYINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
+
+  <select id="selectById" parameterType="java.lang.Long" resultType="com.dy.pipIrrGlobal.voMd.VoCrops">
+    <!--@mbg.generated-->
+    select
+    <include refid="Part_Column_List" />
+    from md_crops
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+
+  <select id="selectTotal" parameterType="java.util.Map" resultType="java.lang.Long">
+    select
+    count(*)
+    from md_crops tb
+    where tb.deleted != 1
+    <trim prefix="and" suffixOverrides="and">
+      <if test="name != null and name != ''">
+        tb.name like concat('%', #{name}, '%') and
+      </if>
+    </trim>
+  </select>
+  <select id="selectSome" parameterType="java.util.Map" resultType="com.dy.pipIrrGlobal.voMd.VoCrops">
+    select
+    <include refid="Part_Column_List" >
+      <property name="alias" value="bd"/>
+    </include>
+    from md_crops tb
+    where tb.deleted != 1
+    <trim prefix="and" suffixOverrides="and">
+      <if test="name != null and name != ''">
+        tb.name like concat('%', #{name}, '%') and
+      </if>
+    </trim>
+    order by tb.id DESC
+    <trim prefix="limit " >
+      <if test="start != null and count != null">
+        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
+      </if>
+    </trim>
+  </select>
+
+  <update id="deleteById" parameterType="java.lang.Long">
+    update md_crops
+    set deleted = 1
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0