feat: 修改StoreOrder模型以处理订单状态的获取逻辑

This commit is contained in:
mkm 2024-07-27 10:10:04 +08:00
parent 1c1a34e618
commit ce0fa6c394

View File

@ -40,7 +40,12 @@ class StoreOrder extends BaseModel
public function getStatusNameTextAttr($value, $data)
{
$status = OrderEnum::getOrderType($data['status']) ?? '';
if($data['status']==-1){
$status = OrderEnum::refundStatus($data['refund_status']) ?? '';
}else{
$status = OrderEnum::getOrderType($data['status']) ?? '';
}
return $status;
}