Browse Source

Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix

master
weigang 5 years ago
parent
commit
d8fcf10116
  1. 13
      app/Model/v3/Feprint.php
  2. 5
      app/Service/v3/Implementations/FeiePrintService.php
  3. 2
      app/Service/v3/Implementations/UserAddressService.php

13
app/Model/v3/Feprint.php

@ -0,0 +1,13 @@
<?php
namespace App\Model\v3;
use App\Model\Model;
use Hyperf\Database\Model\SoftDeletes;
class Feprint extends Model
{
use SoftDeletes;
protected $table = 'lanzu_feprint';
}

5
app/Service/v3/Implementations/FeiePrintService.php

@ -3,6 +3,7 @@
namespace App\Service\v3\Implementations; namespace App\Service\v3\Implementations;
use App\Libs\FeiePrintClient; use App\Libs\FeiePrintClient;
use App\Model\v3\Feprint;
use App\Model\v3\OrderMain; use App\Model\v3\OrderMain;
use App\Service\v3\Interfaces\FeiePrintServiceInterface; use App\Service\v3\Interfaces\FeiePrintServiceInterface;
use Hyperf\DbConnection\Db; use Hyperf\DbConnection\Db;
@ -52,9 +53,9 @@ class FeiePrintService implements FeiePrintServiceInterface
// foreach ($data['order'] as $key => &$item) { // foreach ($data['order'] as $key => &$item) {
// $item = (array)$item; // $item = (array)$item;
// } // }
$printSn = Feprint::query()->where('market_id',$data->market_id)->value('sn');
$content = $this->printFormat($data, 4, 14, 7, 7); $content = $this->printFormat($data, 4, 14, 7, 7);
$res = $this->printMsg('920527381', $content, 1);
$res = $this->printMsg($printSn, $content, 1);
return $res; return $res;
} }

2
app/Service/v3/Implementations/UserAddressService.php

@ -89,7 +89,7 @@ class UserAddressService implements UserAddressServiceInterface
throw new ErrorCodeException(ErrorCode::LOCATION_USER_ADDRESS); throw new ErrorCodeException(ErrorCode::LOCATION_USER_ADDRESS);
} }
$distance = $this->locationService->getDistanceByTencent($address['address']->lng,$address['address']->lat,$market->lng,$market->lat);
$distance = $this->locationService->getDistanceByTencent($market->lng,$market->lat,$address['address']->lng,$address['address']->lat);
$distributionPrice = $this->distributionPriceService->do($distance); $distributionPrice = $this->distributionPriceService->do($distance);
$res['address'] = $address; $res['address'] = $address;
$res['delivery_distance'] = $distance; $res['delivery_distance'] = $distance;

Loading…
Cancel
Save