|
@@ -1,6 +1,8 @@
|
|
|
package com.template.controller;
|
|
package com.template.controller;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
@@ -9,6 +11,7 @@ import com.template.annotation.DESRespondSecret;
|
|
|
import com.template.annotation.PassToken;
|
|
import com.template.annotation.PassToken;
|
|
|
import com.template.api.DriverStockControllerAPI;
|
|
import com.template.api.DriverStockControllerAPI;
|
|
|
import com.template.common.utils.TimeExchange;
|
|
import com.template.common.utils.TimeExchange;
|
|
|
|
|
+import com.template.model.pojo.SmartClass;
|
|
|
import com.template.model.pojo.SmartUser;
|
|
import com.template.model.pojo.SmartUser;
|
|
|
import com.template.model.pojo.SmartWarning;
|
|
import com.template.model.pojo.SmartWarning;
|
|
|
import com.template.model.result.CommonResult;
|
|
import com.template.model.result.CommonResult;
|
|
@@ -16,6 +19,7 @@ import com.template.model.result.PageUtils;
|
|
|
import com.template.model.tongji.*;
|
|
import com.template.model.tongji.*;
|
|
|
import com.template.model.vo.VisitorTjVo;
|
|
import com.template.model.vo.VisitorTjVo;
|
|
|
import com.template.services.DriverStockService;
|
|
import com.template.services.DriverStockService;
|
|
|
|
|
+import com.template.services.SmartClassService;
|
|
|
import com.template.services.SmartUserService;
|
|
import com.template.services.SmartUserService;
|
|
|
import com.template.services.SmartWarningService;
|
|
import com.template.services.SmartWarningService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -41,6 +45,9 @@ public class DriverStockController implements DriverStockControllerAPI {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
public SmartUserService smartUserService;
|
|
public SmartUserService smartUserService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ public SmartClassService smartClassService;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
@PassToken
|
|
@PassToken
|
|
|
@DESRespondSecret(validated = false)
|
|
@DESRespondSecret(validated = false)
|
|
@@ -231,9 +238,27 @@ public class DriverStockController implements DriverStockControllerAPI {
|
|
|
@Override
|
|
@Override
|
|
|
@PassToken
|
|
@PassToken
|
|
|
@DESRespondSecret(validated = false)
|
|
@DESRespondSecret(validated = false)
|
|
|
- public CommonResult getUserPage(int currentPage, int pageCount, String key, Integer identityId) {
|
|
|
|
|
|
|
+ public CommonResult getUserPage(int currentPage, int pageCount, String key, Integer identityId,Integer graderId,Integer classId) {
|
|
|
|
|
+// 查询对应的班级
|
|
|
|
|
+ LambdaQueryWrapper<SmartClass> wrapper=new LambdaQueryWrapper<>();
|
|
|
|
|
+ wrapper.eq(ObjectUtils.isNotEmpty(graderId),SmartClass::getGradeId,graderId)
|
|
|
|
|
+ .eq(ObjectUtils.isNotEmpty(classId),SmartClass::getId,classId);
|
|
|
|
|
+ List<SmartClass> smartClasses = smartClassService.list(wrapper);
|
|
|
|
|
+// 组合班级id
|
|
|
|
|
+ String classIds="";
|
|
|
|
|
+ for (int i = 0; i < smartClasses.size(); i++) {
|
|
|
|
|
+ SmartClass smartClass = smartClasses.get(i);
|
|
|
|
|
+ String id = smartClass.getId()+"";
|
|
|
|
|
+ if (0==i) {
|
|
|
|
|
+ classIds=id;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ classIds=classIds+","+id;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
PageHelper.startPage(currentPage, pageCount);
|
|
PageHelper.startPage(currentPage, pageCount);
|
|
|
- PageInfo<userPage> list = driverStockService.getUserPage(key, identityId);
|
|
|
|
|
|
|
+ PageInfo<userPage> list = driverStockService.getUserPage(key, identityId,classIds);
|
|
|
return CommonResult.ok(list);
|
|
return CommonResult.ok(list);
|
|
|
}
|
|
}
|
|
|
|
|
|