|
...
|
...
|
@@ -6,7 +6,6 @@ use App\Enums\Common\Code; |
|
|
|
use App\Http\Logic\Logic;
|
|
|
|
use App\Models\AICC\V6Aicc;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
use function Symfony\Component\String\b;
|
|
|
|
|
|
|
|
class AiccV6Logic extends Logic
|
|
|
|
{
|
|
...
|
...
|
@@ -36,8 +35,29 @@ class AiccV6Logic extends Logic |
|
|
|
DB::commit();
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
DB::rollBack();
|
|
|
|
$e->getMessage();
|
|
|
|
errorLog('V6与AICC关联失败', $aicc, $e);
|
|
|
|
$this->fail('请检查操作是否正确!', Code::SERVER_MYSQL_ERROR);
|
|
|
|
}
|
|
|
|
return $this->success($status);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function V6AiccLists()
|
|
|
|
{
|
|
|
|
$page = (int)request()->route('page', 1);
|
|
|
|
$status = 1; # 1 - 正常, 0 - 禁用
|
|
|
|
$perPage = (int)request()->route('perPage', 15); # 分页页数
|
|
|
|
$lists = V6Aicc::query()->where('status', $status)
|
|
|
|
->whereNotNull('aicc_project_id')
|
|
|
|
->whereNotNull('aicc_user_id')
|
|
|
|
->paginate($perPage, ['v6_project_id', 'aicc_project_id', 'aicc_user_id'], 'page', $page);
|
|
|
|
$items = $lists->Items();
|
|
|
|
$totalPage = $lists->lastPage();
|
|
|
|
$total = $lists->total();
|
|
|
|
$currentPage = $lists->currentPage();
|
|
|
|
return compact('total', 'items', 'totalPage', 'currentPage');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|