|
@@ -238,24 +238,38 @@ public class KuaishouAppPackageController {
|
|
|
@PostMapping(value = "/fillInLink")
|
|
|
public Result<Object> fillInLink(@RequestBody KuaishouAppPackage kuaishouAppPackage) {
|
|
|
try {
|
|
|
- if (Check.isNull(kuaishouAppPackage.getProjectId())) {
|
|
|
- return Result.error("请选择项目");
|
|
|
- } else if (Check.isNull(kuaishouAppPackage.getAppVersion())) {
|
|
|
- return Result.error("请填写应用标记");
|
|
|
- } else if (Check.isNull(kuaishouAppPackage.getAppName())) {
|
|
|
- return Result.error("请填写应用名称");
|
|
|
- } else if (Check.isNull(kuaishouAppPackage.getPlatform())) {
|
|
|
+ Integer platform = kuaishouAppPackage.getPlatform();
|
|
|
+ if (Check.isNull(platform)) {
|
|
|
return Result.error("请选择应用类型");
|
|
|
- } else {
|
|
|
- Integer platform = kuaishouAppPackage.getPlatform();
|
|
|
- if ((platform == 1 || platform == 3) && Check.isNull(kuaishouAppPackage.getAppIconUrl())) {
|
|
|
- return Result.error("请上传图标");
|
|
|
- }
|
|
|
- if ((platform == 1 || platform == 2) && Check.isNull(kuaishouAppPackage.getAppPrivacyUrl())) {
|
|
|
+ }
|
|
|
+ if (platform == 1 || platform == 2) {
|
|
|
+ if (Check.isNull(kuaishouAppPackage.getProjectId())) {
|
|
|
+ return Result.error("请选择项目");
|
|
|
+ } else if (Check.isNull(kuaishouAppPackage.getAppVersion())) {
|
|
|
+ return Result.error("请填写应用标记");
|
|
|
+ } else if (Check.isNull(kuaishouAppPackage.getAppName())) {
|
|
|
+ return Result.error("请填写应用名称");
|
|
|
+ } else if (Check.isNull(kuaishouAppPackage.getAppPrivacyUrl())) {
|
|
|
return Result.error("安卓类应用隐私政策url不为空");
|
|
|
+ } else {
|
|
|
+ if (platform == 1 && Check.isNull(kuaishouAppPackage.getAppIconUrl())) {
|
|
|
+ return Result.error("请上传图标");
|
|
|
+ }
|
|
|
+ if (platform == 1 && Check.isNull(kuaishouAppPackage.getPackageName())) {
|
|
|
+ return Result.error("请填写应用包名");
|
|
|
+ }
|
|
|
}
|
|
|
- if (platform == 1 && Check.isNull(kuaishouAppPackage.getPackageName())) {
|
|
|
- return Result.error("请填写应用包名");
|
|
|
+ } else {
|
|
|
+ if (Check.isNull(kuaishouAppPackage.getAppName())) {
|
|
|
+ return Result.error("请填写应用名称");
|
|
|
+ } else if (Check.isNull(kuaishouAppPackage.getAppVersion())) {
|
|
|
+ return Result.error("请填写应用标记");
|
|
|
+ } else if (Check.isNull(kuaishouAppPackage.getUrl())) {
|
|
|
+ return Result.error("请填写链接");
|
|
|
+ } else if (Check.isNull(kuaishouAppPackage.getProjectId())) {
|
|
|
+ return Result.error("请选择项目");
|
|
|
+ } else if (platform == 3 && Check.isNull(kuaishouAppPackage.getAppIconUrl())) {
|
|
|
+ return Result.error("请上传图标");
|
|
|
}
|
|
|
}
|
|
|
if (!kuaishouAppPackage.getAppIconUrl().contains("http")) {
|
|
@@ -445,14 +459,15 @@ public class KuaishouAppPackageController {
|
|
|
@RequestParam("imageUrl") String imageUrl) {
|
|
|
response.setHeader("Access-Control-Allow-Origin", "*");
|
|
|
try {
|
|
|
+ if (Check.isNull(platform)) {
|
|
|
+ return Result.error("请选择应用类型");
|
|
|
+ }
|
|
|
if (Check.isNull(file)) {
|
|
|
return Result.error("执行失败,请上传应用Excel文件");
|
|
|
} else if (Check.isNull(projectId)) {
|
|
|
return Result.error("请选择项目");
|
|
|
- } else if (Check.isNull(imageUrl)) {
|
|
|
+ } else if ((platform == 1 || platform == 3) && Check.isNull(imageUrl)) {
|
|
|
return Result.error("请上传图标");
|
|
|
- } else if (Check.isNull(platform)) {
|
|
|
- return Result.error("请选择应用类型");
|
|
|
}
|
|
|
if (!imageUrl.contains("http")) {
|
|
|
imageUrl = "https:".concat(imageUrl);
|