Browse Source
Merge branch 'phoenix' of http://120.24.33.109:11081/hyzjshwo/lanzu_api_hyperf into phoenix
master
Merge branch 'phoenix' of http://120.24.33.109:11081/hyzjshwo/lanzu_api_hyperf into phoenix
master
16 changed files with 274 additions and 47 deletions
-
7app/Constants/v3/SsdbKeys.php
-
8app/Controller/v3/BalanceStatementController.php
-
74app/Controller/v3/HomeController.php
-
7app/Controller/v3/OrderOnlineController.php
-
121app/JsonRpc/OrderService.php
-
6app/Model/v3/OrderMain.php
-
5app/Service/v3/Implementations/DistributionPriceService.php
-
4app/Service/v3/Implementations/OrderListService.php
-
11app/Service/v3/Implementations/OrderOnlineService.php
-
39app/Service/v3/Implementations/OrderStatisticsService.php
-
14app/Service/v3/Implementations/RevenueListService.php
-
2app/Service/v3/Implementations/WithdrawalListService.php
-
7app/Service/v3/Interfaces/OrderOnlineServiceInterface.php
-
13app/Service/v3/Interfaces/OrderStatisticsServiceInterface.php
-
2app/Service/v3/Interfaces/RevenueListServiceInterface.php
-
1config/autoload/dependencies.php
@ -0,0 +1,39 @@ |
|||
<?php |
|||
|
|||
|
|||
namespace App\Service\v3\Implementations; |
|||
use App\Constants\v3\OrderState; |
|||
use App\Model\v3\Order; |
|||
use \App\Service\v3\Interfaces\OrderStatisticsServiceInterface; |
|||
|
|||
class OrderStatisticsService implements OrderStatisticsServiceInterface |
|||
{ |
|||
|
|||
public function do() |
|||
{ |
|||
// TODO: Implement do() method.
|
|||
} |
|||
|
|||
public function check() |
|||
{ |
|||
// TODO: Implement check() method.
|
|||
} |
|||
|
|||
public function undo() |
|||
{ |
|||
// TODO: Implement undo() method.
|
|||
} |
|||
|
|||
public function countOrder($storeId,$type,$startTime = '',$endTime = '') |
|||
{ |
|||
$builder = Order::join('lanzu_order_main','lanzu_order_main.global_order_id','lanzu_order.order_main_id') |
|||
->where('lanzu_order.store_id',$storeId); |
|||
if(!empty($startTime) && !empty($endTime)){ |
|||
$builder->whereBetween('lanzu_order_main.created_at',[$startTime,$endTime]); |
|||
} |
|||
$count = $builder->whereIn('lanzu_order_main.state', OrderState::FINISH) |
|||
->where('type',$type) |
|||
->count(); |
|||
return $count; |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
<?php |
|||
|
|||
|
|||
namespace App\Service\v3\Interfaces; |
|||
|
|||
|
|||
interface OrderStatisticsServiceInterface |
|||
{ |
|||
public function do(); |
|||
public function check(); |
|||
public function undo(); |
|||
public function countOrder($storeId,$type,$startTime = '',$endTime = ''); |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue