|
@@ -7,9 +7,9 @@ import com.yx.face.boot.restful.RestDTO;
|
|
|
import com.yx.face.boot.restful.ServiceException;
|
|
|
import com.yx.face.dao.FaceDeviceDao;
|
|
|
import com.yx.face.dao.SystemLongTermDocumentsDao;
|
|
|
+import com.yx.face.model.query.FaceDeviceQu;
|
|
|
import com.yx.face.model.query.SysLongTermDocumentsQu;
|
|
|
import com.yx.face.model.vo.SystemLongTermDocumentsVO;
|
|
|
-import com.yx.face.model.vo.UserWhitelistVO;
|
|
|
import com.yx.face.service.SystemLongTermDocumentsService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -32,23 +32,25 @@ public class SystemLongTermDocumentsServiceImpl implements SystemLongTermDocumen
|
|
|
if (dto.getData() == null) {
|
|
|
throw new ServiceException("参数有误");
|
|
|
}
|
|
|
- if (dto.getData().getAdminId() == null) {
|
|
|
- throw new ServiceException("参数有误");
|
|
|
- }
|
|
|
+// if (dto.getData().getAdminId() == null) {
|
|
|
+// throw new ServiceException("参数有误");
|
|
|
+// }
|
|
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
|
|
- List<SystemLongTermDocumentsVO> list = systemLongTermDocumentsDao.getList(dto.getData().getAdminId());
|
|
|
+ List<SystemLongTermDocumentsVO> list = systemLongTermDocumentsDao.getList(dto.getData().getAdminId(), dto.getData().getName());
|
|
|
return new PageInfo<>(list);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Integer add(String sn) {
|
|
|
- Integer add = faceDeviceDao.update(sn, 2);
|
|
|
- return add;
|
|
|
+ public Integer add(FaceDeviceQu qu) {
|
|
|
+ for (String sn : qu.getSns()) {
|
|
|
+ faceDeviceDao.update(sn, 2, qu.getAdminId());
|
|
|
+ }
|
|
|
+ return 1;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public Integer delete(String sn) {
|
|
|
- Integer update = faceDeviceDao.update(sn, 1);
|
|
|
+ Integer update = faceDeviceDao.update(sn, 1, 0);
|
|
|
return update;
|
|
|
}
|
|
|
}
|