Explorar o código

搜索条件新增

change %!s(int64=3) %!d(string=hai) anos
pai
achega
7c4aa8de95

+ 1 - 1
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserController.java

@@ -61,7 +61,7 @@ public class UserController extends BaseController {
     public AjaxResult infoAttached() {
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
         Map<String,Object> map = new HashMap<>();
-        Long planSum = iUserService.planSum(loginUser.getUser().getUserId());
+        Long planSum = iUserService.planSum(18L);
         Long periodSum = iUserService.periodSum(loginUser.getUser().getUserId());
         Long subscribeSum = iUserService.subscribeSum(loginUser.getUser().getUserId());
         Long informSum = iUserService.informSum(loginUser.getUser().getUserId());

+ 2 - 2
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -650,10 +650,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         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());
+            List<CalendarStudyVo> collect = userPlanVo.getCalendarStudyVo().stream().filter(CalendarStudyVo -> CalendarStudyVo.getMonth().equals(Convert.toLong((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());
+                    List<DayStudyVo> dayStudyVos = calendarStudyVo.getDayStudyList().stream().filter(CalendarStudyVo -> CalendarStudyVo.getDate().equals(Convert.toLong(now.get(Calendar.DAY_OF_MONTH)))).collect(Collectors.toList());
                     for (DayStudyVo dayStudyVo : dayStudyVos) {
                         if (dayStudyVo.getPerform() != 1){
                             planSum ++;