feat: 更新了订单管理功能,添加了条码支付订单的通知功能。
This commit is contained in:
parent
f8f7048d70
commit
e8dbf9440c
@ -58,7 +58,7 @@ class StoreBranchProductExchangeLists extends BaseAdminDataLists implements List
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return StoreBranchProductExchange::where($this->searchWhere)->where($where)
|
return StoreBranchProductExchange::where($this->searchWhere)->where($where)
|
||||||
->field(['id','store_id','product_id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'unit', 'cost', 'status'])
|
->field(['id','store_id','product_id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'unit', 'cost', 'bar_code','status'])
|
||||||
->when(!empty($this->adminInfo['store_id']), function ($query) {
|
->when(!empty($this->adminInfo['store_id']), function ($query) {
|
||||||
$query->where('store_id', $this->adminInfo['store_id']);
|
$query->where('store_id', $this->adminInfo['store_id']);
|
||||||
})
|
})
|
||||||
|
@ -81,7 +81,7 @@ class StoreBranchProductLists extends BaseAdminDataLists implements ListsSearchI
|
|||||||
$this->searchWhere[] = $where;
|
$this->searchWhere[] = $where;
|
||||||
}
|
}
|
||||||
return StoreBranchProduct::where($this->searchWhere)
|
return StoreBranchProduct::where($this->searchWhere)
|
||||||
->field(['id', 'store_id', 'product_id', 'image', 'store_name', 'store_info', 'cate_id', 'price', 'sales', 'stock', 'unit', 'cost', 'purchase', 'status', 'batch', 'vip_price', 'manufacturer_information'])
|
->field(['id', 'store_id', 'product_id', 'image', 'store_name', 'store_info', 'cate_id', 'price', 'sales', 'stock', 'unit', 'cost', 'purchase', 'status', 'batch', 'vip_price','bar_code', 'manufacturer_information'])
|
||||||
->when(!empty($this->adminInfo['store_id']), function ($query) {
|
->when(!empty($this->adminInfo['store_id']), function ($query) {
|
||||||
$query->where('store_id', $this->adminInfo['store_id']);
|
$query->where('store_id', $this->adminInfo['store_id']);
|
||||||
})
|
})
|
||||||
|
@ -197,7 +197,7 @@ class OrderController extends BaseApiController
|
|||||||
Db::name('wechat_micropay')->insert(['order_id' => $order['order_id'], 'create_time' => time(), 'update_time' => time()]);
|
Db::name('wechat_micropay')->insert(['order_id' => $order['order_id'], 'create_time' => time(), 'update_time' => time()]);
|
||||||
Redis::send('send-code-pay', ['order_id' => $order['order_id']]);
|
Redis::send('send-code-pay', ['order_id' => $order['order_id']]);
|
||||||
try{
|
try{
|
||||||
$arr = ["msgtype" => "markdown", "markdown" => ["content" => "有新的条码支付订单"]];
|
$arr = ["msgtype" => "markdown", "markdown" => ["content" => "有新的条码支付订单|".$order['order_id']]];
|
||||||
$url = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=b538e44b-940b-445f-afe0-97320942d959';
|
$url = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=b538e44b-940b-445f-afe0-97320942d959';
|
||||||
(new Curl())->postJson($url, json_encode($arr));
|
(new Curl())->postJson($url, json_encode($arr));
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
@ -315,7 +315,7 @@ class OrderController extends BaseApiController
|
|||||||
Db::name('wechat_micropay')->insert(['order_id' => $order['order_id'], 'create_time' => time(), 'update_time' => time()]);
|
Db::name('wechat_micropay')->insert(['order_id' => $order['order_id'], 'create_time' => time(), 'update_time' => time()]);
|
||||||
Redis::send('send-code-pay', ['order_id' => $order['order_id']]);
|
Redis::send('send-code-pay', ['order_id' => $order['order_id']]);
|
||||||
try{
|
try{
|
||||||
$arr = ["msgtype" => "markdown", "markdown" => ["content" => "有新的条码支付订单"]];
|
$arr = ["msgtype" => "markdown", "markdown" => ["content" => "有新的条码支付订单|".$order['order_id']]];
|
||||||
$url = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=b538e44b-940b-445f-afe0-97320942d959';
|
$url = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=b538e44b-940b-445f-afe0-97320942d959';
|
||||||
(new Curl())->postJson($url, json_encode($arr));
|
(new Curl())->postJson($url, json_encode($arr));
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user