1
This commit is contained in:
parent
c11c140c5e
commit
4748650fd8
@ -57,40 +57,41 @@ public class DriveSchoolPayController extends BaseController
|
|||||||
* 查询订单列表
|
* 查询订单列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@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();
|
// 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<>(driveSchoolPay.getPageNum(), driveSchoolPay.getPageSize());
|
Page<DriveSchoolPay> page = new Page<>(pageNum, pageSize);
|
||||||
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);
|
||||||
}
|
}
|
||||||
@ -99,9 +100,10 @@ public class DriveSchoolPayController extends BaseController
|
|||||||
* 查询订单列表
|
* 查询订单列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/stuList")
|
@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);
|
IPage<DriveSchoolPay> driveSchoolPayIPage = driveSchoolPayService.stuList(driveSchoolPay, page);
|
||||||
return CommonResult.success(driveSchoolPayIPage);
|
return CommonResult.success(driveSchoolPayIPage);
|
||||||
}
|
}
|
||||||
@ -117,7 +119,8 @@ public class DriveSchoolPayController extends BaseController
|
|||||||
* 查询订单列表
|
* 查询订单列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/stuListByCoachId")
|
@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();
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
AdminUserRespDTO sysUser = userApi.getUser(userId);
|
AdminUserRespDTO sysUser = userApi.getUser(userId);
|
||||||
@ -131,7 +134,7 @@ public class DriveSchoolPayController extends BaseController
|
|||||||
jlId= driveSchoolCoach.getId();
|
jlId= driveSchoolCoach.getId();
|
||||||
}
|
}
|
||||||
driveSchoolPay.setJlId(jlId);
|
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);
|
IPage<DriveSchoolPay> driveSchoolPayIPage = driveSchoolPayService.stuListByCoachId(driveSchoolPay, page);
|
||||||
return CommonResult.success(driveSchoolPayIPage);
|
return CommonResult.success(driveSchoolPayIPage);
|
||||||
}
|
}
|
||||||
@ -230,9 +233,10 @@ public class DriveSchoolPayController extends BaseController
|
|||||||
* 学员详情-报名课程接口
|
* 学员详情-报名课程接口
|
||||||
*/
|
*/
|
||||||
@GetMapping("/applet/getReportCourseList")
|
@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);
|
IPage<DriveSchoolPay> reportCourseList = driveSchoolPayService.getReportCourseList(driveSchoolPay, page);
|
||||||
return CommonResult.success(reportCourseList);
|
return CommonResult.success(reportCourseList);
|
||||||
}
|
}
|
||||||
@ -241,9 +245,10 @@ public class DriveSchoolPayController extends BaseController
|
|||||||
* 学员详情列表
|
* 学员详情列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/applet/getUserList")
|
@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);
|
IPage<DriveSchoolPay> userList = driveSchoolPayService.getUserList(driveSchoolPay, page);
|
||||||
return CommonResult.success(userList);
|
return CommonResult.success(userList);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
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;
|
||||||
@ -10,7 +11,7 @@ import java.util.Date;
|
|||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class DriveSchoolPay extends TenantBaDO
|
public class DriveSchoolPay extends TenantBaseDO
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -76,21 +76,20 @@ 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)
|
||||||
{
|
{
|
||||||
IPage<DriveSchoolPay> driveSchoolPayIPage = driveSchoolPayMapper.selectDriveSchoolPayList(driveSchoolPay, page);
|
// List<DriveSchoolPay> driveSchoolPays = driveSchoolPayIPage.getRecords();
|
||||||
List<DriveSchoolPay> driveSchoolPays = driveSchoolPayIPage.getRecords();
|
// driveSchoolPays.forEach(item->{
|
||||||
driveSchoolPays.forEach(item->{
|
// DriveSchoolCourse driveSchoolCourse = driveSchoolCourseMapper.selectDriveSchoolCourseById(item.getCourseId());
|
||||||
DriveSchoolCourse driveSchoolCourse = driveSchoolCourseMapper.selectDriveSchoolCourseById(item.getCourseId());
|
// if (ObjectUtils.isEmpty(driveSchoolCourse)){
|
||||||
if (ObjectUtils.isEmpty(driveSchoolCourse)){
|
// DriveSchoolCourse driveSchoolCourse1 = new DriveSchoolCourse();
|
||||||
DriveSchoolCourse driveSchoolCourse1 = new DriveSchoolCourse();
|
// item.setDriveSchoolCourse(driveSchoolCourse1);
|
||||||
item.setDriveSchoolCourse(driveSchoolCourse1);
|
// }else {
|
||||||
}else {
|
// item.setDriveSchoolCourse(driveSchoolCourse);
|
||||||
item.setDriveSchoolCourse(driveSchoolCourse);
|
// }
|
||||||
}
|
// if (ObjectUtils.isNotEmpty(driveSchoolCourse)){
|
||||||
if (ObjectUtils.isNotEmpty(driveSchoolCourse)){
|
// item.setCourseName(driveSchoolCourse.getAutomatic());
|
||||||
item.setCourseName(driveSchoolCourse.getAutomatic());
|
// }
|
||||||
}
|
// });
|
||||||
});
|
return driveSchoolPayMapper.selectDriveSchoolPayList(driveSchoolPay, page);
|
||||||
return driveSchoolPayIPage;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user