Browse Source

Merge remote-tracking branch 'origin/test'

songyh 3 years ago
parent
commit
dfd6cbe911

+ 4 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialInfoController.java

@@ -597,12 +597,16 @@ public class MaterialInfoController {
                 slogenInfoService.insertSlogans(Check.isNull(materialInfo.getProjectId()) ? materialInfoEntity.getProjectId() : materialInfo.getProjectId(), materialInfoEntity.getCode(), slogans, user.getId());
             }
         }
+
+        //如果状态为1 审核通过,则更新审核时间
+        materialInfo.setConfirmTime(DateUtils.getDate());
         boolean ok = materialInfoService.updateById(materialInfo);
         if (ok) {
             result.success("修改成功!");
         }
 
         Integer status = materialInfo.getStatus();
+
         // 如果状态为2 审核拒绝 给上传人发送消息
         if (status == 2) {
             Product product = productService.getById(materialInfoEntity.getProductId());

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/entity/MaterialInfo.java

@@ -197,4 +197,6 @@ public class MaterialInfo implements Serializable {
     private Integer slogansCount;
 
     private Integer offlineFlag;
+
+    private Date confirmTime;
 }

+ 3 - 2
module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/MaterialInfoMapper.xml

@@ -92,7 +92,8 @@
         matInfo.project_id,
         matInfo.id,
         t.slogansCount,
-        matInfo.offline_flag
+        matInfo.offline_flag,
+        matInfo.confirm_time
         from ctop_material_info matInfo
         left JOIN (
         SELECT
@@ -152,7 +153,7 @@
         <if test="offlineFlag!=null">
             and matInfo.offline_flag = #{offlineFlag}
         </if>
-        order by matInfo.create_time desc
+        order by matInfo.confirm_time desc
 
     </select>
     <select id="getListByDate" resultType="cn.com.ctop.common.module.entity.MaterialInfo">

+ 1 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -798,6 +798,7 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
                 MaterialInfo materialInfo = materialInfoMapper.selectById(info.getId());
                 materialInfo.setSlogansCount(info.getSlogansCount());
                 materialInfo.setOfflineFlag(info.getOfflineFlag());
+                materialInfo.setConfirmTime(info.getConfirmTime());
                 //素材名称为空 则使用素材id 同步失败
                 materialInfo.setMaterialName(Check.isNull(materialInfo.getMaterialName()) ? materialInfo.getId() : materialInfo.getMaterialName());
                 //判断是否已经同步到快手平台

+ 4 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceVideoReportCtrl.java

@@ -48,6 +48,7 @@ public class BytedanceVideoReportCtrl {
             String clip = requestBody.getString("clip");
             String shot = requestBody.getString("shot");
             String plan = requestBody.getString("plan");
+            String leader = requestBody.getString("leader");
             String target = requestBody.getString("target");
             String order = requestBody.getString("order");
             int pageSize = requestBody.getInteger("pageSize");
@@ -57,7 +58,7 @@ public class BytedanceVideoReportCtrl {
                 if (accountIds.isEmpty()) {
                     accountIds = null;
                 }
-                PageInfo<JSONObject> listData = bytedanceVideoReportService.getVideoReportBy(accountIds, startDate, endDate, filedAll, target, order, clip, shot, plan, pageSize, pageNo);
+                PageInfo<JSONObject> listData = bytedanceVideoReportService.getVideoReportBy(accountIds, startDate, endDate, filedAll, target, order, clip, shot, plan, leader, pageSize, pageNo);
                 result.setResult(listData);
                 result.setSuccess(true);
             } catch (Exception e) {
@@ -145,11 +146,12 @@ public class BytedanceVideoReportCtrl {
         String clip = requestBody.getString("clip");
         String shot = requestBody.getString("shot");
         String plan = requestBody.getString("plan");
+        String leader = requestBody.getString("leader");
         String target = requestBody.getString("target");
         String order = requestBody.getString("order");
         List<JSONObject> excelData = null;
         if ("exportTable".equals(exportType)) {
-            excelData = bytedanceVideoReportService.exportExcelReportBy(accountIds, startDate, endDate, filed, target, order, clip, shot, plan);
+            excelData = bytedanceVideoReportService.exportExcelReportBy(accountIds, startDate, endDate, filed, target, order, clip, shot, plan, leader);
         } else if ("exportDetail".equals(exportType)) {
             excelData = bytedanceVideoReportService.getVideoDetailBy(accountIds, startDate, endDate, filed, signature);
         }

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

@@ -8,7 +8,7 @@ import java.util.List;
 
 public interface BytedanceVideoReportMapper {
 
-    List<JSONObject> queryVideoReportBy(@Param("accountIds") JSONArray accountIds,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("filed") String filed,@Param("target") String target,@Param("order") String order,@Param("clip") String clip,@Param("shot") String shot,@Param("plan") String plan);
+    List<JSONObject> queryVideoReportBy(@Param("accountIds") JSONArray accountIds,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("filed") String filed,@Param("target") String target,@Param("order") String order,@Param("clip") String clip,@Param("shot") String shot,@Param("plan") String plan,@Param("leader") String leader);
 
     List<JSONObject> queryVideoDetailBy(@Param("accountIds") JSONArray accountIds,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("filed") String filed,@Param("signature") String signature);
 }

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

@@ -12,6 +12,7 @@
         t1.clip_name AS clip,
         t1.shot_name AS shot,
         t1.plan_name AS plan,
+        t1.team_leader as leader,
         t1.material_name AS materialName,
         t1.project_name AS projectName,
         t1.material_create_time AS createTime,
@@ -31,6 +32,7 @@
         AND (t1.clip_name LIKE '%${clip}%')
         AND (t1.shot_name LIKE '%${shot}%')
         AND (t1.plan_name LIKE '%${plan}%')
+        AND (t1.team_leader LIKE '%${leader}%')
         GROUP BY t1.md5
         ORDER BY ${target} ${order}
     </select>

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceVideoReportService.java

@@ -9,11 +9,11 @@ import java.util.List;
 
 public interface IBytedanceVideoReportService {
 
-    PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan, int pageSize, int pageNo);
+    PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan, String leader, int pageSize, int pageNo);
 
     List<JSONObject> getVideoDetailBy(JSONArray accountIds, String startDate, String endDate, String filed, String signature);
 
-    List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan);
+    List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan, String leader);
 
     void pullVideoReport(CtopOauthToken oauthToken,String startDate, String endDate,int page);
 }

+ 4 - 4
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceVideoReportServiceImpl.java

@@ -32,9 +32,9 @@ public class BytedanceVideoReportServiceImpl implements IBytedanceVideoReportSer
     IBaseReportBytedanceVideoDailyService baseReportBytedanceVideoDailyService;
 
     @Override
-    public PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan, int pageSize, int pageNo) {
+    public PageInfo<JSONObject> getVideoReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan,String leader, int pageSize, int pageNo) {
         PageHelper.startPage(pageNo,pageSize);
-        List<JSONObject> jsonObjectList=bytedanceVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order,clip,shot,plan);
+        List<JSONObject> jsonObjectList=bytedanceVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order,clip,shot,plan,leader);
         return new PageInfo<>(jsonObjectList);
     }
 
@@ -44,8 +44,8 @@ public class BytedanceVideoReportServiceImpl implements IBytedanceVideoReportSer
     }
 
     @Override
-    public List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan) {
-        return bytedanceVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order,clip,shot,plan);
+    public List<JSONObject> exportExcelReportBy(JSONArray accountIds, String startDate, String endDate, String filed, String target, String order, String clip, String shot, String plan, String leader) {
+        return bytedanceVideoReportMapper.queryVideoReportBy(accountIds,startDate,endDate,filed,target,order,clip,shot,plan,leader);
     }
 
     @Override