|
@@ -18,10 +18,7 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static org.jeecg.common.constant.CommonConstant.INSTRUCTOR;
|
|
@@ -128,8 +125,7 @@ public class AppHomeServiceImpl implements IAppHomeService {
|
|
|
.map(course -> {
|
|
|
InstructorVO.CourseInfoVO vo = new InstructorVO.CourseInfoVO();
|
|
|
BeanUtils.copyProperties(course,vo);
|
|
|
- vo.setCount(Math.toIntExact(appCoursesMapper.selectCount(Wrappers.<AppCourses>lambdaQuery()
|
|
|
- .eq(AppCourses::getUserId, userId))));
|
|
|
+ vo.setCount(appOrderMapper.findByOrderNumCount(new ArrayList<>(Collections.singletonList(course.getId()))));
|
|
|
vo.setSellingPrice(course.getSellingPrice());
|
|
|
return vo;
|
|
|
})
|