diff --git a/app/api/logic/operation/OpurchaseGoodsOfferLogic.php b/app/api/logic/operation/OpurchaseGoodsOfferLogic.php index 52c18c1..d53ef9c 100644 --- a/app/api/logic/operation/OpurchaseGoodsOfferLogic.php +++ b/app/api/logic/operation/OpurchaseGoodsOfferLogic.php @@ -19,6 +19,15 @@ class OpurchaseGoodsOfferLogic extends BaseLogic{ 'update_time' => time() ]); } + $id=$params['data'][0]['id']??0; + if($id){ + $find=OpurchaseGoodsOffer::where('id',$params['data'][0]['id'])->field('supplier_id','create_time')->find(); + if($find){ + $time=date('Y-m-d',$find['create_time']); + Db::name('opurchase_goods_offer_date')->where('supplier_id', $find['supplier_id'])->whereDay('create_time',$time)->update(['status'=>1]); + } + } + Db::commit(); return true; } catch (\Exception $e) {