|
@@ -61,8 +61,6 @@ public class KuaiShouCreateAppTemplateServiceImpl extends ServiceImpl<KuaiShouCr
|
|
|
if (!Check.isNull(appTemplate.getImageUrl())) {
|
|
|
appTemplate.setImageUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + appTemplate.getImageUrl());
|
|
|
}
|
|
|
- appTemplateMapper.insert(appTemplate);
|
|
|
-
|
|
|
|
|
|
JSONObject apkJson = new JSONObject();
|
|
|
String platform = appTemplate.getPlatform();
|
|
@@ -74,6 +72,10 @@ public class KuaiShouCreateAppTemplateServiceImpl extends ServiceImpl<KuaiShouCr
|
|
|
}
|
|
|
if (!Check.isNull(appTemplate.getImageUrl()) && ("1".equals(platform) || "2".equals(platform))) {
|
|
|
Map<String, Object> imageMap = interfaceService.imageUpload(accountId, accessToken, (String) appTemplate.getImageUrl(), 1);
|
|
|
+ if ((Integer) imageMap.get("code") != 0) {
|
|
|
+ return imageMap;
|
|
|
+
|
|
|
+ }
|
|
|
apkJson.put("image_token", imageMap.get("imageToken"));
|
|
|
}
|
|
|
if ("1".equals(platform) && appTemplate.getUploadType() == 1) {
|
|
@@ -92,8 +94,7 @@ public class KuaiShouCreateAppTemplateServiceImpl extends ServiceImpl<KuaiShouCr
|
|
|
return appMap;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ appTemplateMapper.insert(appTemplate);
|
|
|
resultMap.put("success", true);
|
|
|
resultMap.put("message", "创建应用成功");
|
|
|
resultMap.put("code", 0);
|