订单中心报错
This commit is contained in:
@@ -668,8 +668,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()));
|
||||
});
|
||||
PageInfo<Orders> pageInfo = new PageInfo<>(orders);
|
||||
|
||||
return Result.success().put("data", PageUtils.page(pageInfo));
|
||||
}
|
||||
|
||||
|
||||
@@ -94,9 +94,8 @@
|
||||
</insert>
|
||||
|
||||
<select id="selectOrdersByOrdersNo" resultType="com.sqx.modules.orders.entity.Orders">
|
||||
select o.*,u.user_name as userName,c.title as title,s.username as sysUserName,s.qd_code as qdCode from orders o
|
||||
select o.*,u.user_name as userName,s.username as sysUserName,s.qd_code as qdCode from orders o
|
||||
left join tb_user u on o.user_id=u.user_id
|
||||
left join course c on c.course_id=o.course_id
|
||||
left join sys_user s on s.user_id=o.sys_user_id
|
||||
where 1=1
|
||||
<if test="userName!=null and userName!=''">
|
||||
|
||||
Reference in New Issue
Block a user