|
@@ -1,11 +1,17 @@
|
|
|
package com.template.services.impl;
|
|
package com.template.services.impl;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.template.model.pojo.SmartAccess;
|
|
import com.template.model.pojo.SmartAccess;
|
|
|
import com.template.mapper.SmartAccessMapper;
|
|
import com.template.mapper.SmartAccessMapper;
|
|
|
import com.template.model.pojo.SmartFaceDiscern;
|
|
import com.template.model.pojo.SmartFaceDiscern;
|
|
|
|
|
+import com.template.model.result.PageUtils;
|
|
|
|
|
+import com.template.model.vo.SmartAccessVo;
|
|
|
|
|
+import com.template.model.vo.VisitorPageVo;
|
|
|
import com.template.services.SmartAccessService;
|
|
import com.template.services.SmartAccessService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -21,15 +27,25 @@ import java.util.List;
|
|
|
@Service
|
|
@Service
|
|
|
public class SmartAccessServiceImpl extends ServiceImpl<SmartAccessMapper, SmartAccess> implements SmartAccessService {
|
|
public class SmartAccessServiceImpl extends ServiceImpl<SmartAccessMapper, SmartAccess> implements SmartAccessService {
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ SmartAccessMapper smartAccessMapper;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public List<SmartAccess> track(String stateTime, String endTime, Integer id) {
|
|
public List<SmartAccess> track(String stateTime, String endTime, Integer id) {
|
|
|
LambdaQueryWrapper<SmartAccess> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<SmartAccess> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.between(SmartAccess::getDateTime, stateTime, endTime)
|
|
wrapper.between(SmartAccess::getDateTime, stateTime, endTime)
|
|
|
.eq(SmartAccess::getUserId, id)
|
|
.eq(SmartAccess::getUserId, id)
|
|
|
.orderByDesc(SmartAccess::getDateTime);
|
|
.orderByDesc(SmartAccess::getDateTime);
|
|
|
-
|
|
|
|
|
List<SmartAccess> list = this.list(wrapper);
|
|
List<SmartAccess> list = this.list(wrapper);
|
|
|
-
|
|
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public PageUtils<SmartAccessVo> getPage(Integer currentPage, Integer pageCount,String keyWord,Integer gradeId, Integer classId, Integer departmentId, Integer openType, Integer resultStatus,String startTime,String endTime) {
|
|
|
|
|
+ Page<SmartAccessVo> page = new Page<>();
|
|
|
|
|
+ page.setCurrent(currentPage);
|
|
|
|
|
+ page.setSize(pageCount);
|
|
|
|
|
+ IPage<SmartAccessVo> datas = smartAccessMapper.getPage(page,keyWord,gradeId,classId,departmentId,openType,resultStatus,startTime,endTime);
|
|
|
|
|
+ return new PageUtils(datas);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|