liurunyu
3 天以前 1a32cec9ba0e406e840de620d777904e74f780fa
增加远程开阀命令记录实体
3个文件已添加
294 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandOpenMapper.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmCommandOpen.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandOpenMapper.xml 181 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandOpenMapper.java
New file
@@ -0,0 +1,31 @@
package com.dy.pipIrrGlobal.daoRm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoRm.RmCommandOpen;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * @Author: liurunyu
 * @Date: 2025/6/27 10:31
 * @Description
 */
@Mapper
public interface RmCommandOpenMapper extends BaseMapper<RmCommandOpen> {
    int deleteByPrimaryKey(Long id);
    int insert(RmCommandOpen record);
    int insertSelective(RmCommandOpen record);
    RmCommandOpen selectByPrimaryKey(Long id);
    List<RmCommandOpen> selectByIntakeId(Long intakeId);
    int updateByPrimaryKeySelective(RmCommandOpen record);
    int updateByPrimaryKey(RmCommandOpen record);
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmCommandOpen.java
New file
@@ -0,0 +1,82 @@
package com.dy.pipIrrGlobal.pojoRm;
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 lombok.*;
import java.util.Date;
/**
 * @Author: liurunyu
 * @Date: 2025/6/27 10:31
 * @Description
 */
@TableName(value = "rm_command_open", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class RmCommandOpen implements BaseEntity {
    public static final long serialVersionUID = 202506271017001L;
    /**
     * 主键
     */
    @TableId(type = IdType.INPUT)
    public Long id;
    /**
     * 命令id
     */
    public Long comId;
    /**
     * 功能码
     */
    public String commandCode;
    /**
     * 功能命令名称
     */
    public String commandName;
    /**
     * 取水口id
     */
    public Long intakeId;
    /**
     * 控制器地址
     */
    public String rtuAddr;
    /**
     * 协议名称
     */
    public String protocol;
    /**
     * 虚拟卡号
     */
    public Long vcNum;
    /**
     * 订单号
     */
    public String orderNo;
    /**
     * 命令发送时间
     */
    public Date sendTime;
    /**
     * 操作人(用户)
     */
    public Long operator;
}
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandOpenMapper.xml
New file
@@ -0,0 +1,181 @@
<?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.RmCommandOpenMapper">
  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
    <!--@mbg.generated-->
    <!--@Table rm_command_open-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="com_id" jdbcType="BIGINT" property="comId" />
    <result column="command_code" jdbcType="VARCHAR" property="commandCode" />
    <result column="command_name" jdbcType="VARCHAR" property="commandName" />
    <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
    <result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" />
    <result column="protocol" jdbcType="VARCHAR" property="protocol" />
    <result column="vc_num" jdbcType="BIGINT" property="vcNum" />
    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
    <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
    <result column="operator" jdbcType="BIGINT" property="operator" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, com_id, command_code, command_name, intake_id, rtu_addr, protocol, vc_num, order_no,
    send_time, `operator`
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <include refid="Base_Column_List" />
    from rm_command_open
    where id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectByIntakeId" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <include refid="Base_Column_List" />
    from rm_command_open
    where intake_id = #{intakeId,jdbcType=BIGINT}
    order by id DESC
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from rm_command_open
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
    <!--@mbg.generated-->
    insert into rm_command_open (id, com_id, command_code,
      command_name, intake_id, rtu_addr,
      protocol, vc_num, order_no,
      send_time, `operator`)
    values (#{id,jdbcType=BIGINT}, #{comId,jdbcType=BIGINT}, #{commandCode,jdbcType=VARCHAR},
      #{commandName,jdbcType=VARCHAR}, #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR},
      #{protocol,jdbcType=VARCHAR}, #{vcNum,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR},
      #{sendTime,jdbcType=TIMESTAMP}, #{operator,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
    <!--@mbg.generated-->
    insert into rm_command_open
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="comId != null">
        com_id,
      </if>
      <if test="commandCode != null">
        command_code,
      </if>
      <if test="commandName != null">
        command_name,
      </if>
      <if test="intakeId != null">
        intake_id,
      </if>
      <if test="rtuAddr != null">
        rtu_addr,
      </if>
      <if test="protocol != null">
        protocol,
      </if>
      <if test="vcNum != null">
        vc_num,
      </if>
      <if test="orderNo != null">
        order_no,
      </if>
      <if test="sendTime != null">
        send_time,
      </if>
      <if test="operator != null">
        `operator`,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="comId != null">
        #{comId,jdbcType=BIGINT},
      </if>
      <if test="commandCode != null">
        #{commandCode,jdbcType=VARCHAR},
      </if>
      <if test="commandName != null">
        #{commandName,jdbcType=VARCHAR},
      </if>
      <if test="intakeId != null">
        #{intakeId,jdbcType=BIGINT},
      </if>
      <if test="rtuAddr != null">
        #{rtuAddr,jdbcType=VARCHAR},
      </if>
      <if test="protocol != null">
        #{protocol,jdbcType=VARCHAR},
      </if>
      <if test="vcNum != null">
        #{vcNum,jdbcType=BIGINT},
      </if>
      <if test="orderNo != null">
        #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="sendTime != null">
        #{sendTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operator != null">
        #{operator,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
    <!--@mbg.generated-->
    update rm_command_open
    <set>
      <if test="comId != null">
        com_id = #{comId,jdbcType=BIGINT},
      </if>
      <if test="commandCode != null">
        command_code = #{commandCode,jdbcType=VARCHAR},
      </if>
      <if test="commandName != null">
        command_name = #{commandName,jdbcType=VARCHAR},
      </if>
      <if test="intakeId != null">
        intake_id = #{intakeId,jdbcType=BIGINT},
      </if>
      <if test="rtuAddr != null">
        rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
      </if>
      <if test="protocol != null">
        protocol = #{protocol,jdbcType=VARCHAR},
      </if>
      <if test="vcNum != null">
        vc_num = #{vcNum,jdbcType=BIGINT},
      </if>
      <if test="orderNo != null">
        order_no = #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="sendTime != null">
        send_time = #{sendTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operator != null">
        `operator` = #{operator,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
    <!--@mbg.generated-->
    update rm_command_open
    set com_id = #{comId,jdbcType=BIGINT},
      command_code = #{commandCode,jdbcType=VARCHAR},
      command_name = #{commandName,jdbcType=VARCHAR},
      intake_id = #{intakeId,jdbcType=BIGINT},
      rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
      protocol = #{protocol,jdbcType=VARCHAR},
      vc_num = #{vcNum,jdbcType=BIGINT},
      order_no = #{orderNo,jdbcType=VARCHAR},
      send_time = #{sendTime,jdbcType=TIMESTAMP},
      `operator` = #{operator,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>