更新删除数据处理
This commit is contained in:
parent
fd5077e500
commit
7a50e0ec34
|
@ -125,6 +125,9 @@ class DeviceLogic extends BaseLogic
|
|||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
Db::name('product_device')->where('device_id', $params['id'])->delete();
|
||||
Db::name('device_monitor_data')->where('device_id', $params['id'])->delete();
|
||||
Db::name('monitor_alarm')->where('device_id', $params['id'])->delete();
|
||||
return Device::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ class LandPlantLogic extends BaseLogic
|
|||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
Db::name('land_plant_action')->where('plant_id', $params['id'])->delete();
|
||||
return LandPlant::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ class ProductLogic extends BaseLogic
|
|||
public static function delete(array $params): bool
|
||||
{
|
||||
Db::name('land_product')->where('product_id', $params['id'])->delete();
|
||||
Db::name('monitor_data')->where('product_id', $params['id'])->delete();
|
||||
return Product::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue