Initial commit: queue workspace
Made-with: Cursor
This commit is contained in:
83
pro_v3.5.1/app/controller/admin/v1/supplier/StoreOrder.php
Normal file
83
pro_v3.5.1/app/controller/admin/v1/supplier/StoreOrder.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\controller\admin\v1\supplier;
|
||||
|
||||
use think\annotation\Inject;
|
||||
use app\controller\admin\AuthController;
|
||||
use app\services\order\StoreOrderServices;
|
||||
use app\common\controller\Order as CommonOrder;
|
||||
use app\services\order\supplier\SupplierOrderServices;
|
||||
|
||||
/**
|
||||
* Class StoreOrder
|
||||
* @package app\controller\admin\v1\supplier
|
||||
*/
|
||||
class StoreOrder extends AuthController
|
||||
{
|
||||
use CommonOrder;
|
||||
|
||||
/**
|
||||
* @var StoreOrderServices
|
||||
*/
|
||||
#[Inject]
|
||||
protected StoreOrderServices $services;
|
||||
|
||||
/**
|
||||
* 订单列表
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$where = $this->request->getMore([
|
||||
['status', ''],
|
||||
['real_name', ''],
|
||||
['is_del', ''],
|
||||
['data', '', '', 'time'],
|
||||
['type', ''],
|
||||
['pay_type', ''],
|
||||
['order', ''],
|
||||
['field_key', ''],
|
||||
['supplier_id', '']
|
||||
]);
|
||||
|
||||
if ($where['supplier_id'] < 1) {
|
||||
$where['supplier_id'] = -1;
|
||||
}
|
||||
$where['type'] = trim($where['type']);
|
||||
$where['is_system_del'] = 0;
|
||||
|
||||
$where['store_id'] = 0;
|
||||
$where['type'] = trim($where['type'], ' ');
|
||||
return $this->success($this->services->getOrderList($where, ['*'], ['split' => function ($query) {
|
||||
$query->field('id,pid');
|
||||
}, 'pink', 'invoice', 'supplier']));
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒发货
|
||||
* @param $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function deliverRemind(int $supplierId, int $id)
|
||||
{
|
||||
if (!$supplierId || !$id) return $this->fail('参数异常');
|
||||
|
||||
/** @var SupplierOrderServices $supplierOrderServices */
|
||||
$supplierOrderServices = app()->make(SupplierOrderServices::class);
|
||||
$supplierOrderServices->deliverRemind($supplierId, $id);
|
||||
return $this->success('提醒成功');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user