|
@@ -8,6 +8,7 @@ import com.gis.domain.dto.DevicePageDto;
|
|
|
import com.gis.domain.dto.PageDto;
|
|
|
import com.gis.service.DeviceService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import java.util.HashMap;
|
|
@@ -27,9 +28,18 @@ public class DeviceServiceImpl implements DeviceService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Result getList() {
|
|
|
+ public Result getList(String userId, String deviceId, String devTypeId) {
|
|
|
String api = "/api/server/v1/devices";
|
|
|
- return doPost(api, null, null);
|
|
|
+ HashMap<String, String> query = new HashMap<>();
|
|
|
+ query.put("userId", userId);
|
|
|
+ if (StringUtils.isNotBlank(deviceId)) {
|
|
|
+ query.put("deviceId", deviceId);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(devTypeId)) {
|
|
|
+ query.put("devTypeId", devTypeId);
|
|
|
+ }
|
|
|
+ return doGet(api, query);
|
|
|
}
|
|
|
|
|
|
@Override
|