Commit f4dd55f6 authored by liqin's avatar liqin 💬

bug fixed

parent a5991b89
...@@ -117,7 +117,7 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -117,7 +117,7 @@ public class ChinaMobileRestApiController extends BaseController {
@RequiresAuthentication //@RequiresPermissions("equitment:key") @RequiresAuthentication //@RequiresPermissions("equitment:key")
public Map<String, Object> getBoxPrivateKey(@RequestParam(value = "mac") String mac) { public Map<String, Object> getBoxPrivateKey(@RequestParam(value = "mac") String mac) {
try { try {
String macAddress = mac.trim().toUpperCase(); String macAddress = mac.trim().toUpperCase().replaceAll("-|_", ":");
final LambdaQueryWrapper<TBoxOperation> queryWrapper = Wrappers.<TBoxOperation>lambdaQuery().eq(TBoxOperation::getMac, macAddress); final LambdaQueryWrapper<TBoxOperation> queryWrapper = Wrappers.<TBoxOperation>lambdaQuery().eq(TBoxOperation::getMac, macAddress);
final TBoxOperation tBoxOperation = this.boxOperationService.getOne(queryWrapper); final TBoxOperation tBoxOperation = this.boxOperationService.getOne(queryWrapper);
if (tBoxOperation != null) { if (tBoxOperation != null) {
...@@ -662,14 +662,12 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -662,14 +662,12 @@ public class ChinaMobileRestApiController extends BaseController {
Map map = new HashMap(); Map map = new HashMap();
if (StringUtils.isNotBlank(versionNo)) { if (StringUtils.isNotBlank(versionNo)) {
map.put("isLatest", versionNo.equalsIgnoreCase(current.getAppVersion())); if (Long.parseLong(versionNo) >= Long.parseLong(current.getAppVersion())) {
map.put("isLatest", true);
}
} else { } else {
map.put("isLatest", false);
} }
map.put("versionNo", current.getAppVersion()); map.put("versionNo", current.getAppVersion());
map.put("versionUrl", current.getApkUrl()); map.put("versionUrl", current.getApkUrl());
map.put("updateLog", current.getUpdateLog()); map.put("updateLog", current.getUpdateLog());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment