tp5 left join 取差集 ;多表取差集 分页

正文开始

$fields2 = str_replace(',', ',u_.', $fields);//字段补个前缀 u_
                $fields2 = 'u_.'. $fields2;
                $cardSql = Db::table('c_user_idcard')->field('s_uid')->buildSql();
                //调试语句
//                $list = Db::table('c_user')->field($fields2)->alias('u_')
//                    ->join([
//                        $cardSql => 'card_'
//                    ], "u_.u_id = card_.s_uid WHERE card_.s_uid is NULL AND {$whereStr}", "left")->fetchSql()->select();
                $res = Db::table('c_user')->field($fields2)->alias('u_')
                    ->join([
                        $cardSql => 'card_'
                    ], "u_.u_id = card_.s_uid WHERE card_.s_uid is NULL AND {$whereStr}", "left")->paginate($pageSize,false, [
                        'page' => $page,
                    ]);

正文结束

PHP接口(interface)和抽象类(abstract) 在对接爱淘客接口中TbkDgMaterialOptionalRequest 在 SDK中却没有