|
|
|
@ -3,6 +3,8 @@ |
|
|
|
|
|
|
|
namespace App\Service\v3\Implementations; |
|
|
|
|
|
|
|
use App\Constants\v3\ErrorCode; |
|
|
|
use App\Exception\ErrorCodeException; |
|
|
|
use Hyperf\Di\Annotation\Inject; |
|
|
|
use App\Service\v3\Interfaces\DistributionPriceServiceInterface; |
|
|
|
|
|
|
|
@ -22,8 +24,7 @@ class DistributionPriceService implements DistributionPriceServiceInterface |
|
|
|
$distributionRrice = bcmul(1.50,($km-3),2); |
|
|
|
break; |
|
|
|
case ($km >= 10) : |
|
|
|
$distributionRrice = bcmul(1.50,($km-3),2); |
|
|
|
// throw new ErrorCodeException(ErrorCode::LOCATION_LONG_DISTANCE);
|
|
|
|
throw new ErrorCodeException(ErrorCode::LOCATION_LONG_DISTANCE); |
|
|
|
break; |
|
|
|
default: |
|
|
|
$distributionRrice = 0; |
|
|
|
|