手持APP更新

This commit is contained in:
ludj
2023-02-14 19:12:59 +08:00
parent dbe94ba27f
commit 5b43235369
3 changed files with 48 additions and 8 deletions

View File

@@ -20,7 +20,6 @@ import org.nl.system.service.secutiry.dto.AuthUserDto;
import org.nl.system.service.user.ISysUserService;
import org.nl.system.service.user.dao.SysUser;
import org.nl.system.service.user.dto.CurrentUser;
import org.nl.system.service.user.dto.UserDto;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;

View File

@@ -0,0 +1,48 @@
package org.nl.wms.pda;
/**
* @author ldjun
* @version 1.0
* @date 2023年02月14日 15:20
* @desc desc
*/
import cn.dev33.satoken.annotation.SaIgnore;
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.modules.logging.annotation.Log;
import org.nl.modules.system.service.ParamService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
/**
*
*/
@RestController
@RequiredArgsConstructor
@Api(tags = "任务管理")
@RequestMapping("/api/pda/update")
@Slf4j
public class AppUpdateController {
private final ParamService paramService;
@PostMapping
@Log("app更新")
@ApiOperation("app更新")
@SaIgnore
public ResponseEntity<Object> appUpdate() {
JSONObject obj=new JSONObject();
// obj.put("versionName","1.0.1");
String app_rul = paramService.findByCode("APP_URL").getValue();
String app_version = paramService.findByCode("APP_VERSION").getValue();
// obj.put("url","http://172.17.2.163:8080/apk/app.apk");
obj.put("url",app_rul);
obj.put("versionName",app_version);
return new ResponseEntity<>(obj, HttpStatus.OK);
}
}