|
@@ -351,24 +351,27 @@ public class AiBytedanceAdvertiserStrategyController {
|
|
|
*
|
|
|
* 根据下载链接获取应用包名
|
|
|
*
|
|
|
- * @param downloadType 类型
|
|
|
* @param urlPath 下载链接
|
|
|
* @return org.jeecg.common.api.vo.Result
|
|
|
* @author zianY
|
|
|
*/
|
|
|
@ApiOperation(value="根据下载链接获取应用包名", notes="根据下载链接获取应用包名")
|
|
|
@GetMapping(value = "/getPackageNameByUrl")
|
|
|
- public Result getPackageNameByUrl(@RequestParam("downloadType") String downloadType,@RequestParam("urlPath") String urlPath) {
|
|
|
+ public Result getPackageNameByUrl(@RequestParam("urlPath") String urlPath) {
|
|
|
try {
|
|
|
- Map map = new HashMap();
|
|
|
+ Map<String,Object> map = new HashMap();
|
|
|
//根据下载链接上传附件
|
|
|
urlPath = LoadFileUtil.downLoadFromUrl(urlPath, "appFiles");
|
|
|
- if ("android".equalsIgnoreCase(downloadType)){
|
|
|
- // 根据附件地址 读取 apk 信息
|
|
|
- map = ApkUtils.readAPK(urlPath);
|
|
|
- }
|
|
|
- if ("ios".equalsIgnoreCase(downloadType)){
|
|
|
- map = ApkUtils.readIPA(urlPath);
|
|
|
+ // android 根据附件地址 读取 apk 信息
|
|
|
+ map = ApkUtils.readAPK(urlPath);
|
|
|
+ if (!map.get("code").toString().equals("-1")){
|
|
|
+ map.put("platform", "android");
|
|
|
+ }else {
|
|
|
+ //ios
|
|
|
+ map = ApkUtils.readIPA(urlPath);
|
|
|
+ if (!map.get("code").toString().equals("-1")){
|
|
|
+ map.put("platform", "ios");
|
|
|
+ }
|
|
|
}
|
|
|
return Result.successMsg("根据下载链接获取应用包名成功", map);
|
|
|
}catch (Exception e){
|
|
@@ -397,7 +400,7 @@ public class AiBytedanceAdvertiserStrategyController {
|
|
|
@ApiOperation(value="获取行动号召", notes="获取行动号召")
|
|
|
@GetMapping(value = "/getAdAudiencePackage")
|
|
|
public Result getAdAudiencePackage(@RequestParam("accountId") String accountId,
|
|
|
- @RequestParam(value = "landingType",required = false) String landingType,
|
|
|
+ @RequestParam(value = "landingType") String landingType,
|
|
|
@RequestParam(value = "deliveryRange",required = false) String deliveryRange) {
|
|
|
try {
|
|
|
return aiBytedanceAdvertiserStrategyService.getAdAudiencePackage(accountId,landingType,deliveryRange);
|