|
@@ -40,9 +40,12 @@ public class ReleaseV1Controller {
|
|
if (null == userInfo) {
|
|
if (null == userInfo) {
|
|
return new HttpResult<>(401, "登录失效", null);
|
|
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);
|
|
return new HttpResult<>(201, "参数错误", null);
|
|
} else {
|
|
} else {
|
|
|
|
+ if (data.getContent()!=null &&data.getContent().length()>50){
|
|
|
|
+ return new HttpResult<>(201, "更新内容最多50字", null);
|
|
|
|
+ }
|
|
ApplicationEntity app = applicationRepository.findFirstByAppIdAndTenantNo(data.getAppId(), userInfo.getTenantNo());
|
|
ApplicationEntity app = applicationRepository.findFirstByAppIdAndTenantNo(data.getAppId(), userInfo.getTenantNo());
|
|
if (null == app) return new HttpResult<>(201, "appId不存在", null);
|
|
if (null == app) return new HttpResult<>(201, "appId不存在", null);
|
|
ReleaseEntity release = releaseRepository.findFirstByAppIdAndTenantNoAndVersionCodeGreaterThanEqual(data.getAppId(), userInfo.getTenantNo(), data.getVersionCode());
|
|
ReleaseEntity release = releaseRepository.findFirstByAppIdAndTenantNoAndVersionCodeGreaterThanEqual(data.getAppId(), userInfo.getTenantNo(), data.getVersionCode());
|