|
@@ -7,6 +7,7 @@ import java.util.Map;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@@ -24,15 +25,15 @@ public class RestApiController {
|
|
|
private RestApiService restApiService;
|
|
|
|
|
|
@RequestMapping(value="/mobile/getAppVersion", method = RequestMethod.POST)
|
|
|
- public ArrayList<HashMap<String, String>> appVersion(@RequestParam(value="deviceType", required=false, defaultValue="") String deviceType) {
|
|
|
- ArrayList<HashMap<String, String>> result = new ArrayList<>();
|
|
|
+ public HashMap<String, String> appVersion(@RequestBody AppVersionDTO dto) {
|
|
|
HashMap<String, String> data = new HashMap<String, String>();
|
|
|
|
|
|
String code = "99";
|
|
|
+ String deviceType = dto.getDeviceType();
|
|
|
if (deviceType.equals("")) {
|
|
|
code = "01";
|
|
|
} else {
|
|
|
- AppVersionDTO dto = restApiService.selectAppVersion(deviceType);
|
|
|
+ dto = restApiService.selectAppVersion(deviceType);
|
|
|
if (dto == null) {
|
|
|
code = "02";
|
|
|
} else {
|
|
@@ -43,7 +44,6 @@ public class RestApiController {
|
|
|
|
|
|
}
|
|
|
data.put("code", code);
|
|
|
- result.add(data);
|
|
|
- return result;
|
|
|
+ return data;
|
|
|
}
|
|
|
}
|