|
|
@@ -46,13 +46,10 @@ import org.springframework.stereotype.Service;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
-import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
-import java.util.Set;
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -266,9 +263,8 @@ public class SpAppReqServiceImpl implements SpAppReqService {
|
|
|
}
|
|
|
long paramVersion = Long.parseLong(spAppReqDataVO.getVersionCode());
|
|
|
long effectiveVersion = Long.parseLong(vo.getVersionNumber());
|
|
|
- //if()
|
|
|
- //如果版本号太新,则返回不更新
|
|
|
- if(paramVersion>effectiveVersion) {
|
|
|
+ // 如果版本号太新,则返回不更新
|
|
|
+ if (paramVersion > effectiveVersion) {
|
|
|
json.put("code", 100);
|
|
|
json.put("msg", "当前版本号比服务器的新!");
|
|
|
json.put("data", respVo);
|
|
|
@@ -286,7 +282,6 @@ public class SpAppReqServiceImpl implements SpAppReqService {
|
|
|
respVo.setDownloadUrl(url);
|
|
|
respVo.setUpdateStatus("1");
|
|
|
// 判断是否需要强制更新
|
|
|
-
|
|
|
if (paramVersion < effectiveVersion) {
|
|
|
// 查询是否需要强制更新
|
|
|
List<String> list = vo.getNeedUpdateVersionList();
|
|
|
@@ -299,7 +294,7 @@ public class SpAppReqServiceImpl implements SpAppReqService {
|
|
|
respVo.setVersionCode(vo.getVersionNumber());
|
|
|
respVo.setModifyContent(vo.getUpdateLog());
|
|
|
json.put("code", 100);
|
|
|
- json.put("msg", "当前最新版本:"+vo.getVersionName());
|
|
|
+ json.put("msg", "当前最新版本:" + vo.getVersionName());
|
|
|
json.put("data", respVo);
|
|
|
return json;
|
|
|
}
|