添加release版本
这个提交包含在:
父节点
0b5597515b
当前提交
9f6d72eec6
@ -40,9 +40,12 @@ public class ReleaseV1Controller {
|
||||
if (null == userInfo) {
|
||||
return new HttpResult<>(401, "登录失效", null);
|
||||
}
|
||||
if (null == data.getAppId() || null == data.getUrl() || null == data.getVersionCode() || null == data.getVersionName()) {
|
||||
if (null == data.getAppId() || null == data.getUrl() || null == data.getVersionName()) {
|
||||
return new HttpResult<>(201, "参数错误", null);
|
||||
} else {
|
||||
if (data.getContent()!=null &&data.getContent().length()>50){
|
||||
return new HttpResult<>(201, "更新内容最多50字", null);
|
||||
}
|
||||
ApplicationEntity app = applicationRepository.findFirstByAppIdAndTenantNo(data.getAppId(), userInfo.getTenantNo());
|
||||
if (null == app) return new HttpResult<>(201, "appId不存在", null);
|
||||
ReleaseEntity release = releaseRepository.findFirstByAppIdAndTenantNoAndVersionCodeGreaterThanEqual(data.getAppId(), userInfo.getTenantNo(), data.getVersionCode());
|
||||
|
||||
@ -14,7 +14,7 @@ public class ReleaseAddData {
|
||||
private boolean vivo;
|
||||
private boolean google;
|
||||
private String url;
|
||||
private String versionCode;
|
||||
private long versionCode;
|
||||
private String versionName;
|
||||
private String content;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ public class ReleaseEntity extends AbstractBaseTimeEntity {
|
||||
@Enumerated(EnumType.STRING)
|
||||
private AppStatus google;
|
||||
private String url;
|
||||
private String versionCode;
|
||||
private long versionCode;
|
||||
private String versionName;
|
||||
private String content;
|
||||
}
|
||||
|
||||
@ -9,6 +9,6 @@ import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface ReleaseRepository extends JpaRepository<ReleaseEntity, Long> {
|
||||
ReleaseEntity findFirstByAppIdAndTenantNoAndVersionCodeGreaterThanEqual(String appId, String tenantNo, String versionCode);
|
||||
ReleaseEntity findFirstByAppIdAndTenantNoAndVersionCodeGreaterThanEqual(String appId, String tenantNo, long versionCode);
|
||||
Page<ReleaseEntity> findAllByAppIdAndTenantNo(String appId, String tenantNo, Pageable pageable);
|
||||
}
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户