|
|
@ -16,6 +16,7 @@ use app\common\dao\system\HuitongDao; |
|
|
|
use app\common\repositories\BaseRepository; |
|
|
|
use app\common\repositories\BaseRepository; |
|
|
|
use app\common\repositories\store\order\StoreOrderBaseRepository; |
|
|
|
use app\common\repositories\store\order\StoreOrderBaseRepository; |
|
|
|
use app\common\repositories\user\UserAssetsRepository; |
|
|
|
use app\common\repositories\user\UserAssetsRepository; |
|
|
|
|
|
|
|
use think\facade\Log; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -48,10 +49,11 @@ class HuitongRepository extends BaseRepository |
|
|
|
* @var StoreOrderBaseRepository $orderBase |
|
|
|
* @var StoreOrderBaseRepository $orderBase |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
$orderBase = app()->make(StoreOrderBaseRepository::class); |
|
|
|
$orderBase = app()->make(StoreOrderBaseRepository::class); |
|
|
|
$count = $orderBase->getTotalBase(); |
|
|
|
$count = $orderBase->getTotalBase(date('Y-m-d', strtotime('-1day'))); |
|
|
|
if (empty($count)) { |
|
|
|
if (empty($count)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Log::info("+++++++"); |
|
|
|
$base = round($config['huitong_add'] * $count / 100, 2); |
|
|
|
$base = round($config['huitong_add'] * $count / 100, 2); |
|
|
|
if ($base < 0.01) { |
|
|
|
if ($base < 0.01) { |
|
|
|
$base = 0.01; |
|
|
|
$base = 0.01; |
|
|
|