Merge pull request 'feat: 修改StoreOrder模型以处理订单状态的获取逻辑' (#58) from dev into rose

Reviewed-on: #58
This commit is contained in:
mkm 2024-07-27 10:10:56 +08:00
commit af37f15da3

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;
}