Эх сурвалжийг харах

消息内容表、中间表删除

季琰淞 2 жил өмнө
parent
commit
4da75ffb0f

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/LcdInfoController.java

@@ -103,9 +103,9 @@ public class LcdInfoController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:info:remove')")
     @PreAuthorize("@ss.hasPermi('system:info:remove')")
     @Log(title = "消息", businessType = BusinessType.DELETE)
     @Log(title = "消息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
+    public AjaxResult remove(@PathVariable Long ids)
     {
     {
-        return toAjax(lcdInfoService.deleteLcdInfoByIds(ids));
+        return toAjax(lcdInfoService.deleteLcdInfoById(ids));
     }
     }
     /**
     /**
      * 搜索消息列表.
      * 搜索消息列表.

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/LcdInfoServiceImpl.java

@@ -118,6 +118,7 @@ public class LcdInfoServiceImpl implements ILcdInfoService {
      */
      */
     @Override
     @Override
     public int deleteLcdInfoById(Long id) {
     public int deleteLcdInfoById(Long id) {
+        lcdInfoUserRelationMapper.deleteLcdInfoUserRelationById(id);
         return lcdInfoMapper.deleteLcdInfoById(id);
         return lcdInfoMapper.deleteLcdInfoById(id);
     }
     }
 
 

+ 1 - 1
ruoyi-system/src/main/resources/mapper/system/LcdInfoUserRelationMapper.xml

@@ -59,7 +59,7 @@
     </update>
     </update>
 
 
     <delete id="deleteLcdInfoUserRelationById" parameterType="Long">
     <delete id="deleteLcdInfoUserRelationById" parameterType="Long">
-        delete from lcd_info_user_relation where id = #{id}
+        delete from lcd_info_user_relation where lcd_info_id = #{id}
     </delete>
     </delete>
 
 
     <delete id="deleteLcdInfoUserRelationByIds" parameterType="String">
     <delete id="deleteLcdInfoUserRelationByIds" parameterType="String">