ExampleTest
parent
d7da7063db
commit
fc4920577e
|
|
@ -2,14 +2,7 @@
|
|||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\PayWay;
|
||||
use App\Models\Agent;
|
||||
use App\Models\User;
|
||||
use App\Services\DistributeService;
|
||||
use App\Services\Payment\WxpayService;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Tests\TestCase;
|
||||
use App\Models\Order;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
|
|
@ -20,16 +13,7 @@ class ExampleTest extends TestCase
|
|||
*/
|
||||
public function test_example()
|
||||
{
|
||||
$share = 'Y';
|
||||
$user = User::find(4);
|
||||
$agentIds = User::whereIn('id', $user->userInfo->parent_ids)->pluck('agent_id');
|
||||
dump($user->userInfo->parent_ids);
|
||||
$ratio = Agent::whereIn('id', $agentIds)->sum('ratio');
|
||||
// 没有提成
|
||||
if ($ratio == 0) {
|
||||
$share = 'N';
|
||||
}
|
||||
dump($share);
|
||||
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue