阶段更新
This commit is contained in:
@@ -15,10 +15,12 @@ class AreaCode extends Model
|
||||
|
||||
const STATUS_INIT = 0;
|
||||
const STATUS_USED = 1;
|
||||
const STATUS_SIGN = 2;
|
||||
|
||||
const STATUS = [
|
||||
self::STATUS_INIT => '未提取',
|
||||
self::STATUS_USED => '已提取',
|
||||
self::STATUS_SIGN => '已核销',
|
||||
];
|
||||
|
||||
|
||||
@@ -46,6 +48,21 @@ class AreaCode extends Model
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 核销
|
||||
*
|
||||
* @Author: 玄尘
|
||||
* @Date: 2023/1/16 11:15
|
||||
*/
|
||||
public function sign()
|
||||
{
|
||||
$this->order->state = Order::STATUS_SIGNED;
|
||||
$this->order->save();
|
||||
$this->status = self::STATUS_SIGN;
|
||||
$this->save();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 关联订单
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user