@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
namespace addons\shopro\listener\order;
|
||||
|
||||
use addons\shopro\exception\Exception;
|
||||
use addons\shopro\model\Cart;
|
||||
use addons\shopro\model\Config;
|
||||
use addons\shopro\model\Order;
|
||||
use addons\shopro\model\Store;
|
||||
use addons\shopro\model\User;
|
||||
|
||||
/**
|
||||
* 支付成功事件监听
|
||||
*/
|
||||
class Payed
|
||||
{
|
||||
|
||||
// 订单支付成功事件
|
||||
public function orderPayedAfter(&$params) {
|
||||
// 订单对象
|
||||
$order = $params["order"];
|
||||
|
||||
// 重新查询带明细项的完整订单
|
||||
$order = Order::with("item")->where("id", $order["id"])->find();
|
||||
$items = $order ? $order["item"] : [];
|
||||
|
||||
// 1. 订单提交后只创建唯一打印任务;实际云打印由独立队列执行。
|
||||
$this->queuePrintOrder($order);
|
||||
|
||||
// 2. 门店管理员通知
|
||||
$storeIds = [];
|
||||
foreach ($items as $item) {
|
||||
if (in_array($item["dispatch_type"], ["store", "selfetch"]) && $item["store_id"]) {
|
||||
$storeIds[] = $item["store_id"];
|
||||
}
|
||||
}
|
||||
|
||||
$data = [];
|
||||
if ($storeIds) {
|
||||
$data = [];
|
||||
// 存在门店,查询门店管理员
|
||||
$stores = Store::with(["userStore.user"])->where("id", "in", $storeIds)->select();
|
||||
foreach ($stores as $key => $store) {
|
||||
$userStoreList = $store["user_store"] ? : [];
|
||||
unset($store["user_store"]);
|
||||
|
||||
// 当前门店所有用户管理员
|
||||
$userList = [];
|
||||
foreach ($userStoreList as $user) {
|
||||
if ($user["user"]) {
|
||||
$userList[] = $user["user"];
|
||||
}
|
||||
}
|
||||
|
||||
// 有用户才能发送消息
|
||||
if ($userList) {
|
||||
$data[] = [
|
||||
"store" => $store,
|
||||
"userList" => $userList
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 存在要通知的门店管理员
|
||||
if ($data) {
|
||||
// 按门店为单位发送通知
|
||||
foreach ($data as $key => $sendData) {
|
||||
\addons\shopro\library\notify\Notify::send(
|
||||
$sendData["userList"],
|
||||
new \addons\shopro\notifications\store\Order([
|
||||
"store" => $sendData["store"],
|
||||
"order" => $order,
|
||||
"event" => "store_order_new"
|
||||
])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function queuePrintOrder($order)
|
||||
{
|
||||
if (!$order) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$task = \think\Db::name('shopro_order_print_task')->where('order_id', $order['id'])->find();
|
||||
if (!$task) {
|
||||
try {
|
||||
\think\Db::name('shopro_order_print_task')->insert([
|
||||
'order_id' => $order['id'],
|
||||
'order_sn' => $order['order_sn'],
|
||||
'status' => 0,
|
||||
'attempts' => 0,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
]);
|
||||
$task = true;
|
||||
} catch (\Exception $e) {
|
||||
// 唯一索引冲突表示另一个事件已创建任务,禁止重复入队。
|
||||
$task = \think\Db::name('shopro_order_print_task')->where('order_id', $order['id'])->find();
|
||||
}
|
||||
}
|
||||
|
||||
if ($task && (!is_array($task) || (int)$task['status'] !== 1)) {
|
||||
\think\Queue::push('\\addons\\shopro\\job\\OrderPrint@handle', ['order_id' => $order['id']], 'shopro-high');
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
\think\Log::record('创建小票打印任务失败,订单ID ' . $order['id'] . ': ' . $e->getMessage(), 'error');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\library;
|
||||
|
||||
class PrinterService
|
||||
{
|
||||
protected $user;
|
||||
protected $ukey;
|
||||
protected $sn;
|
||||
protected $url = 'https://open.xpyun.net/api/openapi/xprinter/';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$config = function_exists('config') ? config('printer') : [];
|
||||
if (empty($config)) {
|
||||
$configFile = __DIR__ . '/../../extra/printer.php';
|
||||
$config = file_exists($configFile) ? include $configFile : [];
|
||||
}
|
||||
|
||||
$this->user = isset($config['client_id']) ? trim($config['client_id']) : '';
|
||||
$this->ukey = isset($config['client_secret']) ? trim($config['client_secret']) : '';
|
||||
$this->sn = isset($config['sn']) ? trim($config['sn']) : '';
|
||||
}
|
||||
|
||||
public function queryStatus()
|
||||
{
|
||||
return $this->sendRequest('queryPrinterStatus', ['sn' => $this->sn]);
|
||||
}
|
||||
|
||||
public function queryOrderState($cloudOrderId)
|
||||
{
|
||||
$result = $this->sendRequest('queryOrderState', ['orderId' => (string)$cloudOrderId]);
|
||||
$result['printed'] = !empty($result['accepted']) && !empty($result['data']);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function printOrder($orderData = [], $copies = 1)
|
||||
{
|
||||
$content = $this->buildReceiptContent($orderData);
|
||||
if ($this->gbkLength($content) > 12 * 1024) {
|
||||
return $this->failure('打印内容超过芯烨云 12KB 限制');
|
||||
}
|
||||
|
||||
$result = $this->sendRequest('print', [
|
||||
'sn' => $this->sn,
|
||||
'content' => $content,
|
||||
'copies' => max(1, min(65535, (int)$copies)),
|
||||
// 离线时由芯烨云暂存,避免本地重发造成重复小票。
|
||||
'mode' => 1,
|
||||
'expiresIn' => 3600,
|
||||
'idempotent' => isset($orderData['print_idempotent']) ? $orderData['print_idempotent'] : '',
|
||||
]);
|
||||
|
||||
if (!empty($result['accepted']) && !is_scalar($result['data'])) {
|
||||
return $this->failure('芯烨云未返回打印订单号', $result['response']);
|
||||
}
|
||||
if (!empty($result['accepted'])) {
|
||||
$result['cloud_order_id'] = (string)$result['data'];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function buildReceiptContent($order = [])
|
||||
{
|
||||
$title = $this->cleanText(isset($order['shop_name']) ? $order['shop_name'] : '小众厨房设备商城');
|
||||
$orderSn = $this->cleanText(isset($order['order_sn']) ? $order['order_sn'] : 'TEST' . date('YmdHis'));
|
||||
$createTime = isset($order['createtime']) ? date('Y-m-d H:i:s', $order['createtime']) : date('Y-m-d H:i:s');
|
||||
$consignee = $this->cleanText(isset($order['consignee']) ? $order['consignee'] : '测试用户');
|
||||
$phone = $this->cleanText(isset($order['phone']) ? $order['phone'] : '138****8888');
|
||||
$address = $this->cleanText(isset($order['address']) ? $order['address'] : '贵州省修文县城内');
|
||||
$totalAmount = $this->cleanText(isset($order['total_fee']) ? $order['total_fee'] : '0.01');
|
||||
|
||||
$info = '<CB>' . $title . '<BR></CB>';
|
||||
$info .= '<CB>-- 订单小票 --<BR></CB>';
|
||||
$info .= '--------------------------------<BR>';
|
||||
$info .= '订单编号:' . $orderSn . '<BR>';
|
||||
$info .= '下单时间:' . $createTime . '<BR>';
|
||||
$info .= '--------------------------------<BR>';
|
||||
$info .= '商品名称 数量 单价<BR>';
|
||||
|
||||
foreach (!empty($order['items']) && is_array($order['items']) ? $order['items'] : [] as $item) {
|
||||
$info .= $this->cleanText(isset($item['name']) ? $item['name'] : '商品') . ' '
|
||||
. $this->cleanText(isset($item['num']) ? $item['num'] : 1) . ' ¥'
|
||||
. $this->cleanText(isset($item['price']) ? $item['price'] : '0.00') . '<BR>';
|
||||
}
|
||||
|
||||
$info .= '--------------------------------<BR>';
|
||||
$info .= '合计金额:¥' . $totalAmount . ' 元<BR>';
|
||||
$info .= '客户姓名:' . $consignee . '<BR>';
|
||||
$info .= '联系电话:' . $phone . '<BR>';
|
||||
$info .= '送货地址:' . $address . '<BR>';
|
||||
$info .= '--------------------------------<BR>';
|
||||
return $info . '<CB>谢谢惠顾,欢迎再次光临!<BR><BR></CB>';
|
||||
}
|
||||
|
||||
protected function sendRequest($endpoint, array $data)
|
||||
{
|
||||
if (!$this->user || !$this->ukey || !$this->sn) {
|
||||
return $this->failure('打印机配置不完整');
|
||||
}
|
||||
|
||||
$timestamp = (string)time();
|
||||
$payload = array_merge($data, [
|
||||
'user' => $this->user,
|
||||
'timestamp' => $timestamp,
|
||||
'sign' => sha1($this->user . $this->ukey . $timestamp),
|
||||
]);
|
||||
$json = json_encode($payload, JSON_UNESCAPED_UNICODE);
|
||||
if ($json === false) {
|
||||
return $this->failure('打印请求编码失败');
|
||||
}
|
||||
|
||||
$ch = curl_init($this->url . $endpoint);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json;charset=UTF-8', 'Accept: application/json']);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||
$body = curl_exec($ch);
|
||||
$error = curl_error($ch);
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
if ($error) {
|
||||
return $this->failure('云打印请求失败: ' . $error, '', true);
|
||||
}
|
||||
|
||||
$response = trim((string)$body);
|
||||
$decoded = json_decode($response, true);
|
||||
$accepted = $httpCode >= 200 && $httpCode < 300 && is_array($decoded)
|
||||
&& isset($decoded['code']) && (int)$decoded['code'] === 0;
|
||||
|
||||
return [
|
||||
'accepted' => $accepted,
|
||||
'data' => is_array($decoded) && array_key_exists('data', $decoded) ? $decoded['data'] : null,
|
||||
'response' => mb_substr($response, 0, 1000, 'UTF-8'),
|
||||
'error' => $accepted ? '' : (is_array($decoded) && !empty($decoded['msg']) ? $decoded['msg'] : '云打印未受理,HTTP ' . $httpCode),
|
||||
'uncertain' => false,
|
||||
];
|
||||
}
|
||||
|
||||
protected function failure($error, $response = '', $uncertain = false)
|
||||
{
|
||||
return ['accepted' => false, 'data' => null, 'response' => $response, 'error' => $error, 'uncertain' => $uncertain];
|
||||
}
|
||||
|
||||
protected function gbkLength($content)
|
||||
{
|
||||
$encoded = function_exists('mb_convert_encoding')
|
||||
? @mb_convert_encoding($content, 'GBK', 'UTF-8')
|
||||
: @iconv('UTF-8', 'GBK//IGNORE', $content);
|
||||
return $encoded === false ? strlen($content) : strlen($encoded);
|
||||
}
|
||||
|
||||
protected function cleanText($value)
|
||||
{
|
||||
return preg_replace('/[\r\n\t]+/', ' ', strip_tags((string)$value));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
namespace addons\shopro\job;
|
||||
|
||||
use addons\shopro\library\traits\ActivityCache;
|
||||
use addons\shopro\library\traits\Groupon;
|
||||
use addons\shopro\library\traits\StockSale;
|
||||
use addons\shopro\model\Config;
|
||||
use addons\shopro\model\GoodsComment;
|
||||
use addons\shopro\model\Order;
|
||||
use addons\shopro\model\OrderAction;
|
||||
use addons\shopro\model\OrderItem;
|
||||
use think\queue\Job;
|
||||
|
||||
/**
|
||||
* 订单支付完成
|
||||
*/
|
||||
class OrderPayed extends BaseJob
|
||||
{
|
||||
use StockSale, ActivityCache, Groupon;
|
||||
|
||||
/**
|
||||
* 订单支付完成
|
||||
*/
|
||||
public function payed(Job $job, $data)
|
||||
{
|
||||
try {
|
||||
$order = $data['order'];
|
||||
$user = $data['user'];
|
||||
$order = Order::with('item')->where('id', $order['id'])->find();
|
||||
|
||||
// 数据库删订单的问题常见,这里被删的订单直接把队列移除
|
||||
if ($order) {
|
||||
\think\Db::transaction(function () use ($order, $user, $data) {
|
||||
// 订单减库存
|
||||
$this->realForwardStockSale($order);
|
||||
|
||||
// 判断,如果是拼团 真实加入团
|
||||
if (strpos($order['activity_type'], 'groupon') !== false) {
|
||||
$this->joinGroupon($order, $user);
|
||||
}
|
||||
|
||||
// 处理发票审核
|
||||
if ($order->invoice_status == 1) {
|
||||
$invoice = \addons\shopro\model\OrderInvoice::get(['order_id' => $order->id]);
|
||||
if ($invoice) {
|
||||
$invoice->status = 0;
|
||||
$invoice->save();
|
||||
}
|
||||
}
|
||||
// 处理消费返积分 TODO: 待测试
|
||||
$scoreConfig = Config::where('name', 'score')->find();
|
||||
$scoreConfig = json_decode($scoreConfig['value'], true);
|
||||
if (!empty($scoreConfig['consume_get_score']) && !empty($scoreConfig['consume_get_score_ratio'])) {
|
||||
$scoreRatio = intval($scoreConfig['consume_get_score_ratio']);
|
||||
$score = intval($scoreRatio * 0.01 * $order->total_fee);
|
||||
if ($score > 0) {
|
||||
\addons\shopro\model\User::score($score, $user['id'], 'consume_get_score', $order['id']);
|
||||
}
|
||||
}
|
||||
|
||||
// 检测有没有自动发货的商品,有就自动发货
|
||||
$order->checkDispatchAndSend($order, ['user' => $user]);
|
||||
});
|
||||
|
||||
// 支付成功的外部副作用必须在事务提交后触发,避免数据库回滚时已经打印小票。
|
||||
\think\Hook::listen('order_payed_after', ['order' => $order]);
|
||||
}
|
||||
|
||||
// 删除 job
|
||||
$job->delete();
|
||||
} catch (\Exception $e) {
|
||||
// 队列执行失败
|
||||
$error = json_encode([
|
||||
'a' => $e->getLine(),
|
||||
'b' => $e->getFile(),
|
||||
'c' => $e->getTrace(),
|
||||
'd' => $e->getMessage()
|
||||
], JSON_UNESCAPED_UNICODE);
|
||||
|
||||
|
||||
\think\Log::error('queue-' . get_class() . '-payed' . ':执行失败,错误信息:' . $error);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
namespace addons\shopro\job;
|
||||
|
||||
use addons\shopro\model\Order;
|
||||
use app\common\library\PrinterService;
|
||||
use think\Db;
|
||||
use think\queue\Job;
|
||||
|
||||
class OrderPrint extends BaseJob
|
||||
{
|
||||
public function handle(Job $job, $data)
|
||||
{
|
||||
$orderId = isset($data['order_id']) ? (int)$data['order_id'] : 0;
|
||||
$task = $orderId ? Db::name('shopro_order_print_task')->where('order_id', $orderId)->find() : null;
|
||||
|
||||
if (!$task || in_array((int)$task['status'], [1, 3], true)) {
|
||||
$job->delete();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$order = Order::with('item')->where('id', $orderId)->find();
|
||||
if (!$order) {
|
||||
throw new \RuntimeException('订单不存在');
|
||||
}
|
||||
|
||||
Db::name('shopro_order_print_task')->where('id', $task['id'])->update([
|
||||
'status' => 2,
|
||||
'attempts' => (int)$task['attempts'] + 1,
|
||||
'updated_at' => time(),
|
||||
'last_error' => '',
|
||||
]);
|
||||
|
||||
$result = (new PrinterService())->printOrder($this->buildOrderData($order));
|
||||
if (empty($result['accepted'])) {
|
||||
$this->failTask($task['id'], !empty($result['error']) ? $result['error'] : '云打印未受理', $result);
|
||||
$job->delete();
|
||||
return;
|
||||
}
|
||||
|
||||
Db::name('shopro_order_print_task')->where('id', $task['id'])->update([
|
||||
// 云端已接单,仍需查询 queryOrderState 确认物理打印完成。
|
||||
'status' => 3,
|
||||
'cloud_order_id' => $result['cloud_order_id'],
|
||||
'printer_response' => $result['response'],
|
||||
'updated_at' => time(),
|
||||
'last_error' => '',
|
||||
]);
|
||||
\think\Queue::later(30, '\\addons\\shopro\\job\\OrderPrintStatus@handle', ['task_id' => $task['id']], 'shopro-high');
|
||||
$job->delete();
|
||||
} catch (\Exception $e) {
|
||||
if ($task) {
|
||||
$this->failTask($task['id'], $e->getMessage(), []);
|
||||
}
|
||||
\think\Log::error('订单小票打印失败,订单ID ' . $orderId . ': ' . $e->getMessage());
|
||||
$job->delete();
|
||||
}
|
||||
}
|
||||
|
||||
protected function buildOrderData($order)
|
||||
{
|
||||
$items = [];
|
||||
foreach ((array)$order['item'] as $item) {
|
||||
$items[] = [
|
||||
'name' => (isset($item['goods_title']) ? $item['goods_title'] : '商品') . (!empty($item['goods_sku_text']) ? ' (' . $item['goods_sku_text'] . ')' : ''),
|
||||
'num' => isset($item['goods_num']) ? $item['goods_num'] : 1,
|
||||
'price' => isset($item['goods_price']) ? $item['goods_price'] : '0.00',
|
||||
];
|
||||
}
|
||||
|
||||
$address = (isset($order['province_name']) ? $order['province_name'] : '')
|
||||
. (isset($order['city_name']) ? $order['city_name'] : '')
|
||||
. (isset($order['area_name']) ? $order['area_name'] : '')
|
||||
. (isset($order['address']) ? $order['address'] : '');
|
||||
|
||||
return [
|
||||
'shop_name' => '小众厨房设备商城',
|
||||
'order_sn' => $order['order_sn'],
|
||||
'createtime' => $order['createtime'],
|
||||
'consignee' => isset($order['consignee']) ? $order['consignee'] : '客户',
|
||||
'phone' => isset($order['phone']) ? $order['phone'] : '',
|
||||
'address' => $address ?: '到店自提/商家配送',
|
||||
'total_fee' => isset($order['pay_fee']) ? sprintf('%.2f', $order['pay_fee']) : $order['total_fee'],
|
||||
'items' => $items,
|
||||
'print_idempotent' => 'shopro-' . $order['id'],
|
||||
];
|
||||
}
|
||||
|
||||
protected function failTask($taskId, $error, $result)
|
||||
{
|
||||
Db::name('shopro_order_print_task')->where('id', $taskId)->update([
|
||||
'status' => -1,
|
||||
'printer_response' => isset($result['response']) ? $result['response'] : '',
|
||||
'last_error' => mb_substr($error, 0, 500, 'UTF-8'),
|
||||
'updated_at' => time(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace addons\shopro\job;
|
||||
|
||||
use app\common\library\PrinterService;
|
||||
use think\Db;
|
||||
use think\queue\Job;
|
||||
|
||||
class OrderPrintStatus extends BaseJob
|
||||
{
|
||||
public function handle(Job $job, $data)
|
||||
{
|
||||
$taskId = isset($data['task_id']) ? (int)$data['task_id'] : 0;
|
||||
$task = $taskId ? Db::name('shopro_order_print_task')->where('id', $taskId)->find() : null;
|
||||
if (!$task || (int)$task['status'] !== 3 || empty($task['cloud_order_id'])) {
|
||||
$job->delete();
|
||||
return;
|
||||
}
|
||||
|
||||
$result = (new PrinterService())->queryOrderState($task['cloud_order_id']);
|
||||
$attempts = (int)$task['verify_attempts'] + 1;
|
||||
$update = [
|
||||
'verify_attempts' => $attempts,
|
||||
'updated_at' => time(),
|
||||
'printer_response' => $result['response'],
|
||||
'last_error' => !empty($result['accepted']) ? '' : $result['error'],
|
||||
];
|
||||
|
||||
if (!empty($result['printed'])) {
|
||||
$update['status'] = 1;
|
||||
$update['printed_at'] = time();
|
||||
Db::name('shopro_order_print_task')->where('id', $taskId)->update($update);
|
||||
$job->delete();
|
||||
return;
|
||||
}
|
||||
|
||||
Db::name('shopro_order_print_task')->where('id', $taskId)->update($update);
|
||||
if ($attempts < 30) {
|
||||
\think\Queue::later(60, '\\addons\\shopro\\job\\OrderPrintStatus@handle', ['task_id' => $taskId], 'shopro-high');
|
||||
} else {
|
||||
\think\Log::warning('订单小票云端状态未确认,任务ID ' . $taskId);
|
||||
}
|
||||
$job->delete();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\command;
|
||||
|
||||
use think\Db;
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\input\Option;
|
||||
use think\console\Output;
|
||||
|
||||
class ShoproPrintRetry extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('shopro:print-retry')
|
||||
->addOption('order-id', null, Option::VALUE_REQUIRED, 'failed print task order id')
|
||||
->addOption('all', null, Option::VALUE_NONE, 'retry all failed print tasks')
|
||||
->setDescription('Requeue failed Shopro receipt print tasks');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$orderId = (int)$input->getOption('order-id');
|
||||
$all = (bool)$input->getOption('all');
|
||||
if (!$orderId && !$all) {
|
||||
$output->error('Use --order-id=<id> or --all.');
|
||||
return 1;
|
||||
}
|
||||
|
||||
$staleBefore = time() - 300;
|
||||
$query = Db::name('shopro_order_print_task')
|
||||
->whereRaw('(status = -1 OR (status = 2 AND updated_at < ' . $staleBefore . '))');
|
||||
if ($orderId) {
|
||||
$query->where('order_id', $orderId);
|
||||
}
|
||||
$tasks = $query->select();
|
||||
foreach ($tasks as $task) {
|
||||
Db::name('shopro_order_print_task')->where('id', $task['id'])->update([
|
||||
'status' => 0,
|
||||
'updated_at' => time(),
|
||||
'last_error' => '',
|
||||
]);
|
||||
\think\Queue::push('\\addons\\shopro\\job\\OrderPrint@handle', ['order_id' => $task['order_id']], 'shopro-high');
|
||||
}
|
||||
|
||||
$output->info('Requeued ' . count($tasks) . ' receipt print task(s).');
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: yunwuxin <448901948@qq.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
'app\admin\command\Crud',
|
||||
'app\admin\command\Menu',
|
||||
'app\admin\command\Install',
|
||||
'app\admin\command\Min',
|
||||
'app\admin\command\Addon',
|
||||
'app\admin\command\Api',
|
||||
'app\admin\command\ShoproPrintRetry',
|
||||
];
|
||||
在新工单中引用
屏蔽一个用户