瀏覽代碼

逻辑删除接口bug修复

zhangyang 2 年之前
父節點
當前提交
2f751bd9fc

+ 0 - 13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoTetherController.java

@@ -191,18 +191,5 @@ public class PoTetherController extends BaseController
         return toAjax(poTetherService.deletePoTetherByTetherIdsWithCollection(tetherIds));
     }
 
-    /**
-     * 逻辑删除
-     */
-    @PreAuthorize("@ss.hasPermi('system:tether:remove')")
-    @Log(title = "套系", businessType = BusinessType.DELETE)
-    @DeleteMapping("/delete/{tetherIds}")
-    public AjaxResult delete(@PathVariable Long[] tetherIds)
-    {
-        if (!getUsername().equals("admin")){
-            return AjaxResult.error("删除消息失败当前用户不是管理员");
-        }
-        return toAjax(poTetherService.removePoTetherByTetherIdsWithCollection(tetherIds));
-    }
 }
 

+ 0 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoTetherMapper.java

@@ -117,5 +117,4 @@ public interface PoTetherMapper
      */
     PoTether checkPostTetherImageUnique(String image);
 
-    void removePoTetherByTetherIdsWithCollection(Long[] tetherIds);
 }

+ 0 - 6
ruoyi-system/src/main/java/com/ruoyi/system/service/IPoTetherService.java

@@ -105,11 +105,5 @@ public interface IPoTetherService
      */
     String checkPostTetherImageUnique(TetherVo tetherVo);
 
-    /**
-     * 逻辑删除
-     * @param tetherIds
-     * @return
-     */
-    boolean removePoTetherByTetherIdsWithCollection(Long[] tetherIds);
 }
 

+ 0 - 6
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoTetherServiceImpl.java

@@ -229,11 +229,5 @@ public class PoTetherServiceImpl implements IPoTetherService
 
     }
 
-    @Override
-    public boolean removePoTetherByTetherIdsWithCollection(Long[] tetherIds) {
-
-        poTetherMapper.removePoTetherByTetherIdsWithCollection(tetherIds);
-        return true;
-    }
 }
 

+ 4 - 7
ruoyi-system/src/main/resources/mapper/system/PoTetherMapper.xml

@@ -184,20 +184,17 @@
         where tether_id = #{tetherId}
     </update>
 
-<!--    逻辑删除-->
-    <update id="removePoTetherByTetherIdsWithCollection">
-        update  po_tether set del_flag = '1'
-    </update>
 
     <delete id="deletePoTetherByTetherId" parameterType="Long">
         delete from po_tether where tether_id = #{tetherId}
     </delete>
 
-    <delete id="deletePoTetherByTetherIds" parameterType="String">
-        delete from po_tether where tether_id in
+<!--    逻辑删除接口-->
+    <update id="deletePoTetherByTetherIds" parameterType="String">
+        update  po_tether set del_flag = '1'  where tether_id in
         <foreach item="tetherId" collection="array" open="(" separator="," close=")">
             #{tetherId}
         </foreach>
-    </delete>
+    </update>
 </mapper>