From 9485d02bc134677dcba63eec0dcf20514cbeb786 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 17 一月 2024 09:18:51 +0800
Subject: [PATCH] 增加了取水口取水量实体及数据库映射
---
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountMapper.java | 55 +++++++++++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmIntakeAmount.java | 93 ++++++++++++++++++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountMapper.xml | 151 ++++++++++++++++++++++++++++++
3 files changed, 299 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountMapper.java
new file mode 100644
index 0000000..d326cbc
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIntakeAmountMapper.java
@@ -0,0 +1,55 @@
+package com.dy.pipIrrGlobal.daoRm;
+
+import com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Author liurunyu
+ * @Date 2024/1/17 9:07
+ * @LastEditTime 2024/1/17 9:07
+ * @Description
+ */
+@Mapper
+public interface RmIntakeAmountMapper {
+ /**
+ * delete by primary key
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ /**
+ * insert record to table
+ * @param record the record
+ * @return insert count
+ */
+ int insert(RmIntakeAmount record);
+
+ /**
+ * insert record to table selective
+ * @param record the record
+ * @return insert count
+ */
+ int insertSelective(RmIntakeAmount record);
+
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
+ RmIntakeAmount selectByPrimaryKey(Long id);
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(RmIntakeAmount record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(RmIntakeAmount record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmIntakeAmount.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmIntakeAmount.java
new file mode 100644
index 0000000..0aba6c3
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmIntakeAmount.java
@@ -0,0 +1,93 @@
+package com.dy.pipIrrGlobal.pojoRm;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+import java.util.Date;
+
+/**
+ * @Author liurunyu
+ * @Date 2024/1/17 9:07
+ * @LastEditTime 2024/1/17 9:07
+ * @Description 鍙栨按鍙e彇姘撮噺
+ */
+@TableName(value="rm_intake_amount", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍙栨按鍙e彇姘撮噺")
+public class RmIntakeAmount implements BaseEntity {
+
+ public static final long serialVersionUID = 202401170908001L;
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ public Long id;
+
+ /**
+ * 鍙栨按鍙D锛堝閿級
+ */
+ /**
+ * 鍙栨按鍙D锛堝閿級
+ */
+ @Schema(description = "鍙栨按鍙e疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long intakeid;
+
+ /**
+ * 绱鍙栨按閲忥紙涓嶅寘鎷紡鎹熸按閲忥級
+ */
+ @Schema(description = "绱鍙栨按閲忥紙涓嶅寘鎷紡鎹熸按閲忥級", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double amount;
+
+ /**
+ * 绱婕忔崯姘撮噺
+ */
+ @Schema(description = "绱婕忔崯姘撮噺", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double loss;
+
+ /**
+ * 鏈�鍚庤姘撮噺鐨勬帶鍒跺櫒ID锛堝閿級
+ */
+ @Schema(description = "鎺у埗鍣ㄥ疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long controlleridlast;
+
+ /**
+ * 鏈�鍚庤姘撮噺鏃ユ湡
+ */
+ @Schema(description = "鏈�鍚庤姘撮噺鏃ユ湡", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ public Date dtlast;
+
+ /**
+ * 鏈�鍚庤姘撮噺鏃舵帶鍒跺櫒鍙栨按閲�
+ */
+ @Schema(description = "鏈�鍚庤姘撮噺鏃舵帶鍒跺櫒鍙栨按閲�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double amountlast;
+
+ /**
+ * 鏈�鍚庤姘撮噺鏃舵帶鍒跺櫒绱姘撮噺
+ */
+ @Schema(description = "鏈�鍚庤姘撮噺鏃舵帶鍒跺櫒绱姘撮噺", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double totalamountlast;
+
+ /**
+ * 鏈�鍚庤姘撮噺鏉ユ簮锛�1寮�闃�宸ヤ綔鎶ワ紝2鍏抽榾鎶ワ紝3鑷姤锛�
+ */
+ @Schema(description = "鏈�鍚庤姘撮噺鏉ユ簮锛�1寮�闃�宸ヤ綔鎶ワ紝2鍏抽榾鎶ワ紝3鑷姤锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Byte resourcetypelast;
+
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountMapper.xml
new file mode 100644
index 0000000..d1eb46e
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountMapper.xml
@@ -0,0 +1,151 @@
+<?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.daoRm.RmIntakeAmountMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount">
+ <!--@mbg.generated-->
+ <!--@Table rm_intake_amount-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="intakeId" jdbcType="BIGINT" property="intakeid" />
+ <result column="amount" jdbcType="DOUBLE" property="amount" />
+ <result column="loss" jdbcType="DOUBLE" property="loss" />
+ <result column="controllerIdLast" jdbcType="BIGINT" property="controlleridlast" />
+ <result column="dtLast" jdbcType="DATE" property="dtlast" />
+ <result column="amountLast" jdbcType="DOUBLE" property="amountlast" />
+ <result column="totalAmountLast" jdbcType="DOUBLE" property="totalamountlast" />
+ <result column="resourceTypeLast" jdbcType="TINYINT" property="resourcetypelast" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, intakeId, amount, loss, controllerIdLast, dtLast, amountLast, totalAmountLast,
+ resourceTypeLast
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from rm_intake_amount
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from rm_intake_amount
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount">
+ <!--@mbg.generated-->
+ insert into rm_intake_amount (id, intakeId, amount,
+ loss, controllerIdLast, dtLast,
+ amountLast, totalAmountLast, resourceTypeLast
+ )
+ values (#{id,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, #{amount,jdbcType=DOUBLE},
+ #{loss,jdbcType=DOUBLE}, #{controlleridlast,jdbcType=BIGINT}, #{dtlast,jdbcType=DATE},
+ #{amountlast,jdbcType=DOUBLE}, #{totalamountlast,jdbcType=DOUBLE}, #{resourcetypelast,jdbcType=TINYINT}
+ )
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount">
+ <!--@mbg.generated-->
+ insert into rm_intake_amount
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="intakeid != null">
+ intakeId,
+ </if>
+ <if test="amount != null">
+ amount,
+ </if>
+ <if test="loss != null">
+ loss,
+ </if>
+ <if test="controlleridlast != null">
+ controllerIdLast,
+ </if>
+ <if test="dtlast != null">
+ dtLast,
+ </if>
+ <if test="amountlast != null">
+ amountLast,
+ </if>
+ <if test="totalamountlast != null">
+ totalAmountLast,
+ </if>
+ <if test="resourcetypelast != null">
+ resourceTypeLast,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="intakeid != null">
+ #{intakeid,jdbcType=BIGINT},
+ </if>
+ <if test="amount != null">
+ #{amount,jdbcType=DOUBLE},
+ </if>
+ <if test="loss != null">
+ #{loss,jdbcType=DOUBLE},
+ </if>
+ <if test="controlleridlast != null">
+ #{controlleridlast,jdbcType=BIGINT},
+ </if>
+ <if test="dtlast != null">
+ #{dtlast,jdbcType=DATE},
+ </if>
+ <if test="amountlast != null">
+ #{amountlast,jdbcType=DOUBLE},
+ </if>
+ <if test="totalamountlast != null">
+ #{totalamountlast,jdbcType=DOUBLE},
+ </if>
+ <if test="resourcetypelast != null">
+ #{resourcetypelast,jdbcType=TINYINT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount">
+ <!--@mbg.generated-->
+ update rm_intake_amount
+ <set>
+ <if test="intakeid != null">
+ intakeId = #{intakeid,jdbcType=BIGINT},
+ </if>
+ <if test="amount != null">
+ amount = #{amount,jdbcType=DOUBLE},
+ </if>
+ <if test="loss != null">
+ loss = #{loss,jdbcType=DOUBLE},
+ </if>
+ <if test="controlleridlast != null">
+ controllerIdLast = #{controlleridlast,jdbcType=BIGINT},
+ </if>
+ <if test="dtlast != null">
+ dtLast = #{dtlast,jdbcType=DATE},
+ </if>
+ <if test="amountlast != null">
+ amountLast = #{amountlast,jdbcType=DOUBLE},
+ </if>
+ <if test="totalamountlast != null">
+ totalAmountLast = #{totalamountlast,jdbcType=DOUBLE},
+ </if>
+ <if test="resourcetypelast != null">
+ resourceTypeLast = #{resourcetypelast,jdbcType=TINYINT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount">
+ <!--@mbg.generated-->
+ update rm_intake_amount
+ set intakeId = #{intakeid,jdbcType=BIGINT},
+ amount = #{amount,jdbcType=DOUBLE},
+ loss = #{loss,jdbcType=DOUBLE},
+ controllerIdLast = #{controlleridlast,jdbcType=BIGINT},
+ dtLast = #{dtlast,jdbcType=DATE},
+ amountLast = #{amountlast,jdbcType=DOUBLE},
+ totalAmountLast = #{totalamountlast,jdbcType=DOUBLE},
+ resourceTypeLast = #{resourcetypelast,jdbcType=TINYINT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0