添加开发者发货功能
This commit is contained in:
@@ -6,6 +6,7 @@ use app\common\service\AccountLogService;
|
||||
use app\common\service\AccountService;
|
||||
use app\common\service\EasyWeChatService;
|
||||
use app\common\service\OrderService;
|
||||
use app\common\service\OrderShipService;
|
||||
use app\common\service\SubscribeMessageService;
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
@@ -45,8 +46,13 @@ class DemandDeal extends Command
|
||||
foreach ($demandList as $item) {
|
||||
try {
|
||||
Db::transaction(function () use ($item, $confirmReceiptTimeoutDay) {
|
||||
//如果七天未确认收货,则自动确认收货
|
||||
if (time() > strtotime("+$confirmReceiptTimeoutDay day", $item->accept_time)) {
|
||||
//未发货的需求不自动确认收货,等待开发者发货交付
|
||||
$ship = OrderShipService::where(['demand_id' => $item->id])->order('id', 'desc')->find();
|
||||
if (!$ship) {
|
||||
return;
|
||||
}
|
||||
//发货后N天未确认收货,则自动确认收货
|
||||
if (time() > strtotime("+$confirmReceiptTimeoutDay day", intval($ship->createtime))) {
|
||||
$item->status = DemandService::STATUS_FINISHED;
|
||||
$item->settle_status = DemandService::$Common::ONGOING;
|
||||
$saveRes = $item->save();
|
||||
|
||||
Reference in New Issue
Block a user