From 04a8fbd9f991ad6dc11bd09f36023234f1654ab7 Mon Sep 17 00:00:00 2001
From: Lemon <15040771@qq.com>
Date: Tue, 22 Sep 2020 15:49:38 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E9=85=8D=E9=80=81=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/Constants/v3/Shipping.php | 10 ++++++++++
app/Service/v3/Implementations/FeiePrintService.php | 6 +++++-
.../v3/Interfaces/FeiePrintServiceInterface.php | 2 +-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/app/Constants/v3/Shipping.php b/app/Constants/v3/Shipping.php
index fbcccf7..089fb38 100644
--- a/app/Constants/v3/Shipping.php
+++ b/app/Constants/v3/Shipping.php
@@ -14,4 +14,14 @@ class Shipping extends AbstractConstants
* @Message("服务站配送")
*/
const TYPE_LANZU = 1;
+
+ /**
+ * @Message("达达配送")
+ */
+ const TYPE_DADA = 2;
+
+ /**
+ * @Message("用户自提")
+ */
+ const SELF_TAKING = 3;
}
\ No newline at end of file
diff --git a/app/Service/v3/Implementations/FeiePrintService.php b/app/Service/v3/Implementations/FeiePrintService.php
index f7d9756..dfead3f 100644
--- a/app/Service/v3/Implementations/FeiePrintService.php
+++ b/app/Service/v3/Implementations/FeiePrintService.php
@@ -2,6 +2,7 @@
namespace App\Service\v3\Implementations;
+use App\Constants\v3\Shipping;
use App\Libs\FeiePrintClient;
use App\Model\v3\Feprint;
use App\Model\v3\OrderMain;
@@ -168,7 +169,10 @@ class FeiePrintService implements FeiePrintServiceInterface
$orderInfo .= str_pad($userName,$A+$B+$userLength,' ',STR_PAD_RIGHT);
$orderInfo .= str_pad($total,$C+$D+$totalLength+1,' ',STR_PAD_LEFT);
$orderInfo .= '
';
- $orderInfo .= '送货地点:' . $arr->address . '
';
+ $orderInfo .= '配送方式:' . $arr->shipping_type_text . '
';
+ if($arr->shipping_type != Shipping::SELF_TAKING){
+ $orderInfo .= '送货地点:' . $arr->address . '
';
+ }
$tel = substr_replace( $arr->tel, '****', 3, 4);
$orderInfo .= '联系电话:' . $tel . '
';
$orderInfo .= '下单时间:' . $arr->pay_time_text . '
';
diff --git a/app/Service/v3/Interfaces/FeiePrintServiceInterface.php b/app/Service/v3/Interfaces/FeiePrintServiceInterface.php
index f42bf28..0f765e3 100644
--- a/app/Service/v3/Interfaces/FeiePrintServiceInterface.php
+++ b/app/Service/v3/Interfaces/FeiePrintServiceInterface.php
@@ -6,5 +6,5 @@ namespace App\Service\v3\Interfaces;
interface FeiePrintServiceInterface
{
- public function feiePrint($order_num);
+ public function feiePrint($globalOrderId);
}
\ No newline at end of file
From ed73ad2391f56c47b0648727a455cbfe860080a8 Mon Sep 17 00:00:00 2001
From: Lemon <15040771@qq.com>
Date: Tue, 22 Sep 2020 15:53:30 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E8=87=AA=E6=8F=90=E6=96=87=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/Constants/v3/Shipping.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/Constants/v3/Shipping.php b/app/Constants/v3/Shipping.php
index 089fb38..4978a7b 100644
--- a/app/Constants/v3/Shipping.php
+++ b/app/Constants/v3/Shipping.php
@@ -23,5 +23,5 @@ class Shipping extends AbstractConstants
/**
* @Message("用户自提")
*/
- const SELF_TAKING = 3;
+ const TYPE_SELF_TAKE = 3;
}
\ No newline at end of file
From 8de2eaeecb5cd79904ec806997c2d5cb4eae6eb1 Mon Sep 17 00:00:00 2001
From: Lemon <15040771@qq.com>
Date: Tue, 22 Sep 2020 16:57:33 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=89=93=E5=8D=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/Service/v3/Implementations/FeiePrintService.php | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/app/Service/v3/Implementations/FeiePrintService.php b/app/Service/v3/Implementations/FeiePrintService.php
index dfead3f..f721a59 100644
--- a/app/Service/v3/Implementations/FeiePrintService.php
+++ b/app/Service/v3/Implementations/FeiePrintService.php
@@ -124,7 +124,7 @@ class FeiePrintService implements FeiePrintServiceInterface
$goodsTotal = bcmul($goods->number,$goods->price,2);
$priceLen = mb_strwidth($goods->price);
$totalLen = mb_strwidth($goodsTotal);
- if($nameLength > ($B+$C+$D-$priceLen-$totalLen)){
+ if($nameLength >= ($B+$C+$D-$priceLen-$totalLen)){
$orderInfo .= '
';
$orderInfo .= str_pad($goods->price,$A+$B+$C,' ',STR_PAD_LEFT);
}else{
@@ -170,11 +170,13 @@ class FeiePrintService implements FeiePrintServiceInterface
$orderInfo .= str_pad($total,$C+$D+$totalLength+1,' ',STR_PAD_LEFT);
$orderInfo .= '
';
$orderInfo .= '配送方式:' . $arr->shipping_type_text . '
';
- if($arr->shipping_type != Shipping::SELF_TAKING){
+ if($arr->shipping_type != Shipping::TYPE_SELF_TAKE){
$orderInfo .= '送货地点:' . $arr->address . '
';
}
- $tel = substr_replace( $arr->tel, '****', 3, 4);
- $orderInfo .= '联系电话:' . $tel . '
';
+ if(!empty($arr->tel)){
+ $tel = substr_replace( $arr->tel, '****', 3, 4);
+ $orderInfo .= '联系电话:' . $tel . '
';
+ }
$orderInfo .= '下单时间:' . $arr->pay_time_text . '
';
$orderInfo .= '送达时间:' . $arr->delivery_time_note . '
';
//$orderInfo .= 'http://www.feieyun.com';//把解析后的二维码生成的字符串用标签套上即可自动生成二维码