Compare commits

..

No commits in common. "ff18d72cb133a7c6926271a4c062f577f70af286" and "03191fa2f10c3064ee13087c2b30941b1607e248" have entirely different histories.

3 changed files with 53 additions and 58 deletions

View File

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

View File

@ -1,7 +1,6 @@
package cn.iocoder.yudao.module.jx.payment.entity; package cn.iocoder.yudao.module.jx.payment.entity;
import cn.iocoder.yudao.annotation.Excel; import cn.iocoder.yudao.annotation.Excel;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import cn.iocoder.yudao.module.jx.core.page.TenantBaDO; import cn.iocoder.yudao.module.jx.core.page.TenantBaDO;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse; import cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
@ -11,7 +10,7 @@ import java.util.Date;
@Data @Data
public class DriveSchoolPay extends TenantBaseDO public class DriveSchoolPay extends TenantBaDO
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -76,20 +76,21 @@ public class DriveSchoolPayServiceImpl implements DriveSchoolPayService
@Override @Override
public IPage<DriveSchoolPay> selectDriveSchoolPayList(DriveSchoolPay driveSchoolPay, Page<DriveSchoolPay> page) public IPage<DriveSchoolPay> selectDriveSchoolPayList(DriveSchoolPay driveSchoolPay, Page<DriveSchoolPay> page)
{ {
// List<DriveSchoolPay> driveSchoolPays = driveSchoolPayIPage.getRecords(); IPage<DriveSchoolPay> driveSchoolPayIPage = driveSchoolPayMapper.selectDriveSchoolPayList(driveSchoolPay, page);
// driveSchoolPays.forEach(item->{ List<DriveSchoolPay> driveSchoolPays = driveSchoolPayIPage.getRecords();
// DriveSchoolCourse driveSchoolCourse = driveSchoolCourseMapper.selectDriveSchoolCourseById(item.getCourseId()); driveSchoolPays.forEach(item->{
// if (ObjectUtils.isEmpty(driveSchoolCourse)){ DriveSchoolCourse driveSchoolCourse = driveSchoolCourseMapper.selectDriveSchoolCourseById(item.getCourseId());
// DriveSchoolCourse driveSchoolCourse1 = new DriveSchoolCourse(); if (ObjectUtils.isEmpty(driveSchoolCourse)){
// item.setDriveSchoolCourse(driveSchoolCourse1); DriveSchoolCourse driveSchoolCourse1 = new DriveSchoolCourse();
// }else { item.setDriveSchoolCourse(driveSchoolCourse1);
// item.setDriveSchoolCourse(driveSchoolCourse); }else {
// } item.setDriveSchoolCourse(driveSchoolCourse);
// if (ObjectUtils.isNotEmpty(driveSchoolCourse)){ }
// item.setCourseName(driveSchoolCourse.getAutomatic()); if (ObjectUtils.isNotEmpty(driveSchoolCourse)){
// } item.setCourseName(driveSchoolCourse.getAutomatic());
// }); }
return driveSchoolPayMapper.selectDriveSchoolPayList(driveSchoolPay, page); });
return driveSchoolPayIPage;
} }
@Override @Override