Explorar o código

修改 Sim 字段。

tom hai 5 meses
pai
achega
a13c4f388d

+ 4 - 4
pla-sim/01_SQL/02_table/sim_sim.sql

@@ -1,17 +1,17 @@
 /*
  Navicat Premium Dump SQL
 
- Source Server         : qdhome.iot321.top
+ Source Server         : qdhome.iot321.top-dev
  Source Server Type    : MySQL
  Source Server Version : 50740 (5.7.40-log)
- Source Host           : qdhome.iot321.top:33003
+ Source Host           : qdhome.iot321.top:33103
  Source Schema         : pla-chem-sim-dev-1
 
  Target Server Type    : MySQL
  Target Server Version : 50740 (5.7.40-log)
  File Encoding         : 65001
 
- Date: 11/12/2024 01:22:35
+ Date: 13/12/2024 18:32:48
 */
 
 SET NAMES utf8mb4;
@@ -25,7 +25,7 @@ CREATE TABLE `sim_sim`  (
   `sim_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '模拟器ID',
   `seat_id` bigint(20) NOT NULL COMMENT '座ID',
   `sim_type` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '模拟器类型',
-  `state` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '模拟器在线 1:在线 2:离线 3:硬件故障异常',
+  `sim_state` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '模拟器在线 1:在线 2:离线 3:硬件故障异常',
   `sim_sn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模拟器序列号',
   `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者',
   `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',

+ 7 - 7
ruoyi-sim/src/main/java/com/ruoyi/sim/domain/Sim.java

@@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * 模拟器对象 sim_sim
  *
  * @author tom
- * @date 2024-12-11
+ * @date 2024-12-13
  */
 public class Sim extends BaseEntity {
     private static final long serialVersionUID = 1L;
@@ -35,7 +35,7 @@ public class Sim extends BaseEntity {
      * 模拟器在线 1:在线 2:离线 3:硬件故障异常
      */
     @Excel(name = "模拟器在线 1:在线 2:离线 3:硬件故障异常")
-    private String state;
+    private String simState;
 
     /**
      * 模拟器序列号
@@ -67,12 +67,12 @@ public class Sim extends BaseEntity {
         return simType;
     }
 
-    public void setState(String state) {
-        this.state = state;
+    public void setSimState(String simState) {
+        this.simState = simState;
     }
 
-    public String getState() {
-        return state;
+    public String getSimState() {
+        return simState;
     }
 
     public void setSimSn(String simSn) {
@@ -89,7 +89,7 @@ public class Sim extends BaseEntity {
                 .append("simId", getSimId())
                 .append("seatId", getSeatId())
                 .append("simType", getSimType())
-                .append("state", getState())
+                .append("simState", getSimState())
                 .append("simSn", getSimSn())
                 .append("createBy", getCreateBy())
                 .append("createTime", getCreateTime())

+ 1 - 1
ruoyi-sim/src/main/java/com/ruoyi/sim/mapper/SimMapper.java

@@ -8,7 +8,7 @@ import com.ruoyi.sim.domain.Sim;
  * 模拟器Mapper接口
  *
  * @author tom
- * @date 2024-12-11
+ * @date 2024-12-13
  */
 public interface SimMapper {
     /**

+ 1 - 1
ruoyi-sim/src/main/java/com/ruoyi/sim/service/ISimService.java

@@ -8,7 +8,7 @@ import com.ruoyi.sim.domain.Sim;
  * 模拟器Service接口
  *
  * @author tom
- * @date 2024-12-11
+ * @date 2024-12-13
  */
 public interface ISimService {
     /**

+ 1 - 1
ruoyi-sim/src/main/java/com/ruoyi/sim/service/impl/SimServiceImpl.java

@@ -13,7 +13,7 @@ import com.ruoyi.sim.service.ISimService;
  * 模拟器Service业务层处理
  *
  * @author tom
- * @date 2024-12-11
+ * @date 2024-12-13
  */
 @Service
 public class SimServiceImpl implements ISimService {

+ 46 - 70
ruoyi-sim/src/main/resources/mapper/sim/SimMapper.xml

@@ -2,18 +2,14 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.sim.mapper.SimMsgMapper">
+<mapper namespace="com.ruoyi.sim.mapper.SimMapper">
 
-    <resultMap type="SimMsg" id="SimMsgResult">
-        <result property="simMsgId" column="sim_msg_id"/>
+    <resultMap type="Sim" id="SimResult">
         <result property="simId" column="sim_id"/>
-        <result property="state" column="state"/>
-        <result property="priority" column="priority"/>
-        <result property="sendMsg" column="send_msg"/>
-        <result property="sendTime" column="send_time"/>
-        <result property="receiveMsg" column="receive_msg"/>
-        <result property="receiveTime" column="receive_time"/>
-        <result property="retryCount" column="retry_count"/>
+        <result property="seatId" column="seat_id"/>
+        <result property="simType" column="sim_type"/>
+        <result property="simState" column="sim_state"/>
+        <result property="simSn" column="sim_sn"/>
         <result property="createBy" column="create_by"/>
         <result property="createTime" column="create_time"/>
         <result property="updateBy" column="update_by"/>
@@ -21,54 +17,42 @@
         <result property="remark" column="remark"/>
     </resultMap>
 
-    <sql id="selectSimMsgVo">
-        select sim_msg_id,
-               sim_id,
-               state,
-               priority,
-               send_msg,
-               send_time,
-               receive_msg,
-               receive_time,
-               retry_count,
+    <sql id="selectSimVo">
+        select sim_id,
+               seat_id,
+               sim_type,
+               sim_state,
+               sim_sn,
                create_by,
                create_time,
                update_by,
                update_time,
                remark
-        from sim_sim_msg
+        from sim_sim
     </sql>
 
-    <select id="selectSimMsgList" parameterType="SimMsg" resultMap="SimMsgResult">
-        <include refid="selectSimMsgVo"/>
+    <select id="selectSimList" parameterType="Sim" resultMap="SimResult">
+        <include refid="selectSimVo"/>
         <where>
-            <if test="simId != null ">and sim_id = #{simId}</if>
-            <if test="state != null  and state != ''">and state = #{state}</if>
-            <if test="priority != null ">and priority = #{priority}</if>
-            <if test="sendMsg != null  and sendMsg != ''">and send_msg = #{sendMsg}</if>
-            <if test="sendTime != null ">and send_time = #{sendTime}</if>
-            <if test="receiveMsg != null  and receiveMsg != ''">and receive_msg = #{receiveMsg}</if>
-            <if test="receiveTime != null ">and receive_time = #{receiveTime}</if>
-            <if test="retryCount != null ">and retry_count = #{retryCount}</if>
+            <if test="seatId != null ">and seat_id = #{seatId}</if>
+            <if test="simType != null  and simType != ''">and sim_type = #{simType}</if>
+            <if test="simState != null  and simState != ''">and sim_state = #{simState}</if>
+            <if test="simSn != null  and simSn != ''">and sim_sn = #{simSn}</if>
         </where>
     </select>
 
-    <select id="selectSimMsgBySimMsgId" parameterType="Long" resultMap="SimMsgResult">
-        <include refid="selectSimMsgVo"/>
-        where sim_msg_id = #{simMsgId}
+    <select id="selectSimBySimId" parameterType="Long" resultMap="SimResult">
+        <include refid="selectSimVo"/>
+        where sim_id = #{simId}
     </select>
 
-    <insert id="insertSimMsg" parameterType="SimMsg" useGeneratedKeys="true" keyProperty="simMsgId">
-        insert into sim_sim_msg
+    <insert id="insertSim" parameterType="Sim" useGeneratedKeys="true" keyProperty="simId">
+        insert into sim_sim
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="simId != null">sim_id,</if>
-            <if test="state != null and state != ''">state,</if>
-            <if test="priority != null">priority,</if>
-            <if test="sendMsg != null">send_msg,</if>
-            <if test="sendTime != null">send_time,</if>
-            <if test="receiveMsg != null">receive_msg,</if>
-            <if test="receiveTime != null">receive_time,</if>
-            <if test="retryCount != null">retry_count,</if>
+            <if test="seatId != null">seat_id,</if>
+            <if test="simType != null and simType != ''">sim_type,</if>
+            <if test="simState != null and simState != ''">sim_state,</if>
+            <if test="simSn != null and simSn != ''">sim_sn,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
@@ -76,14 +60,10 @@
             <if test="remark != null">remark,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="simId != null">#{simId},</if>
-            <if test="state != null and state != ''">#{state},</if>
-            <if test="priority != null">#{priority},</if>
-            <if test="sendMsg != null">#{sendMsg},</if>
-            <if test="sendTime != null">#{sendTime},</if>
-            <if test="receiveMsg != null">#{receiveMsg},</if>
-            <if test="receiveTime != null">#{receiveTime},</if>
-            <if test="retryCount != null">#{retryCount},</if>
+            <if test="seatId != null">#{seatId},</if>
+            <if test="simType != null and simType != ''">#{simType},</if>
+            <if test="simState != null and simState != ''">#{simState},</if>
+            <if test="simSn != null and simSn != ''">#{simSn},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
@@ -92,36 +72,32 @@
         </trim>
     </insert>
 
-    <update id="updateSimMsg" parameterType="SimMsg">
-        update sim_sim_msg
+    <update id="updateSim" parameterType="Sim">
+        update sim_sim
         <trim prefix="SET" suffixOverrides=",">
-            <if test="simId != null">sim_id = #{simId},</if>
-            <if test="state != null and state != ''">state = #{state},</if>
-            <if test="priority != null">priority = #{priority},</if>
-            <if test="sendMsg != null">send_msg = #{sendMsg},</if>
-            <if test="sendTime != null">send_time = #{sendTime},</if>
-            <if test="receiveMsg != null">receive_msg = #{receiveMsg},</if>
-            <if test="receiveTime != null">receive_time = #{receiveTime},</if>
-            <if test="retryCount != null">retry_count = #{retryCount},</if>
+            <if test="seatId != null">seat_id = #{seatId},</if>
+            <if test="simType != null and simType != ''">sim_type = #{simType},</if>
+            <if test="simState != null and simState != ''">sim_state = #{simState},</if>
+            <if test="simSn != null and simSn != ''">sim_sn = #{simSn},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
         </trim>
-        where sim_msg_id = #{simMsgId}
+        where sim_id = #{simId}
     </update>
 
-    <delete id="deleteSimMsgBySimMsgId" parameterType="Long">
+    <delete id="deleteSimBySimId" parameterType="Long">
         delete
-        from sim_sim_msg
-        where sim_msg_id = #{simMsgId}
+        from sim_sim
+        where sim_id = #{simId}
     </delete>
 
-    <delete id="deleteSimMsgBySimMsgIds" parameterType="String">
-        delete from sim_sim_msg where sim_msg_id in
-        <foreach item="simMsgId" collection="array" open="(" separator="," close=")">
-            #{simMsgId}
+    <delete id="deleteSimBySimIds" parameterType="String">
+        delete from sim_sim where sim_id in
+        <foreach item="simId" collection="array" open="(" separator="," close=")">
+            #{simId}
         </foreach>
     </delete>
 </mapper>