Browse Source

创建 table sim_sim_msg 相关。

tom 5 tháng trước cách đây
mục cha
commit
5efc65c161

+ 13 - 11
ruoyi-sim/src/main/java/com/ruoyi/sim/controller/SimMsgController.java

@@ -3,6 +3,7 @@ package com.ruoyi.sim.controller;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -37,8 +38,9 @@ public class SimMsgController extends BaseController {
     /**
      * 查询模拟器报文列表
      */
-    @PreAuthorize("@ss.hasPermi('sim:sim_msg:list')")
+    // @PreAuthorize("@ss.hasPermi('sim:sim_msg:list')")
     @GetMapping("/list")
+    @ApiOperation("查询模拟器报文列表")
     public TableDataInfo list(SimMsg simMsg) {
         startPage();
         List<SimMsg> list = simMsgService.selectSimMsgList(simMsg);
@@ -48,9 +50,9 @@ public class SimMsgController extends BaseController {
     /**
      * 导出模拟器报文列表
      */
-    @PreAuthorize("@ss.hasPermi('sim:sim_msg:export')")
+    // @PreAuthorize("@ss.hasPermi('sim:sim_msg:export')")
     @Log(title = "模拟器报文", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
+    // @PostMapping("/export")
     public void export(HttpServletResponse response, SimMsg simMsg) {
         List<SimMsg> list = simMsgService.selectSimMsgList(simMsg);
         ExcelUtil<SimMsg> util = new ExcelUtil<SimMsg>(SimMsg.class);
@@ -60,8 +62,8 @@ public class SimMsgController extends BaseController {
     /**
      * 获取模拟器报文详细信息
      */
-    @PreAuthorize("@ss.hasPermi('sim:sim_msg:query')")
-    @GetMapping(value = "/{simMsgId}")
+    // @PreAuthorize("@ss.hasPermi('sim:sim_msg:query')")
+    // @GetMapping(value = "/{simMsgId}")
     public AjaxResult getInfo(@PathVariable("simMsgId") Long simMsgId) {
         return success(simMsgService.selectSimMsgBySimMsgId(simMsgId));
     }
@@ -69,9 +71,9 @@ public class SimMsgController extends BaseController {
     /**
      * 新增模拟器报文
      */
-    @PreAuthorize("@ss.hasPermi('sim:sim_msg:add')")
+    // @PreAuthorize("@ss.hasPermi('sim:sim_msg:add')")
     @Log(title = "模拟器报文", businessType = BusinessType.INSERT)
-    @PostMapping
+    // @PostMapping
     public AjaxResult add(@RequestBody SimMsg simMsg) {
         return toAjax(simMsgService.insertSimMsg(simMsg));
     }
@@ -79,9 +81,9 @@ public class SimMsgController extends BaseController {
     /**
      * 修改模拟器报文
      */
-    @PreAuthorize("@ss.hasPermi('sim:sim_msg:edit')")
+    // @PreAuthorize("@ss.hasPermi('sim:sim_msg:edit')")
     @Log(title = "模拟器报文", businessType = BusinessType.UPDATE)
-    @PutMapping
+    // @PutMapping
     public AjaxResult edit(@RequestBody SimMsg simMsg) {
         return toAjax(simMsgService.updateSimMsg(simMsg));
     }
@@ -89,9 +91,9 @@ public class SimMsgController extends BaseController {
     /**
      * 删除模拟器报文
      */
-    @PreAuthorize("@ss.hasPermi('sim:sim_msg:remove')")
+    // @PreAuthorize("@ss.hasPermi('sim:sim_msg:remove')")
     @Log(title = "模拟器报文", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{simMsgIds}")
+    // @DeleteMapping("/{simMsgIds}")
     public AjaxResult remove(@PathVariable Long[] simMsgIds) {
         return toAjax(simMsgService.deleteSimMsgBySimMsgIds(simMsgIds));
     }

+ 64 - 40
ruoyi-sim/src/main/resources/mapper/sim/SimMapper.xml

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