浏览代码

修改头条视频报表数据查询逻辑bug

songyh 3 年之前
父节点
当前提交
23b41530f5

+ 3 - 1
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MailLogServiceImpl.java

@@ -15,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+
 /**
  * 邮箱记录表
  *
@@ -24,7 +26,7 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class MailLogServiceImpl extends ServiceImpl<MailLogMapper, MailLog> implements IMailLogService {
-    @Autowired
+    @Resource
     private MailLogMapper mailLogMapper;
     @Autowired
     private CorpWexinUtils corpWexinUtils;

+ 12 - 4
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceVideoReportMapper.xml

@@ -29,10 +29,18 @@
                 #{item}
             </foreach>
         </if>
-        AND (t1.clip_name LIKE '%${clip}%')
-        AND (t1.shot_name LIKE '%${shot}%')
-        AND (t1.plan_name LIKE '%${plan}%')
-        AND (t1.team_leader LIKE '%${leader}%')
+        <if test="clip!= null and clip!='' ">
+            AND (t1.clip_name LIKE '%${clip}%')
+        </if>
+        <if test="shot!= null and shot!='' ">
+            AND (t1.shot_name LIKE '%${shot}%')
+        </if>
+        <if test="plan!= null and plan!='' ">
+            AND (t1.plan_name LIKE '%${plan}%')
+        </if>
+        <if test="leader!= null and leader!='' ">
+            AND t1.team_leader LIKE '%${leader}%'
+        </if>
         GROUP BY t1.md5
         ORDER BY ${target} ${order}
     </select>