From d443f89f684bbf6114127391c7b863ad3790665d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 15 八月 2025 15:36:02 +0800
Subject: [PATCH] 作物实体增加属性

---
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java |   21 ++-
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdCrops.java      |   92 +++++++++++++++---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml                |  154 ++++++++++++++++++++++++++----
 3 files changed, 221 insertions(+), 46 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java
index fa84c22..34dba3d 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java
@@ -1,7 +1,9 @@
 package com.dy.pipIrrGlobal.daoMd;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.dy.pipIrrGlobal.pojoMd.MdCrops;
 import com.dy.pipIrrGlobal.voMd.VoCrops;
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -9,10 +11,11 @@
 
 /**
  * @Author: liurunyu
- * @Date: 2025/8/6 10:51
+ * @Date: 2025/8/15 15:22
  * @Description
  */
-public interface MdCropsMapper {
+@Mapper
+public interface MdCropsMapper extends BaseMapper<MdCrops> {
     int deleteByPrimaryKey(Long id);
 
     int insert(MdCrops record);
@@ -29,26 +32,30 @@
 
     /**
      * 鏌ヨ鎬绘暟
+     *
      * @param params 鏌ヨ鏉′欢
      * @return 鎬绘暟
-     * */
-    Long selectTotal(Map<?,?> params);
+     */
+    Long selectTotal(Map<?, ?> params);
 
     /**
      * 鍒嗛〉鏌ヨ涓�浜�
+     *
      * @param params 鏌ヨ鏉′欢
      * @return 瀹炰綋闆嗗悎
-     * */
-    List<VoCrops> selectSome(Map<?,?> params);
+     */
+    List<VoCrops> selectSome(Map<?, ?> params);
 
     /**
      * 鏌ヨ鎵�鏈夊疄浣�
+     *
      * @return 瀹炰綋闆嗗悎
-     * */
+     */
     List<VoCrops> selectAll();
 
     /**
      * 鏍规嵁id閫昏緫鍒犻櫎
+     *
      * @param id
      * @return
      */
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdCrops.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdCrops.java
index 9bd2000..5867f69 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdCrops.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdCrops.java
@@ -16,10 +16,9 @@
 
 /**
  * @Author: liurunyu
- * @Date: 2025/8/6 10:51
+ * @Date: 2025/8/15 15:22
  * @Description
  */
-
 @TableName(value="md_crops", autoResultMap = true)
 @Data
 @Builder
@@ -30,53 +29,112 @@
 public class MdCrops implements BaseEntity {
 
     public static final long serialVersionUID = 202508061126001L;
-
     /**
-    * 涓婚敭
-    */
+     * 涓婚敭
+     */
     @JSONField(serializeUsing= ObjectWriterImplToString.class)
     @TableId(type = IdType.INPUT)
     @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
     public Long id;
 
     /**
-    * 浣滅墿鍚嶇О
-    */
+     * 鎸囧悜鎵�璞$珯澶栭敭
+     */
+    public Long weatherId;
+
+    /**
+     * 浣滅墿鍚嶇О
+     */
     @Schema(description = "浣滅墿鍚嶇О", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotEmpty(message = "浣滅墿鍚嶇О涓嶈兘涓虹┖") //涓嶈兘涓虹┖涔熶笉鑳戒负null
     @Length(message = "浣滅墿鍚嶇О涓嶅ぇ浜巤max}瀛楋紝涓嶅皬浜巤min}瀛�", min = 1, max = 50)
     public String name;
 
     /**
-    * 璁$畻寮�濮嬫棩鏈燂紙涓�骞寸敓浣滅墿鏄妞嶆椂闂存垨鍑鸿娊鏃堕棿锛夛紝濡傛灉涓虹┖鍊煎垯涓洪暱涔呰绠楋紝鏍煎紡yyyy-mm-dd
-    */
+     * 璁$畻寮�濮嬫棩鏈燂紙涓�骞寸敓浣滅墿鏄妞嶆椂闂存垨鍑鸿娊鏃堕棿锛夛紝濡傛灉涓虹┖鍊煎垯涓洪暱涔呰绠楋紝鏍煎紡yyyy-mm-dd
+     */
     @Schema(description = "璁$畻寮�濮嬫棩鏈燂紙涓�骞寸敓浣滅墿鏄妞嶆椂闂存垨鍑鸿娊鏃堕棿锛夛紝濡傛灉涓虹┖鍊煎垯涓洪暱涔呰绠楋紝鏍煎紡yyyy-mm-dd", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
     @JsonFormat(pattern = "MM-dd")
     public String startDt;
 
     /**
-    * 璁$畻鎴鏃ユ湡锛堜竴骞寸敓浣滅墿鏄仠姝㈢亴婧夋椂闂达級锛屽鏋滀负绌哄�煎垯涓洪暱涔呰绠楋紝鏍煎紡yyyy-mm-dd
-    */
+     * 璁$畻鎴鏃ユ湡锛堜竴骞寸敓浣滅墿鏄仠姝㈢亴婧夋椂闂达級锛屽鏋滀负绌哄�煎垯涓洪暱涔呰绠楋紝鏍煎紡yyyy-mm-dd
+     */
     @Schema(description = "璁$畻鎴鏃ユ湡锛堜竴骞寸敓浣滅墿鏄仠姝㈢亴婧夋椂闂达級锛屽鏋滀负绌哄�煎垯涓洪暱涔呰绠楋紝鏍煎紡yyyy-mm-dd", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
     @JsonFormat(pattern = "MM-dd")
     public String endDt;
 
+
     /**
-    * 鏄惁鍋滄璁$畻锛�1鏄紝0鍚�
-    */
+     * 鐢熼暱鍒濇湡寮�濮嬪ぉ鏁帮紙榛樿鏄�1锛�
+     */
+    @Schema(description = "鐢熼暱鍒濇湡寮�濮嬪ぉ鏁帮紙榛樿鏄�1锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+    public Integer life1start;
+
+    /**
+     * 鐢熼暱鍒濇湡缁撴潫澶╂暟
+     */
+    @Schema(description = "鐢熼暱鍒濇湡缁撴潫澶╂暟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+    public Integer life1end;
+
+    /**
+     * 蹇�熺敓闀挎湡寮�濮嬪ぉ鏁帮紙榛樿鐢熼暱鍒濇湡缁撴潫澶╂暟+1锛�
+     */
+   @Schema(description = "蹇�熺敓闀挎湡寮�濮嬪ぉ鏁帮紙榛樿鐢熼暱鍒濇湡缁撴潫澶╂暟+1锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+   public Integer life2start;
+
+    /**
+     * 蹇�熺敓闀挎湡缁撴潫澶╂暟
+     */
+    @Schema(description = "蹇�熺敓闀挎湡缁撴潫澶╂暟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+    public Integer life2end;
+
+    /**
+     * 鐢熼暱涓湡寮�濮嬪ぉ鏁帮紙榛樿蹇�熺敓闀挎湡缁撴潫澶╂暟+1锛�
+     */
+    @Schema(description = "鐢熼暱涓湡寮�濮嬪ぉ鏁帮紙榛樿蹇�熺敓闀挎湡缁撴潫澶╂暟+1锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+    public Integer life3start;
+
+    /**
+     * 鐢熼暱涓湡缁撴潫澶╂暟
+     */
+    @Schema(description = "鐢熼暱涓湡缁撴潫澶╂暟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+    public Integer life3end;
+
+    /**
+     * 鐢熼暱鏈湡寮�濮嬪ぉ鏁帮紙榛樿鐢熼暱涓湡缁撴潫澶╂暟+1锛�
+     */
+    @Schema(description = "鐢熼暱鏈湡寮�濮嬪ぉ鏁帮紙榛樿鐢熼暱涓湡缁撴潫澶╂暟+1锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+    public Integer life4start;
+
+    /**
+     * 鐢熼暱鏈湡缁撴潫澶╂暟
+     */
+    @Schema(description = "鐢熼暱鏈湡缁撴潫澶╂暟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+    public Integer life4end;
+
+    /**
+     * 绾害
+     */
+    @Schema(description = "绾害", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+    public Double lat;
+
+    /**
+     * 鏄惁鍋滄璁$畻锛�1鏄紝0鍚�
+     */
     @Schema(description = "鍋滄璁$畻鏍囪瘑", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
     public Byte stopped;
 
     /**
-    * 澶囨敞
-    */
+     * 澶囨敞
+     */
     @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
     @Length(message = "澶囨敞涓嶅ぇ浜巤max}瀛楋紝涓嶅皬浜巤min}瀛�", min = 1, max = 100)
     public String remarks;
 
     /**
-    * 鏁版嵁璁板綍鍒涘缓鏃ユ湡锛屾牸寮弝yyy-mm-dd hh:mm:ss
-    */
+     * 鏁版嵁璁板綍鍒涘缓鏃ユ湡锛屾牸寮弝yyy-mm-dd hh:mm:ss
+     */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     public Date createDt;
 
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 b738134..4617871 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml
@@ -5,9 +5,19 @@
     <!--@mbg.generated-->
     <!--@Table md_crops-->
     <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="weather_id" jdbcType="BIGINT" property="weatherId" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="start_dt" jdbcType="VARCHAR" property="startDt" />
     <result column="end_dt" jdbcType="VARCHAR" property="endDt" />
+    <result column="life1Start" jdbcType="INTEGER" property="life1start" />
+    <result column="life1End" jdbcType="INTEGER" property="life1end" />
+    <result column="life2Start" jdbcType="INTEGER" property="life2start" />
+    <result column="life2End" jdbcType="INTEGER" property="life2end" />
+    <result column="life3Start" jdbcType="INTEGER" property="life3start" />
+    <result column="life3End" jdbcType="INTEGER" property="life3end" />
+    <result column="life4Start" jdbcType="INTEGER" property="life4start" />
+    <result column="life4End" jdbcType="INTEGER" property="life4end" />
+    <result column="lat" jdbcType="DOUBLE" property="lat" />
     <result column="stopped" jdbcType="TINYINT" property="stopped" />
     <result column="remarks" jdbcType="VARCHAR" property="remarks" />
     <result column="create_dt" jdbcType="TIMESTAMP" property="createDt" />
@@ -15,11 +25,12 @@
   </resultMap>
   <sql id="Base_Column_List">
     <!--@mbg.generated-->
-    id, `name`, start_dt, end_dt, stopped, remarks, create_dt, deleted
+    id, weather_id, `name`, start_dt, end_dt, life1Start, life1End, life2Start, life2End,
+    life3Start, life3End, life4Start, life4End, lat, stopped, remarks, create_dt, deleted
   </sql>
   <sql id="Part_Column_List">
-    <!--@mbg.generated-->
-    id, `name`, start_dt, end_dt, stopped, remarks, create_dt
+    id, weather_id, `name`, start_dt, end_dt, life1Start, life1End, life2Start, life2End,
+    life3Start, life3End, life4Start, life4End, lat, stopped, remarks, create_dt
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
@@ -28,15 +39,6 @@
     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
@@ -44,12 +46,20 @@
   </delete>
   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops">
     <!--@mbg.generated-->
-    insert into md_crops (id, `name`, start_dt, 
-      end_dt, stopped, remarks, 
-      create_dt, deleted)
-    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{startDt,jdbcType=VARCHAR},
-      #{endDt,jdbcType=VARCHAR}, #{stopped,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR},
-      #{createDt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT})
+    insert into md_crops (id, weather_id, `name`,
+      start_dt, end_dt, life1Start, 
+      life1End, life2Start, life2End, 
+      life3Start, life3End, life4Start, 
+      life4End, lat, stopped, 
+      remarks, create_dt, deleted
+      )
+    values (#{id,jdbcType=BIGINT}, #{weatherId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
+      #{startDt,jdbcType=VARCHAR}, #{endDt,jdbcType=VARCHAR}, #{life1start,jdbcType=INTEGER}, 
+      #{life1end,jdbcType=INTEGER}, #{life2start,jdbcType=INTEGER}, #{life2end,jdbcType=INTEGER}, 
+      #{life3start,jdbcType=INTEGER}, #{life3end,jdbcType=INTEGER}, #{life4start,jdbcType=INTEGER}, 
+      #{life4end,jdbcType=INTEGER}, #{lat,jdbcType=DOUBLE}, #{stopped,jdbcType=TINYINT}, 
+      #{remarks,jdbcType=VARCHAR}, #{createDt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops">
     <!--@mbg.generated-->
@@ -57,6 +67,9 @@
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
         id,
+      </if>
+      <if test="weatherId != null">
+        weather_id,
       </if>
       <if test="name != null">
         `name`,
@@ -66,6 +79,33 @@
       </if>
       <if test="endDt != null">
         end_dt,
+      </if>
+      <if test="life1start != null">
+        life1Start,
+      </if>
+      <if test="life1end != null">
+        life1End,
+      </if>
+      <if test="life2start != null">
+        life2Start,
+      </if>
+      <if test="life2end != null">
+        life2End,
+      </if>
+      <if test="life3start != null">
+        life3Start,
+      </if>
+      <if test="life3end != null">
+        life3End,
+      </if>
+      <if test="life4start != null">
+        life4Start,
+      </if>
+      <if test="life4end != null">
+        life4End,
+      </if>
+      <if test="lat != null">
+        lat,
       </if>
       <if test="stopped != null">
         stopped,
@@ -84,6 +124,9 @@
       <if test="id != null">
         #{id,jdbcType=BIGINT},
       </if>
+      <if test="weatherId != null">
+        #{weatherId,jdbcType=BIGINT},
+      </if>
       <if test="name != null">
         #{name,jdbcType=VARCHAR},
       </if>
@@ -92,6 +135,33 @@
       </if>
       <if test="endDt != null">
         #{endDt,jdbcType=VARCHAR},
+      </if>
+      <if test="life1start != null">
+        #{life1start,jdbcType=INTEGER},
+      </if>
+      <if test="life1end != null">
+        #{life1end,jdbcType=INTEGER},
+      </if>
+      <if test="life2start != null">
+        #{life2start,jdbcType=INTEGER},
+      </if>
+      <if test="life2end != null">
+        #{life2end,jdbcType=INTEGER},
+      </if>
+      <if test="life3start != null">
+        #{life3start,jdbcType=INTEGER},
+      </if>
+      <if test="life3end != null">
+        #{life3end,jdbcType=INTEGER},
+      </if>
+      <if test="life4start != null">
+        #{life4start,jdbcType=INTEGER},
+      </if>
+      <if test="life4end != null">
+        #{life4end,jdbcType=INTEGER},
+      </if>
+      <if test="lat != null">
+        #{lat,jdbcType=DOUBLE},
       </if>
       <if test="stopped != null">
         #{stopped,jdbcType=TINYINT},
@@ -111,6 +181,9 @@
     <!--@mbg.generated-->
     update md_crops
     <set>
+      <if test="weatherId != null">
+        weather_id = #{weatherId,jdbcType=BIGINT},
+      </if>
       <if test="name != null">
         `name` = #{name,jdbcType=VARCHAR},
       </if>
@@ -119,6 +192,33 @@
       </if>
       <if test="endDt != null">
         end_dt = #{endDt,jdbcType=VARCHAR},
+      </if>
+      <if test="life1start != null">
+        life1Start = #{life1start,jdbcType=INTEGER},
+      </if>
+      <if test="life1end != null">
+        life1End = #{life1end,jdbcType=INTEGER},
+      </if>
+      <if test="life2start != null">
+        life2Start = #{life2start,jdbcType=INTEGER},
+      </if>
+      <if test="life2end != null">
+        life2End = #{life2end,jdbcType=INTEGER},
+      </if>
+      <if test="life3start != null">
+        life3Start = #{life3start,jdbcType=INTEGER},
+      </if>
+      <if test="life3end != null">
+        life3End = #{life3end,jdbcType=INTEGER},
+      </if>
+      <if test="life4start != null">
+        life4Start = #{life4start,jdbcType=INTEGER},
+      </if>
+      <if test="life4end != null">
+        life4End = #{life4end,jdbcType=INTEGER},
+      </if>
+      <if test="lat != null">
+        lat = #{lat,jdbcType=DOUBLE},
       </if>
       <if test="stopped != null">
         stopped = #{stopped,jdbcType=TINYINT},
@@ -138,9 +238,19 @@
   <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops">
     <!--@mbg.generated-->
     update md_crops
-    set `name` = #{name,jdbcType=VARCHAR},
+    set weather_id = #{weatherId,jdbcType=BIGINT},
+      `name` = #{name,jdbcType=VARCHAR},
       start_dt = #{startDt,jdbcType=VARCHAR},
       end_dt = #{endDt,jdbcType=VARCHAR},
+      life1Start = #{life1start,jdbcType=INTEGER},
+      life1End = #{life1end,jdbcType=INTEGER},
+      life2Start = #{life2start,jdbcType=INTEGER},
+      life2End = #{life2end,jdbcType=INTEGER},
+      life3Start = #{life3start,jdbcType=INTEGER},
+      life3End = #{life3end,jdbcType=INTEGER},
+      life4Start = #{life4start,jdbcType=INTEGER},
+      life4End = #{life4end,jdbcType=INTEGER},
+      lat = #{lat,jdbcType=DOUBLE},
       stopped = #{stopped,jdbcType=TINYINT},
       remarks = #{remarks,jdbcType=VARCHAR},
       create_dt = #{createDt,jdbcType=TIMESTAMP},
@@ -178,7 +288,7 @@
       </if>
     </trim>
     order by tb.id DESC
-    <trim prefix="limit " >
+    <trim prefix="limit ">
       <if test="start != null and count != null">
         #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
       </if>
@@ -187,8 +297,8 @@
 
   <select id="selectAll" resultType="com.dy.pipIrrGlobal.voMd.VoCrops">
     select
-    <include refid="Part_Column_List" >
-      <property name="alias" value="tb"/>
+    <include refid="Part_Column_List">
+      <property name="alias" value="tb" />
     </include>
     from md_crops tb
     where tb.deleted != 1

--
Gitblit v1.8.0