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/resources/mapper/IrPlanOperateMapper.xml | 127 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 127 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrPlanOperateMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrPlanOperateMapper.xml
new file mode 100644
index 0000000..94accdf
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrPlanOperateMapper.xml
@@ -0,0 +1,127 @@
+<?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.dy.pipIrrGlobal.daoIr.IrPlanOperateMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoIr.IrPlanOperate">
+ <!--@mbg.generated-->
+ <!--@Table ir_plan_operate-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="plan_id" jdbcType="BIGINT" property="planId" />
+ <result column="operator" jdbcType="BIGINT" property="operator" />
+ <result column="operate_type" jdbcType="TINYINT" property="operateType" />
+ <result column="operate_time" jdbcType="TIMESTAMP" property="operateTime" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, plan_id, `operator`, operate_type, operate_time
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from ir_plan_operate
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from ir_plan_operate
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoIr.IrPlanOperate">
+ <!--@mbg.generated-->
+ insert into ir_plan_operate (id, plan_id, `operator`,
+ operate_type, operate_time)
+ values (#{id,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT}, #{operator,jdbcType=BIGINT},
+ #{operateType,jdbcType=TINYINT}, #{operateTime,jdbcType=TIMESTAMP})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoIr.IrPlanOperate">
+ <!--@mbg.generated-->
+ insert into ir_plan_operate
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="planId != null">
+ plan_id,
+ </if>
+ <if test="operator != null">
+ `operator`,
+ </if>
+ <if test="operateType != null">
+ operate_type,
+ </if>
+ <if test="operateTime != null">
+ operate_time,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="planId != null">
+ #{planId,jdbcType=BIGINT},
+ </if>
+ <if test="operator != null">
+ #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operateType != null">
+ #{operateType,jdbcType=TINYINT},
+ </if>
+ <if test="operateTime != null">
+ #{operateTime,jdbcType=TIMESTAMP},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoIr.IrPlanOperate">
+ <!--@mbg.generated-->
+ update ir_plan_operate
+ <set>
+ <if test="planId != null">
+ plan_id = #{planId,jdbcType=BIGINT},
+ </if>
+ <if test="operator != null">
+ `operator` = #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operateType != null">
+ operate_type = #{operateType,jdbcType=TINYINT},
+ </if>
+ <if test="operateTime != null">
+ operate_time = #{operateTime,jdbcType=TIMESTAMP},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoIr.IrPlanOperate">
+ <!--@mbg.generated-->
+ update ir_plan_operate
+ set plan_id = #{planId,jdbcType=BIGINT},
+ `operator` = #{operator,jdbcType=BIGINT},
+ operate_type = #{operateType,jdbcType=TINYINT},
+ operate_time = #{operateTime,jdbcType=TIMESTAMP}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+ <!--鏍规嵁璁″垝ID鑾峰彇缁堟鏃堕棿-->
+ <select id="getTerminateTime" resultType="java.util.Date">
+ SELECT operate_time AS operateTime FROM ir_plan_operate WHERE operate_type = 5 AND plan_id = #{planId} LIMIT 0,1
+ </select>
+
+ <!--鑾峰彇鏈�杩戜竴娆¤鍒掔粓姝㈢殑鏃堕棿锛屼笖缁堟鏃堕棿鍦ㄩ厤缃殑鏃堕棿闂撮殧鍐�-->
+ <select id="getLastTerminateTime" resultType="java.util.Date">
+ SELECT operate_time AS operateTime
+ FROM ir_plan_operate
+ WHERE operate_type = 5
+ AND operate_time >= DATE_SUB(NOW(), INTERVAL #{planTerminateLimitMinutes} MINUTE)
+ ORDER BY operate_time DESC
+ LIMIT 0,1
+ </select>
+
+ <!--鑾峰彇鏈�杩戜竴娆$粓姝㈢殑璁″垝ID-->
+ <select id="getLastTerminatedPlanId" resultType="java.lang.Long">
+ SELECT plan_id
+ FROM ir_plan_operate
+ WHERE operate_type = 5
+ AND operate_time >= DATE_SUB(NOW(), INTERVAL #{planTerminateLimitMinutes} MINUTE)
+ ORDER BY operate_time DESC
+ LIMIT 0,1
+ </select>
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0