阶段更新

This commit is contained in:
2023-01-16 11:47:12 +08:00
parent 7ad0f6d03d
commit a680e8ff5e
13 changed files with 249 additions and 32 deletions

View File

@@ -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: 关联订单
*