Bläddra i källkod

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-boot

yumeng 4 år sedan
förälder
incheckning
f42879f5ec

+ 4 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/FileInfoServiceImpl.java

@@ -19,6 +19,8 @@ import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.http.HttpEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.mime.HttpMultipartMode;
 import org.apache.http.entity.mime.MultipartEntityBuilder;
 import org.apache.http.entity.mime.content.FileBody;
 import org.apache.http.impl.client.CloseableHttpClient;
@@ -33,6 +35,7 @@ import java.io.*;
 import java.net.HttpURLConnection;
 import java.net.URI;
 import java.net.URL;
+import java.nio.charset.Charset;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -269,6 +272,7 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
             // 其他参数
             entityBuilder.addTextBody("advertiser_id", String.valueOf(token.getAccountId()));
             entityBuilder.addTextBody("video_signature", DigestUtils.md5Hex(new FileInputStream(new File(videoPath))));
+            entityBuilder.addTextBody("filename",file.getFilename(), ContentType.create("text/plain", Charset.forName("UTF-8")));
             HttpEntity entity = entityBuilder.build();
             client = HttpClientBuilder.create().build();
             httpPost.setURI(URI.create(url));

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaishouAppPackageController.java

@@ -302,7 +302,7 @@ public class KuaishouAppPackageController {
             if (Check.isNull(projectId) || Check.isNull(appVersion)) {
                 return Result.error("缺失参数");
             }
-            List<Long> list = kuaishouAppPackageService.queryByAppVersion(projectId, appVersion);
+            List<Long> list = kuaishouAppPackageService.queryByAppVersion(projectId, appVersion,null);
             if (Check.isNull(list)) {
                 return Result.ok("success");
             } else {

+ 2 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/KuaishouAppPackageMapper.java

@@ -20,9 +20,9 @@ public interface KuaishouAppPackageMapper extends BaseMapper<KuaishouAppPackage>
 
     List<String> queryAppVersions(@Param("projectId") Long projectId);
 
-    List<Long> queryByAppVersion(@Param("projectId") Long projectId,@Param("appVersion") String appVersion);
+    List<Long> queryByAppVersion(@Param("projectId") Long projectId, @Param("appVersion") String appVersion, @Param("dataStatus") Integer dataStatus);
 
-    List<JSONObject> queryPageList(@Param("appName") String appName,@Param("appVersion") String appVersion, @Param("projectId") Long projectId, @Param("platform") Integer platform);
+    List<JSONObject> queryPageList(@Param("appName") String appName, @Param("appVersion") String appVersion, @Param("projectId") Long projectId, @Param("platform") Integer platform);
 
     Long queryUnitCount(@Param("id") Long id);
 

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/IKuaishouAppPackageService.java

@@ -23,7 +23,7 @@ public interface IKuaishouAppPackageService extends IService<KuaishouAppPackage>
 
     Result<Object> queryPushResults(String id, JSONArray accountIds, String status);
 
-    List<Long> queryByAppVersion(Long projectId,String appVersion);
+    List<Long> queryByAppVersion(Long projectId,String appVersion,Integer dataStatus);
 
     void createAppAndGroupRel(JSONObject request);
 

+ 0 - 17
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/KuaishouAppPackageRelMapper.java

@@ -1,17 +0,0 @@
-package cn.com.ctop.kuaishou.modules.ai.service;
-
-import java.util.List;
-
-import cn.com.ctop.kuaishou.modules.ai.entity.KuaishouAppPackageRel;
-import org.apache.ibatis.annotations.Param;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
- * 应用和账户关联表
- * @author: jeecg-boot
- * @date:   2021-05-13
- * @cersion: V1.0
- */
-public interface KuaishouAppPackageRelMapper extends BaseMapper<KuaishouAppPackageRel> {
-
-}

+ 3 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/KuaishouAppPackageServiceImpl.java

@@ -221,7 +221,7 @@ public class KuaishouAppPackageServiceImpl extends ServiceImpl<KuaishouAppPackag
     public Result<Object> pushAppPackage(Long id, JSONArray accountIds) {
         KuaishouAppPackage appPackage = appPackageMapper.selectById(id);
         if (Check.isNull(appPackage)) {
-            return Result.error("获取到应用信息");
+            return Result.error("获取到应用信息");
         }
         KuaishouAppPackageRel rel = new KuaishouAppPackageRel();
         rel.setApptemId(appPackage.getId());
@@ -324,8 +324,8 @@ public class KuaishouAppPackageServiceImpl extends ServiceImpl<KuaishouAppPackag
     }
 
     @Override
-    public List<Long> queryByAppVersion(Long projectId, String appVersion) {
-        return appPackageMapper.queryByAppVersion(projectId, appVersion);
+    public List<Long> queryByAppVersion(Long projectId, String appVersion,Integer dataStatus) {
+        return appPackageMapper.queryByAppVersion(projectId, appVersion,dataStatus);
     }
 
     @Override

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/BytedanceVideoSlogenInfoServiceImpl.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.material.service.impl;
 
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.material.entity.BytedanceVideoSlogenInfo;
 import cn.com.ctop.toutiao.modules.material.mapper.BytedanceVideoSlogenInfoMapper;
 import cn.com.ctop.toutiao.modules.material.service.IBytedanceVideoSlogenInfoService;
@@ -28,6 +29,8 @@ public class BytedanceVideoSlogenInfoServiceImpl extends ServiceImpl<BytedanceVi
         for(int i=0;i<slogans.size();i++){
             JSONObject sloganObject = slogans.getJSONObject(i);
             String title = sloganObject.getString("title");
+            title = title.replaceAll("\\{\\{","{");
+            title = title.replaceAll("\\}\\}","}");
             String creativeWordIds = Check.isNull(sloganObject.getJSONArray("creative_word_ids")) ? "" : sloganObject.getJSONArray("creative_word_ids").toJSONString();
             BytedanceVideoSlogenInfo slogenInfo = new BytedanceVideoSlogenInfo(videoCode,title,userId,creativeWordIds);
             this.save(slogenInfo);