调整预收益记录表
parent
a5bb718d0b
commit
04265c45a5
|
|
@ -54,9 +54,11 @@ class WalletController extends Controller
|
|||
public function distributionLogs(Request $request)
|
||||
{
|
||||
$perPage = PaginatorHelper::resolvePerPage('per_page', 20, 50);
|
||||
// $sort = $request-
|
||||
$distributionLogs = $request->user()->distributionPreIncomes()
|
||||
->with('logs')
|
||||
->unsettlement()
|
||||
->where('created_at', '>', now()->subDays(30))
|
||||
// ->unsettlement()
|
||||
->latest('id')
|
||||
->simplePaginate($perPage);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Endpoint\Api\Http\Resources;
|
||||
|
||||
use App\Models\DistributionPreIncome;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class DistributionPreIncomeResource extends JsonResource
|
||||
|
|
@ -19,6 +20,7 @@ class DistributionPreIncomeResource extends JsonResource
|
|||
'logs' => DistributionPreIncomeLogResource::collection($this->whenLoaded('logs')),
|
||||
'created_at'=> $this->created_at->format('y-m-d H:i'),
|
||||
'total_revenue' => $this->total_revenue,
|
||||
'status' => DistributionPreIncome::$statusTexts[$this->status],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue