You've already forked guangan
订单下单相关
This commit is contained in:
@ -44,54 +44,58 @@ class PointsMallOrder extends Model
|
||||
// {
|
||||
// return $this->hasMany(PluginPaymentRecord::class, 'order_no', 'order_no')->order('id desc')->withoutField('payment_notify');
|
||||
// }
|
||||
|
||||
/**
|
||||
* 关联收货地址
|
||||
* @return \think\model\relation\HasOne
|
||||
*/
|
||||
public function address()
|
||||
{
|
||||
return $this->hasOne(PointsMallAddress::class, 'id', 'address_id');
|
||||
}
|
||||
public function sender()
|
||||
{
|
||||
return $this->hasOne(PointsMallOrderSender::class, 'order_no', 'order_no');
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 关联收货地址
|
||||
// * @return \think\model\relation\HasOne
|
||||
// * 格式化支付通道
|
||||
// * @param mixed $value
|
||||
// * @return array
|
||||
// */
|
||||
// public function address()
|
||||
// public function getPaymentAllowsAttr($value): array
|
||||
// {
|
||||
// return $this->hasOne(PluginWemallOrderSender::class, 'order_no', 'order_no');
|
||||
// $payments = is_string($value) ? str2arr($value) : [];
|
||||
// return in_array('all', $payments) ? ['all'] : $payments;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 时间格式处理
|
||||
// * @param mixed $value
|
||||
// * @return string
|
||||
// */
|
||||
// public function getPaymentTimeAttr($value): string
|
||||
// {
|
||||
// return $this->getCreateTimeAttr($value);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 时间格式处理
|
||||
// * @param mixed $value
|
||||
// * @return string
|
||||
// */
|
||||
// public function setPaymentTimeAttr($value): string
|
||||
// {
|
||||
// return $this->setCreateTimeAttr($value);
|
||||
// }
|
||||
//
|
||||
// public function setConfirmTimeAttr($value): string
|
||||
// {
|
||||
// return $this->setCreateTimeAttr($value);
|
||||
// }
|
||||
//
|
||||
// public function getConfirmTimeAttr($value): string
|
||||
// {
|
||||
// return $this->getCreateTimeAttr($value);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 格式化支付通道
|
||||
* @param mixed $value
|
||||
* @return array
|
||||
*/
|
||||
public function getPaymentAllowsAttr($value): array
|
||||
{
|
||||
$payments = is_string($value) ? str2arr($value) : [];
|
||||
return in_array('all', $payments) ? ['all'] : $payments;
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间格式处理
|
||||
* @param mixed $value
|
||||
* @return string
|
||||
*/
|
||||
public function getPaymentTimeAttr($value): string
|
||||
{
|
||||
return $this->getCreateTimeAttr($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间格式处理
|
||||
* @param mixed $value
|
||||
* @return string
|
||||
*/
|
||||
public function setPaymentTimeAttr($value): string
|
||||
{
|
||||
return $this->setCreateTimeAttr($value);
|
||||
}
|
||||
|
||||
public function setConfirmTimeAttr($value): string
|
||||
{
|
||||
return $this->setCreateTimeAttr($value);
|
||||
}
|
||||
|
||||
public function getConfirmTimeAttr($value): string
|
||||
{
|
||||
return $this->getCreateTimeAttr($value);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user