add app update
This commit is contained in:
@@ -23,6 +23,11 @@ public interface AcsConfig {
|
|||||||
//WCS系统接口地址
|
//WCS系统接口地址
|
||||||
String WCSURL = "wcsurl";
|
String WCSURL = "wcsurl";
|
||||||
|
|
||||||
|
String APP_URL ="APP_URL";
|
||||||
|
|
||||||
|
String VERSIONNAME ="versionName";
|
||||||
|
|
||||||
|
|
||||||
String HASOTHERSYSTEM = "hasOtherSystem";
|
String HASOTHERSYSTEM = "hasOtherSystem";
|
||||||
|
|
||||||
String ERPURL = "erpurl";
|
String ERPURL = "erpurl";
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package org.nl.pad;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.acs.config.AcsConfig;
|
||||||
|
import org.nl.acs.config.server.AcsConfigService;
|
||||||
|
import org.nl.annotation.Log;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "任务管理")
|
||||||
|
@RequestMapping("/api/pda/update")
|
||||||
|
@Slf4j
|
||||||
|
public class AppUpdateController {
|
||||||
|
|
||||||
|
private final AcsConfigService acsConfigService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("app更新")
|
||||||
|
@ApiOperation("app更新")
|
||||||
|
public ResponseEntity<Object> appUpdate() {
|
||||||
|
JSONObject obj=new JSONObject();
|
||||||
|
String app_url = acsConfigService.findConfigFromCache().get(AcsConfig.APP_URL);
|
||||||
|
String app_version = acsConfigService.findConfigFromCache().get(AcsConfig.VERSIONNAME);
|
||||||
|
obj.put("url",app_url);
|
||||||
|
obj.put("versionName",app_version);
|
||||||
|
return new ResponseEntity<>(obj, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user