fix[文件服务]:修复传参名称不匹配导致文件加载不出来问题
This commit is contained in:
+5
-8
@@ -14,6 +14,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -71,10 +72,7 @@ public class ApiDeviceController {
|
||||
JsonObject jsonObject;
|
||||
String property = MapUtil.getStrValue(param, "control");
|
||||
String value = MapUtil.getStrValue(param, "order_no");
|
||||
// System.out.println("order_no"+value);
|
||||
if (value == null || "".equals(value)) {
|
||||
return Result.succeed("暂未开放控制权限");
|
||||
}
|
||||
Assert.notNull(value,"任务编号不能为空");
|
||||
|
||||
Result res = orderCenterService.getOrderExecStatus(value);
|
||||
if (res.getResp_code() != null && res.getResp_code() == 1){
|
||||
@@ -84,10 +82,9 @@ public class ApiDeviceController {
|
||||
if (ControlEnum.contains(ControlEnum.valueOf(property.toUpperCase()))) {
|
||||
jsonObject = gson.fromJson(controlMessageConstant.CONTROL_MESSAGE_MAP.get(property), JsonObject.class);
|
||||
|
||||
if (value != null || value != "") {
|
||||
JsonObject data = jsonObject.getAsJsonObject("data");
|
||||
data.addProperty("order_no", value);
|
||||
}
|
||||
JsonObject data = jsonObject.getAsJsonObject("data");
|
||||
data.addProperty("order_no", value);
|
||||
|
||||
}else {
|
||||
return Result.succeed("暂未开放控制权限");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user