Browse Source

仓库删除修复

test
kilo 2 years ago
parent
commit
88b525a486
  1. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
  2. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java

@ -153,6 +153,7 @@ public class BasicdataWarehouseController extends BladeController {
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam List<String> ids) {
boolean result = warehouseService.removeWarehouse(ids);
return R.status(result);
}

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml

@ -51,8 +51,8 @@
UPDATE logpm_warehouse_warehouse
SET is_deleted = 1
WHERE
NOT EXISTS ( SELECT b.id FROM logpm_warehouse_goods_area b WHERE b.warehouse_id = #{id} )
AND NOT EXISTS (SELECT f.id FROM logpm_basic_team_group f WHERE f.belong_to=#{id})
NOT EXISTS ( SELECT b.id FROM logpm_warehouse_goods_area b WHERE b.warehouse_id = #{id} AND b.is_deleted = 0)
AND NOT EXISTS (SELECT f.id FROM logpm_basic_team_group f WHERE f.belong_to=#{id} AND f.is_deleted = 0 )
AND id = #{id}
</update>

Loading…
Cancel
Save