更新种植面积

This commit is contained in:
yaooo 2023-12-07 16:05:59 +08:00
parent 0d613a3a10
commit 170e96505e
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ class LandPlantLogic extends BaseLogic
public static function delete(array $params): bool
{
$landPlant = LandPlant::findOrEmpty($params['id'])->toArray();
Land::where('id', $landPlant['land_id'])->inc('score', $landPlant['area'])->update();
Land::where('id', $landPlant['land_id'])->inc('residual_area', $landPlant['area'])->update();
Db::name('land_plant_action')->where('plant_id', $params['id'])->delete();
return LandPlant::destroy($params['id']);
}