|
|
@@ -70,7 +70,7 @@ func (s *captureUintService) GetCapture(id int) (*model.CaptureDetail, *common.E
|
|
|
return detail, nil
|
|
|
}
|
|
|
|
|
|
-func (s *captureUintService) CaptureList(searchValue string, current, size int) ([]model.CaptureDetail, *common.Errors) {
|
|
|
+func (s *captureUintService) CaptureList(searchValue string, current, size int) ([]model.CaptureDetail, int64, *common.Errors) {
|
|
|
var details []model.CaptureDetail
|
|
|
device := dao.CaptureUnit{}
|
|
|
|
|
|
@@ -80,10 +80,10 @@ func (s *captureUintService) CaptureList(searchValue string, current, size int)
|
|
|
|
|
|
offset := (current - 1) * size
|
|
|
limit := size
|
|
|
- devices, err := device.GetDevices(offset, limit)
|
|
|
+ devices, total, err := device.GetDevices(offset, limit)
|
|
|
|
|
|
if err != nil {
|
|
|
- return nil, common.FailResponse(err.Error(), nil)
|
|
|
+ return nil, 0, common.FailResponse(err.Error(), nil)
|
|
|
}
|
|
|
|
|
|
for _, d := range devices {
|
|
|
@@ -95,7 +95,7 @@ func (s *captureUintService) CaptureList(searchValue string, current, size int)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- return details, nil
|
|
|
+ return details, total, nil
|
|
|
}
|
|
|
|
|
|
func (s *captureUintService) CaptureGetList(tenantId int) ([]*dao.CaptureUnit, *common.Errors) {
|
|
|
@@ -160,7 +160,7 @@ func (s *captureUintService) PointSubmit(userId int64, tenantId int, req *dao.Ch
|
|
|
return common.SuccessResponse(common.Succeeded, nil)
|
|
|
}
|
|
|
|
|
|
-func (s *captureUintService) PointList(searchValue string, current, size int) ([]dao.CheckPoint, *common.Errors) {
|
|
|
+func (s *captureUintService) PointList(searchValue string, current, size int) ([]dao.CheckPoint, int64, *common.Errors) {
|
|
|
device := dao.CheckPoint{}
|
|
|
if searchValue != "" {
|
|
|
device.PointSN = searchValue
|
|
|
@@ -168,11 +168,11 @@ func (s *captureUintService) PointList(searchValue string, current, size int) ([
|
|
|
|
|
|
offset := (current - 1) * size
|
|
|
limit := size
|
|
|
- devices, err := device.GetDevices(offset, limit)
|
|
|
+ devices, total, err := device.GetDevices(offset, limit)
|
|
|
if err != nil {
|
|
|
- return nil, common.FailResponse(err.Error(), nil)
|
|
|
+ return nil, 0, common.FailResponse(err.Error(), nil)
|
|
|
}
|
|
|
- return devices, nil
|
|
|
+ return devices, total, nil
|
|
|
}
|
|
|
|
|
|
func (s *captureUintService) PointGetList(tenantId int) ([]*dao.CheckPoint, *common.Errors) {
|