fix(app): 修复删除预订单购物车信息时的逻辑
- 在删除预订单购物车信息时,检查是否为买家 - 如果是买家,同时更新 PurchaseProductOffer 表中相关记录的删除时间
This commit is contained in:
parent
028adb47cb
commit
aa1c11d557
@ -231,6 +231,10 @@ class BeforehandOrderCartInfoLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function delete(array $params): bool
|
public static function delete(array $params): bool
|
||||||
{
|
{
|
||||||
|
$find=BeforehandOrderCartInfo::where('id',$params['id'])->find();
|
||||||
|
if($find['is_buyer']==1){
|
||||||
|
PurchaseProductOffer::where('order_id',$find['bhoid'])->where('product_id',$find['product_id'])->update(['delete_time'=>time()]);
|
||||||
|
}
|
||||||
return BeforehandOrderCartInfo::destroy($params['id']);
|
return BeforehandOrderCartInfo::destroy($params['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user