|
@@ -3,6 +3,7 @@ package com.onemap.apply.controller.gw;
|
|
|
import com.onemap.apply.service.gw.GwService;
|
|
|
import com.onemap.common.core.web.domain.RequestResult;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@@ -16,13 +17,13 @@ public class GwController {
|
|
|
@Autowired
|
|
|
GwService gwService;
|
|
|
|
|
|
- @RequestMapping("/GetInfo")
|
|
|
- public RequestResult GetList(@Valid @NotNull Integer type, String key) {
|
|
|
+ @GetMapping("/GetInfo")
|
|
|
+ public RequestResult GetList(@Valid @NotNull Integer type, @Valid @NotNull String key) {
|
|
|
if (type != null && (type != 1 && type != 2)) {
|
|
|
return RequestResult.error("查询类型错误");
|
|
|
}
|
|
|
Map<String, Object> data = gwService.getData(type, key);
|
|
|
- if(data==null){
|
|
|
+ if (data == null) {
|
|
|
return RequestResult.error("查询失败");
|
|
|
}
|
|
|
return RequestResult.success("查询成功", data);
|