问题说明:用户扫桌码,下单支付后自动打印的小票,是普通订单的小票
问题修改
修改文件:app\listener\notice\Notice
修改方法:handle()
if (isset($data['cart_id']) && $data['cart_id'] && $data['type'] != 10) {
PrintJob::dispatch([(int)$data['id'], 2]);
} else if ($data['type'] == 10) {
PrintJob::dispatch('tableDoJob', [$data['activity_id'], $data['store_id'], 2]);
}
修改文件:app\services\activity\collage\UserCollagePartakeServices
修改方法:getCartInfoPrintProduct()
public function getCartInfoPrintProduct(array $table, int $is_print = 0)
{
$where = ['collate_code_id' => $table['id'], 'status' => 1, 'is_print' => $is_print];
$data = $this->getCashierTablePartakePrintProduct($table['uid'], $table['store_id'], $where, '', ['productInfo', 'attrInfo']);
$product = [];
if (!$data) return $product;
foreach ($data as $item) {
$item['productInfo']['store_name'] = substrUTf8($item['productInfo']['store_name'], 100, 'UTF-8', '');
$product[] = $item;
}
return $product;
}
修改完成后重启swoole;
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}