Browse Source

修改无人机删除和修改bug

bihs 3 days ago
parent
commit
e52f923e87

+ 2 - 2
src/main/java/com/sooka/sponest/monitor/uav/controller/CentermonitorTUavController.java

@@ -870,7 +870,7 @@ public class CentermonitorTUavController extends BaseController {
      * 获取无人机详细信息
      */
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
+    public AjaxResult getInfo(@PathVariable("id") String id) {
         return AjaxResult.success(centermonitorTUavService.selectCentermonitorTUavById(id));
     }
 
@@ -897,7 +897,7 @@ public class CentermonitorTUavController extends BaseController {
      */
     @Log(title = "无人机", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids) {
+    public AjaxResult remove(@PathVariable String[] ids) {
         return toAjax(centermonitorTUavService.deleteCentermonitorTUavByIds(ids));
     }
 

+ 3 - 3
src/main/java/com/sooka/sponest/monitor/uav/mapper/CentermonitorTUavMapper.java

@@ -18,7 +18,7 @@ public interface CentermonitorTUavMapper {
      * @param id 无人机主键
      * @return 无人机
      */
-    public CentermonitorTUav selectCentermonitorTUavById(Long id);
+    public CentermonitorTUav selectCentermonitorTUavById(String id);
 
     /**
      * 查询无人机列表
@@ -50,7 +50,7 @@ public interface CentermonitorTUavMapper {
      * @param id 无人机主键
      * @return 结果
      */
-    public int deleteCentermonitorTUavById(Long id);
+    public int deleteCentermonitorTUavById(String id);
 
     /**
      * 批量删除无人机
@@ -58,7 +58,7 @@ public interface CentermonitorTUavMapper {
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteCentermonitorTUavByIds(Long[] ids);
+    public int deleteCentermonitorTUavByIds(String[] ids);
 
     /**
      * 根据部门id查询无人机列表

+ 3 - 3
src/main/java/com/sooka/sponest/monitor/uav/service/ICentermonitorTUavService.java

@@ -17,7 +17,7 @@ public interface ICentermonitorTUavService {
      * @param id 无人机主键
      * @return 无人机
      */
-    public CentermonitorTUav selectCentermonitorTUavById(Long id);
+    public CentermonitorTUav selectCentermonitorTUavById(String id);
 
     /**
      * 查询无人机列表
@@ -49,7 +49,7 @@ public interface ICentermonitorTUavService {
      * @param ids 需要删除的无人机主键集合
      * @return 结果
      */
-    public int deleteCentermonitorTUavByIds(Long[] ids);
+    public int deleteCentermonitorTUavByIds(String[] ids);
 
     /**
      * 删除无人机信息
@@ -57,7 +57,7 @@ public interface ICentermonitorTUavService {
      * @param id 无人机主键
      * @return 结果
      */
-    public int deleteCentermonitorTUavById(Long id);
+    public int deleteCentermonitorTUavById(String id);
 
     /**
      * 根据部门id查询无人机列表

+ 3 - 3
src/main/java/com/sooka/sponest/monitor/uav/service/impl/CentermonitorTUavServiceImpl.java

@@ -34,7 +34,7 @@ public class CentermonitorTUavServiceImpl implements ICentermonitorTUavService {
      * @return 无人机
      */
     @Override
-    public CentermonitorTUav selectCentermonitorTUavById(Long id) {
+    public CentermonitorTUav selectCentermonitorTUavById(String id) {
         return centermonitorTUavMapper.selectCentermonitorTUavById(id);
     }
 
@@ -78,7 +78,7 @@ public class CentermonitorTUavServiceImpl implements ICentermonitorTUavService {
      * @return 结果
      */
     @Override
-    public int deleteCentermonitorTUavByIds(Long[] ids) {
+    public int deleteCentermonitorTUavByIds(String[] ids) {
         return centermonitorTUavMapper.deleteCentermonitorTUavByIds(ids);
     }
 
@@ -89,7 +89,7 @@ public class CentermonitorTUavServiceImpl implements ICentermonitorTUavService {
      * @return 结果
      */
     @Override
-    public int deleteCentermonitorTUavById(Long id) {
+    public int deleteCentermonitorTUavById(String id) {
         return centermonitorTUavMapper.deleteCentermonitorTUavById(id);
     }
 

+ 1 - 1
src/main/resources/mapper/monitor/uav/CentermonitorTUavMapper.xml

@@ -93,7 +93,7 @@
         where id = #{id}
     </update>
 
-    <delete id="deleteCentermonitorTUavById" parameterType="Long">
+    <delete id="deleteCentermonitorTUavById" parameterType="String">
         delete
         from centermonitor_t_uav
         where id = #{id}