yangzian 3 years ago
parent
commit
758d381896

+ 7 - 7
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/xml/ByteDanceVideoInfoMapper.xml

@@ -70,7 +70,7 @@
             resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
         select distinct video.*,
         (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.account_id = video.account_id and l.state_date = #{now}) as creativeNum,
-        (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = '${accountId}') as creativeCnt,
+        (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = #{accountId}) as creativeCnt,
         (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature) as slogens,
          'video' As materialType
         from ctop_bytedance_video_info video
@@ -94,18 +94,18 @@
         select distinct video.*,
         a.totalCost,
         (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.account_id = video.account_id and l.state_date = #{now}) as creativeNum,
-        (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = '${accountId}') as creativeCnt,
+        (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = #{accountId}) as creativeCnt,
         (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature ) as slogens,
          'video' As materialType
         from (select report.material_id, sum(cost) as totalCost
         from ctop_bytedance_report_material_daily report
         left join ctop_user_allocation cua on report.account_id = cua.account_id
-        where cua.account_id = #{accountId}
+        where cua.account_id = '${accountId}'
         and report.stat_datetime >= #{startTime}
         and report.stat_datetime <= #{endTime}
         group by report.material_id
         order by sum(report.cost) desc ) a
-        left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId} and a.type = #{imageMode} and a.status = 1)as video
+        left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = '${accountId}' and a.type = #{imageMode} and a.status = 1)as video
         on a.material_id = video.material_id
         left join ctop_material_info cmi on cmi.code = video.signature
         <if test="projectId !=null and projectId != ''">
@@ -126,18 +126,18 @@
         select distinct video.*,
                a.totalCost,
                (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.account_id = video.account_id and l.state_date = #{now}) as creativeNum,
-               (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = '${accountId}') as creativeCnt,
+               (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = #{accountId}) as creativeCnt,
                (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature) as slogens,
                'video' As materialType
         from (select report.material_id, sum(cost) as totalCost
               from ctop_bytedance_report_material_daily report
                        left join ctop_user_allocation cua on report.account_id = cua.account_id
-              where cua.account_id = #{accountId}
+              where cua.account_id = '${accountId}'
                 and report.stat_datetime &gt;= #{startTime}
                 and report.stat_datetime &lt;= #{endTime}
               group by report.material_id
               order by sum(report.cost) desc ) a
-                 left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId} and a.type = #{imageMode} and a.status = 1)as video
+                 left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = '${accountId}' and a.type = #{imageMode} and a.status = 1)as video
                            on a.material_id = video.material_id
                  left join ctop_material_info cmi on cmi.code = video.signature
         <if test="projectId !=null and projectId != ''">

+ 2 - 2
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java

@@ -80,7 +80,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
     IAiBytedanceAutocreateLogService iBytedanceAutocreateLogService;
 
     @Override
-    public synchronized Long createCreative(CtopOauthToken token, AiBytedanceAdvertiserStrategy strategy, Integer createType, Long videoCnt, String openUrl) throws ParseException {
+    public Long createCreative(CtopOauthToken token, AiBytedanceAdvertiserStrategy strategy, Integer createType, Long videoCnt, String openUrl) throws ParseException {
         UserAllocation userAllocation = userAllocationService.getByAccountId(strategy.getAccountId());
         if(null == userAllocation||userAllocation.getAccountStatus()!=0){
             log.info("此账户不存在或者已经被关闭=>accountId:{}", token.getAccountId());
@@ -1026,7 +1026,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
 
         if(adName.contains("{{素材名称}}")){
             if ("video".equals(videoInfo.getMaterialType())){
-                MaterialInfo info = materialInfoService.getParams(videoInfo.getSignature(),null,projectId);
+                MaterialInfo info = materialInfoService.getParams(videoInfo.getSignature(),null,null);
                 if(null!=info&&null!=info.getMaterialName()){
                     adName = adName.replace("{{素材名称}}","["+info.getMaterialName()+"]");
                 }