Merge branch 'test' into dev

This commit is contained in:
GYJ 2025-01-07 10:24:40 +08:00
commit 61c465a904
2 changed files with 9 additions and 7 deletions

View File

@ -153,7 +153,7 @@ public class AppController {
authErrMsg = "实名修改失败: 账号每月可修改次数已用完,请联系管理员";
}
if (authErrMsg == null && !ApiAccessLimitUtil.isAccessAllowed(certName, "updateAuthCertInfoByIdCard", 1, "month")) {
if (authErrMsg == null && !ApiAccessLimitUtil.isAccessAllowed(certNum, "updateAuthCertInfoByIdCard", 1, "month")) {
authErrMsg = "实名修改失败: 此身份证信息次月已绑定过,请联系管理员";
}
@ -166,7 +166,7 @@ public class AppController {
userInfoService.update(userInfo, new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId));
}catch (Exception e) {
ApiAccessLimitUtil.removeKey(String.valueOf(userId), "updateAuthCertInfo");
ApiAccessLimitUtil.removeKey(certName, "updateAuthCertInfoByIdCard");
ApiAccessLimitUtil.removeKey(certNum, "updateAuthCertInfoByIdCard");
authErrMsg = "实名修改失败: 身份证信息不匹配";
}
}

View File

@ -669,11 +669,13 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
List<Orders> orders = baseMapper.selectOrdersByOrdersNo(ordersNo, status, userId, courseId,
flag, time, userName, ordersType, TimeCompleteUtils.completeStartTime(startTime), TimeCompleteUtils.completeEndTime(endTime), sysUserId, qdCode, sysUserName);
Set<Long> courseIds = orders.stream().map(Orders::getCourseId).collect(Collectors.toSet());
List<Course> courses = courseDao.selectBatchIds(courseIds);
Map<Long, String> map = courses.stream().collect(Collectors.toMap(Course::getCourseId, Course::getTitle));
orders.parallelStream().forEach(s -> {
s.setTitle(map.get(s.getCourseId()));
});
if(CollUtil.isNotEmpty(courseIds)) {
List<Course> courses = courseDao.selectBatchIds(courseIds);
Map<Long, String> map = courses.stream().collect(Collectors.toMap(Course::getCourseId, Course::getTitle));
orders.parallelStream().forEach(s -> {
s.setTitle(map.get(s.getCourseId()));
});
}
PageInfo<Orders> pageInfo = new PageInfo<>(orders);
return Result.success().put("data", PageUtils.page(pageInfo));
}