|
@@ -36,10 +36,7 @@ import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
|
import com.zhongzheng.modules.user.mapper.UserMapper;
|
|
|
import com.zhongzheng.modules.user.service.IUserPlanService;
|
|
|
import com.zhongzheng.modules.user.service.IUserService;
|
|
|
-import com.zhongzheng.modules.user.vo.RanKingUser;
|
|
|
-import com.zhongzheng.modules.user.vo.UserPlanVo;
|
|
|
-import com.zhongzheng.modules.user.vo.UserStudyRecordVo;
|
|
|
-import com.zhongzheng.modules.user.vo.UserVo;
|
|
|
+import com.zhongzheng.modules.user.vo.*;
|
|
|
import io.swagger.models.auth.In;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -620,7 +617,42 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
userPlanQueryBo.setUserId(userId);
|
|
|
userPlanQueryBo.setStatus(new ArrayList<Integer>(Arrays.asList(1)));
|
|
|
List<UserPlanVo> userPlanVos = userPlanService.queryList(userPlanQueryBo);
|
|
|
- return null;
|
|
|
+ Calendar now = Calendar.getInstance();
|
|
|
+ Long planSum =0L;
|
|
|
+ for (UserPlanVo userPlanVo : userPlanVos) {
|
|
|
+ List<CalendarStudyVo> collect = userPlanVo.getCalendarStudyVo().stream().filter(CalendarStudyVo -> CalendarStudyVo.getMonth().equals((now.get(Calendar.MONTH) + 1))).collect(Collectors.toList());
|
|
|
+ if (!CollectionUtils.isEmpty(collect)){
|
|
|
+ for (CalendarStudyVo calendarStudyVo : collect) {
|
|
|
+ List<DayStudyVo> dayStudyVos = calendarStudyVo.getDayStudyList().stream().filter(CalendarStudyVo -> CalendarStudyVo.getDate().equals(now.get(Calendar.DAY_OF_MONTH))).collect(Collectors.toList());
|
|
|
+ for (DayStudyVo dayStudyVo : dayStudyVos) {
|
|
|
+ if (dayStudyVo.getPerform() != 1){
|
|
|
+ planSum ++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return planSum;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Long periodSum(Long userId) {
|
|
|
+ return baseMapper.periodSum(userId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Long subscribeSum(Long userId) {
|
|
|
+ return baseMapper.subscribeSum(userId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Long informSum(Long userId) {
|
|
|
+ return baseMapper.informSum(userId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Long orderSum(Long userId) {
|
|
|
+ return baseMapper.orderSum(userId);
|
|
|
}
|
|
|
|
|
|
|