Explorar o código

gh_detail fix

wangyunpeng hai 3 semanas
pai
achega
bd49289488

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformGzhAccountJob.java

@@ -57,7 +57,7 @@ public class ContentPlatformGzhAccountJob {
 
     private List<ContentPlatformGzhAccount> getNeedSyncAccountInfo() {
         ContentPlatformGzhAccountExample example = new ContentPlatformGzhAccountExample();
-        example.createCriteria().andExternalIdIsNotNull();
+        example.createCriteria().andExternalIdIsNotNull().andStatusEqualTo(1);
         return gzhAccountMapper.selectByExample(example);
     }
 }

+ 7 - 3
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -427,15 +427,19 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
         GhDetail ghDetail = ghDetailService.getGhDetailByGhIdType(account.getGhId(), GhTypeEnum.THIRD_PARTY_GH.type);
         GhDetailVo detailVo = new GhDetailVo();
         Integer strategyStatus = selectVideoType == 0 ? StrategyStatusEnum.DEFAULT.status : StrategyStatusEnum.STRATEGY.status;
+        ContentPlatformAccount loginUser = LoginUserContext.getUser();
         if (Objects.nonNull(ghDetail)) {
             BeanUtils.copyProperties(ghDetail, detailVo);
-            detailVo.setVideoIds(videoIds);
+            detailVo.setAccountId(account.getGhId());
+            detailVo.setAccountName(account.getName());
+            detailVo.setType(GhTypeEnum.THIRD_PARTY_GH.type);
+            detailVo.setChannel(loginUser.getChannel());
+            detailVo.setCategory1(account.getContentType());
             detailVo.setStrategyStatus(strategyStatus);
+            detailVo.setVideoIds(videoIds);
             detailVo.setAutoreplySendMinigramNum(videoIds.size());
-            detailVo.setCategory1(account.getContentType());
             ghDetailService.updateDetail(detailVo);
         } else {
-            ContentPlatformAccount loginUser = LoginUserContext.getUser();
             detailVo.setAccountId(account.getGhId());
             detailVo.setAccountName(account.getName());
             detailVo.setType(GhTypeEnum.THIRD_PARTY_GH.type);

+ 8 - 8
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.xml

@@ -8,7 +8,7 @@
         join content_platform_gzh_account cpgza on cpgd.account_id = cpgza.id
         where cpgza.create_account_id = #{createAccountId}
         <if test="param.accountId!= null and param.accountId!= ''">
-            and cpgza.account_id = #{param.accountId}
+            and cpgza.id = #{param.accountId}
         </if>
     </select>
 
@@ -19,7 +19,7 @@
         join content_platform_gzh_account cpgza on cpgd.account_id = cpgza.id
         where cpgza.create_account_id = #{createAccountId}
         <if test="param.accountId!= null and param.accountId!= ''">
-            and cpgza.account_id = #{param.accountId}
+            and cpgza.id = #{param.accountId}
         </if>
         order by cpgd.date_str desc
         limit #{offset}, #{pageSize}
@@ -31,7 +31,7 @@
         join content_platform_gzh_account cpgza on cpgvd.account_id = cpgza.id
         where cpgza.create_account_id = #{createAccountId}
         <if test="param.accountId!= null and param.accountId!= ''">
-            and cpgza.account_id = #{param.accountId}
+            and cpgza.id = #{param.accountId}
         </if>
     </select>
 
@@ -42,7 +42,7 @@
         join content_platform_gzh_account cpgza on cpgvd.account_id = cpgza.id
         where cpgza.create_account_id = #{createAccountId}
         <if test="param.accountId!= null and param.accountId!= ''">
-            and cpgza.account_id = #{param.accountId}
+            and cpgza.id = #{param.accountId}
         </if>
         order by cpgvd.date_str desc
         limit #{offset}, #{pageSize}
@@ -71,7 +71,7 @@
         join content_platform_gzh_account cpgza on cpgd.account_id = cpgza.id
         where cpgza.create_account_id = #{createAccountId}
         <if test="param.accountId!= null and param.accountId!= ''">
-            and cpgza.account_id = #{param.accountId}
+            and cpgza.id = #{param.accountId}
         </if>
     </select>
 
@@ -82,7 +82,7 @@
         join content_platform_gzh_account cpgza on cpfd.account_id = cpgza.id
         where cpgza.create_account_id = #{createAccountId}
         <if test="param.accountId!= null and param.accountId!= ''">
-            and cpgza.account_id = #{param.accountId}
+            and cpgza.id = #{param.accountId}
         </if>
         order by cpfd.date_str desc
         limit #{offset}, #{pageSize}
@@ -128,7 +128,7 @@
         join content_platform_gzh_account cpgza on cpgd.account_id = cpgza.id
         where cpgza.create_account_id = #{createAccountId}
         <if test="param.accountId!= null and param.accountId!= ''">
-            and cpgza.account_id = #{param.accountId}
+            and cpgza.id = #{param.accountId}
         </if>
     </select>
 
@@ -139,7 +139,7 @@
         join content_platform_gzh_account cpgza on cpfd.account_id = cpgza.id
         where cpgza.create_account_id = #{createAccountId}
         <if test="param.accountId!= null and param.accountId!= ''">
-            and cpgza.account_id = #{param.accountId}
+            and cpgza.id = #{param.accountId}
         </if>
         order by cpfd.date_str desc
         limit #{offset}, #{pageSize}