diff --git a/app/Http/Controllers/Mobile/SupplyDemandController.php b/app/Http/Controllers/Mobile/SupplyDemandController.php index d01220d..3221734 100755 --- a/app/Http/Controllers/Mobile/SupplyDemandController.php +++ b/app/Http/Controllers/Mobile/SupplyDemandController.php @@ -259,6 +259,12 @@ class SupplyDemandController extends CommonController if (isset($all['supply_demand_id'])) { SupplyDemand::where('id', $all['supply_demand_id'])->increment('contact_count'); } + } else { + // 存在对话,如果也存在供需信息id,则更新供需id到最新 + if (isset($all['supply_demand_id'])) { + $dialogue->supply_demand_id = $all['supply_demand_id']; + $dialogue->save(); + } } if (isset($all['supply_demand_id'])) { $now = date('Y-m-d');