From 33813d497f0fb49eb6c895c12021e98902398feb Mon Sep 17 00:00:00 2001
From: Lemon <15040771@qq.com>
Date: Sun, 27 Sep 2020 11:06:24 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=93=E5=8D=B0=20=E9=85=8D=E9=80=81?=
=?UTF-8?q?=E8=B4=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/Service/v3/Implementations/FeiePrintService.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/Service/v3/Implementations/FeiePrintService.php b/app/Service/v3/Implementations/FeiePrintService.php
index f721a59..074a192 100644
--- a/app/Service/v3/Implementations/FeiePrintService.php
+++ b/app/Service/v3/Implementations/FeiePrintService.php
@@ -151,7 +151,7 @@ class FeiePrintService implements FeiePrintServiceInterface
if ($arr->services_money > 0) {
$orderInfo .= $this->space('服务费:',$arr->services_money);
}
- if($arr->delivery_money > 0){
+ if($arr->shipping_type != 3 && $arr->delivery_money > 0){
$orderInfo .= $this->space('配送费:',$arr->delivery_money);
}
if($arr->coupon_money > 0){
From f735d676e02015caaed4f7afa62a6e3d5bac6620 Mon Sep 17 00:00:00 2001
From: Lemon <15040771@qq.com>
Date: Sun, 27 Sep 2020 15:32:00 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=87=AA=E6=8F=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../v3/Implementations/FeiePrintService.php | 26 ++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/app/Service/v3/Implementations/FeiePrintService.php b/app/Service/v3/Implementations/FeiePrintService.php
index 074a192..858e7e0 100644
--- a/app/Service/v3/Implementations/FeiePrintService.php
+++ b/app/Service/v3/Implementations/FeiePrintService.php
@@ -55,6 +55,26 @@ class FeiePrintService implements FeiePrintServiceInterface
// $item = (array)$item;
// }
$printSn = Feprint::query()->where('market_id',$data->market_id)->value('sn');
+ if (env('APP_ENV') === 'dev') {
+ $client = new FeiePrintClient($this->feieHost, $this->feiePort);
+ $msgInfo = array(
+ 'user' => $this->feieUser,
+ 'stime' => time(),
+ 'sig' => sha1($this->feieUser . $this->feieUkey . time()),
+ 'apiname' => 'Open_queryPrinterStatus',
+ 'sn' => $printSn
+ );
+ $client->post($this->feieApiPath, $msgInfo);
+ $result = json_decode($client->getContent(),true);
+ if($result['data'] != '在线,工作状态正常。'){
+ return [
+ 'msg' => 'ok',
+ 'ret' => 0,
+ 'data' => '920527381_20200927151404_1155818771',
+ 'serverExecutedTime' => 4
+ ];
+ }
+ }
$content = $this->printFormat($data, 4, 14, 7, 7);
$res = $this->printMsg($printSn, $content, 1);
return $res;
@@ -178,7 +198,11 @@ class FeiePrintService implements FeiePrintServiceInterface
$orderInfo .= '联系电话:' . $tel . '
';
}
$orderInfo .= '下单时间:' . $arr->pay_time_text . '
';
- $orderInfo .= '送达时间:' . $arr->delivery_time_note . '
';
+ if($arr->shipping_type != 3 && $arr->delivery_money > 0) {
+ $orderInfo .= '送达时间:' . $arr->delivery_time_note . '
';
+ }else{
+ $orderInfo .= '自提时间:' . $arr->delivery_time_note . '
';
+ }
//$orderInfo .= 'http://www.feieyun.com';//把解析后的二维码生成的字符串用标签套上即可自动生成二维码
return $orderInfo;
}