|
|
|
|
@ -57,40 +57,41 @@ public class DriveSchoolPayController extends BaseController
|
|
|
|
|
* 查询订单列表
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/list")
|
|
|
|
|
public CommonResult<IPage<?>> list(DriveSchoolPay driveSchoolPay) {
|
|
|
|
|
public CommonResult<IPage<?>> list(DriveSchoolPay driveSchoolPay,@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
|
|
|
|
|
|
|
// 获取当前用户信息
|
|
|
|
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
|
|
|
|
|
|
|
|
|
//获取驾校ID
|
|
|
|
|
Long userId = user.getId();
|
|
|
|
|
AdminUserDO sysUser = userService.getUser(userId);
|
|
|
|
|
Long deptId = sysUser.getDeptId();
|
|
|
|
|
|
|
|
|
|
// 记录部门ID
|
|
|
|
|
System.out.println("User ID: " + userId + " | Dept ID: " + deptId);
|
|
|
|
|
|
|
|
|
|
// 获取驾校信息
|
|
|
|
|
//schoolInfo为null
|
|
|
|
|
DriveSchoolInfoVO schoolInfo = driveSchoolInfoService.getSchoolInfoByDeptId(deptId);
|
|
|
|
|
|
|
|
|
|
// 设置驾校ID
|
|
|
|
|
if (schoolInfo != null) {
|
|
|
|
|
System.out.println("啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊");
|
|
|
|
|
driveSchoolPay.setJxId(schoolInfo.getId());
|
|
|
|
|
}
|
|
|
|
|
// // 获取当前用户信息
|
|
|
|
|
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
|
|
|
|
//
|
|
|
|
|
// //获取驾校ID
|
|
|
|
|
// Long userId = user.getId();
|
|
|
|
|
// AdminUserDO sysUser = userService.getUser(userId);
|
|
|
|
|
// Long deptId = sysUser.getDeptId();
|
|
|
|
|
//
|
|
|
|
|
// // 记录部门ID
|
|
|
|
|
// System.out.println("User ID: " + userId + " | Dept ID: " + deptId);
|
|
|
|
|
//
|
|
|
|
|
// // 获取驾校信息
|
|
|
|
|
// //schoolInfo为null
|
|
|
|
|
// DriveSchoolInfoVO schoolInfo = driveSchoolInfoService.getSchoolInfoByDeptId(deptId);
|
|
|
|
|
//
|
|
|
|
|
// // 设置驾校ID
|
|
|
|
|
// if (schoolInfo != null) {
|
|
|
|
|
// System.out.println("啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊");
|
|
|
|
|
// driveSchoolPay.setJxId(schoolInfo.getId());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// 创建分页对象
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(driveSchoolPay.getPageNum(), driveSchoolPay.getPageSize());
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(pageNum, pageSize);
|
|
|
|
|
IPage<DriveSchoolPay> driveSchoolPayIPage = driveSchoolPayService.selectDriveSchoolPayList(driveSchoolPay, page);
|
|
|
|
|
|
|
|
|
|
// 处理记录格式化排序
|
|
|
|
|
List<DriveSchoolPay> list = driveSchoolPayIPage.getRecords();
|
|
|
|
|
int allNumber = (driveSchoolPay.getPageNum() - 1) * driveSchoolPay.getPageSize();
|
|
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
String formattedNumber = String.format("%05d", allNumber + i + 1);
|
|
|
|
|
list.get(i).setSorNumber(formattedNumber);
|
|
|
|
|
}
|
|
|
|
|
// // 处理记录格式化排序
|
|
|
|
|
// List<DriveSchoolPay> list = driveSchoolPayIPage.getRecords();
|
|
|
|
|
// int allNumber = (driveSchoolPay.getPageNum() - 1) * driveSchoolPay.getPageSize();
|
|
|
|
|
// for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
// String formattedNumber = String.format("%05d", allNumber + i + 1);
|
|
|
|
|
// list.get(i).setSorNumber(formattedNumber);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return CommonResult.success(driveSchoolPayIPage);
|
|
|
|
|
}
|
|
|
|
|
@ -99,9 +100,10 @@ public class DriveSchoolPayController extends BaseController
|
|
|
|
|
* 查询订单列表
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/stuList")
|
|
|
|
|
public CommonResult<IPage<?>> stuList(DriveSchoolPay driveSchoolPay)
|
|
|
|
|
public CommonResult<IPage<?>> stuList(DriveSchoolPay driveSchoolPay,@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
|
|
|
|
{
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(driveSchoolPay.getPageNum(), driveSchoolPay.getPageSize());
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(pageNum, pageSize);
|
|
|
|
|
IPage<DriveSchoolPay> driveSchoolPayIPage = driveSchoolPayService.stuList(driveSchoolPay, page);
|
|
|
|
|
return CommonResult.success(driveSchoolPayIPage);
|
|
|
|
|
}
|
|
|
|
|
@ -117,7 +119,8 @@ public class DriveSchoolPayController extends BaseController
|
|
|
|
|
* 查询订单列表
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/stuListByCoachId")
|
|
|
|
|
public CommonResult<IPage<?>> stuListByCoachId(DriveSchoolPay driveSchoolPay)
|
|
|
|
|
public CommonResult<IPage<?>> stuListByCoachId(DriveSchoolPay driveSchoolPay,@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
|
|
|
|
{
|
|
|
|
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
|
|
|
|
AdminUserRespDTO sysUser = userApi.getUser(userId);
|
|
|
|
|
@ -131,7 +134,7 @@ public class DriveSchoolPayController extends BaseController
|
|
|
|
|
jlId= driveSchoolCoach.getId();
|
|
|
|
|
}
|
|
|
|
|
driveSchoolPay.setJlId(jlId);
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(driveSchoolPay.getPageNum(), driveSchoolPay.getPageSize());
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(pageNum, pageSize);
|
|
|
|
|
IPage<DriveSchoolPay> driveSchoolPayIPage = driveSchoolPayService.stuListByCoachId(driveSchoolPay, page);
|
|
|
|
|
return CommonResult.success(driveSchoolPayIPage);
|
|
|
|
|
}
|
|
|
|
|
@ -230,9 +233,10 @@ public class DriveSchoolPayController extends BaseController
|
|
|
|
|
* 学员详情-报名课程接口
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/applet/getReportCourseList")
|
|
|
|
|
public CommonResult<IPage<?>> getReportCourseList(DriveSchoolPay driveSchoolPay)
|
|
|
|
|
public CommonResult<IPage<?>> getReportCourseList(DriveSchoolPay driveSchoolPay,@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
|
|
|
|
{
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(driveSchoolPay.getPageNum(), driveSchoolPay.getPageSize());
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(pageNum, pageSize);
|
|
|
|
|
IPage<DriveSchoolPay> reportCourseList = driveSchoolPayService.getReportCourseList(driveSchoolPay, page);
|
|
|
|
|
return CommonResult.success(reportCourseList);
|
|
|
|
|
}
|
|
|
|
|
@ -241,9 +245,10 @@ public class DriveSchoolPayController extends BaseController
|
|
|
|
|
* 学员详情列表
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/applet/getUserList")
|
|
|
|
|
public CommonResult<IPage<?>> getUserList(DriveSchoolPay driveSchoolPay)
|
|
|
|
|
public CommonResult<IPage<?>> getUserList(DriveSchoolPay driveSchoolPay,@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
|
|
|
|
{
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(driveSchoolPay.getPageNum(), driveSchoolPay.getPageSize());
|
|
|
|
|
Page<DriveSchoolPay> page = new Page<>(pageNum, pageSize);
|
|
|
|
|
IPage<DriveSchoolPay> userList = driveSchoolPayService.getUserList(driveSchoolPay, page);
|
|
|
|
|
return CommonResult.success(userList);
|
|
|
|
|
}
|
|
|
|
|
|