update:
1. update check-update api
This commit is contained in:
@@ -15,14 +15,16 @@ public class CheckVersionResponse implements Serializable {
|
||||
|
||||
private Boolean isForceUpdate = Boolean.FALSE;
|
||||
|
||||
private String updateVersion;
|
||||
|
||||
private String updateContent;
|
||||
|
||||
private String url;
|
||||
|
||||
private String qihooUrl;
|
||||
|
||||
private String yingyongbaoUrl;
|
||||
|
||||
private String updateContent;
|
||||
|
||||
private String webDownloadUrl;
|
||||
|
||||
private String fallbackUrl;
|
||||
|
||||
@@ -63,9 +63,12 @@ public class CommonReleaseVersionServiceImpl extends BaseServiceImpl<CommonRelea
|
||||
.orderByDesc(CommonReleaseVersionEntity::getVersionCode)
|
||||
);
|
||||
if (!list.isEmpty()) {
|
||||
response.setNeedUpdate(Boolean.TRUE);
|
||||
boolean f = false;
|
||||
int code = list.get(0).getVersionCode();
|
||||
CommonReleaseVersionEntity newest = list.get(0);
|
||||
response.setNeedUpdate(Boolean.TRUE);
|
||||
response.setUpdateVersion(newest.getVersionName());
|
||||
response.setUpdateContent(newest.getUpdateContent());
|
||||
int code = newest.getVersionCode();
|
||||
List<CommonReleaseVersionEntity> newestList = new ArrayList<>();
|
||||
for (CommonReleaseVersionEntity entity : list) {
|
||||
if (!f && Objects.equals(entity.getIsForceUpdate(), 1)) {
|
||||
@@ -144,8 +147,6 @@ public class CommonReleaseVersionServiceImpl extends BaseServiceImpl<CommonRelea
|
||||
entity.setIsForceUpdate(vo.getIsForceUpdate());
|
||||
entity.setUpdateContent(vo.getUpdateContent());
|
||||
entity.setDownloadUrl(vo.getDownloadUrl());
|
||||
entity.setDispatchUrl(vo.getDispatchUrl());
|
||||
entity.setDispatchTargetVersion(vo.getDispatchTargetVersion());
|
||||
// 使用 MapStruct 设置渠道和状态
|
||||
return CommonReleaseVersionConvert.INSTANCE.copyForChannel(entity, AppMarketChannelEnum.OFFICIAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user