1
This commit is contained in:
parent
c11c140c5e
commit
4748650fd8
@ -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);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cn.iocoder.yudao.module.jx.payment.entity;
|
||||
|
||||
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.domain.DriveSchoolCourse;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -10,7 +11,7 @@ import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
public class DriveSchoolPay extends TenantBaDO
|
||||
public class DriveSchoolPay extends TenantBaseDO
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -76,21 +76,20 @@ public class DriveSchoolPayServiceImpl implements DriveSchoolPayService
|
||||
@Override
|
||||
public IPage<DriveSchoolPay> selectDriveSchoolPayList(DriveSchoolPay driveSchoolPay, Page<DriveSchoolPay> page)
|
||||
{
|
||||
IPage<DriveSchoolPay> driveSchoolPayIPage = driveSchoolPayMapper.selectDriveSchoolPayList(driveSchoolPay, page);
|
||||
List<DriveSchoolPay> driveSchoolPays = driveSchoolPayIPage.getRecords();
|
||||
driveSchoolPays.forEach(item->{
|
||||
DriveSchoolCourse driveSchoolCourse = driveSchoolCourseMapper.selectDriveSchoolCourseById(item.getCourseId());
|
||||
if (ObjectUtils.isEmpty(driveSchoolCourse)){
|
||||
DriveSchoolCourse driveSchoolCourse1 = new DriveSchoolCourse();
|
||||
item.setDriveSchoolCourse(driveSchoolCourse1);
|
||||
}else {
|
||||
item.setDriveSchoolCourse(driveSchoolCourse);
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(driveSchoolCourse)){
|
||||
item.setCourseName(driveSchoolCourse.getAutomatic());
|
||||
}
|
||||
});
|
||||
return driveSchoolPayIPage;
|
||||
// List<DriveSchoolPay> driveSchoolPays = driveSchoolPayIPage.getRecords();
|
||||
// driveSchoolPays.forEach(item->{
|
||||
// DriveSchoolCourse driveSchoolCourse = driveSchoolCourseMapper.selectDriveSchoolCourseById(item.getCourseId());
|
||||
// if (ObjectUtils.isEmpty(driveSchoolCourse)){
|
||||
// DriveSchoolCourse driveSchoolCourse1 = new DriveSchoolCourse();
|
||||
// item.setDriveSchoolCourse(driveSchoolCourse1);
|
||||
// }else {
|
||||
// item.setDriveSchoolCourse(driveSchoolCourse);
|
||||
// }
|
||||
// if (ObjectUtils.isNotEmpty(driveSchoolCourse)){
|
||||
// item.setCourseName(driveSchoolCourse.getAutomatic());
|
||||
// }
|
||||
// });
|
||||
return driveSchoolPayMapper.selectDriveSchoolPayList(driveSchoolPay, page);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user