Browse Source

修改视频素材信息listV2接口支持上线下线筛选

huangxuechao 4 years ago
parent
commit
dffaf1090d

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

@@ -289,6 +289,7 @@ public class MaterialInfoController {
     public Map<String, Object> queryPageList(String type, Integer status, Long productId, String materialName, String code,
                                              String startDate, String endDate, String tagCode,
                                              @RequestParam(name = "projectId", required = false) Long projectId,
+                                             @RequestParam(name = "offlineFlag", required = false) Integer offlineFlag,
                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
         LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -304,7 +305,7 @@ public class MaterialInfoController {
                 productIds = new ArrayList<>();
                 productIds.add(productId);
             }
-            return materialInfoService.getListByParams(projectId, tagCode, type, status, productIds, materialName, code, startDate, endDate, null, pageNo, pageSize);
+            return materialInfoService.getListByParams(projectId, tagCode, type, status, productIds, materialName, code, startDate, endDate, null, offlineFlag, pageNo, pageSize);
         } else if ("designTeamLeader".equals(roleCode) || "planeLeader".equals(roleCode) || "plane".equals(roleCode) || "plan".equals(roleCode) || "shot".equals(roleCode)) {
             //查询自己所在项目下的数据
             if (null == productId || productId == 0) {
@@ -314,14 +315,14 @@ public class MaterialInfoController {
                 productIds = new ArrayList<>();
                 productIds.add(productId);
             }
-            return materialInfoService.getListByParams(projectId, tagCode, type, status, productIds, materialName, code, startDate, endDate, null, pageNo, pageSize);
+            return materialInfoService.getListByParams(projectId, tagCode, type, status, productIds, materialName, code, startDate, endDate, null, offlineFlag, pageNo, pageSize);
         } else {
             //查询自己上传的视频
             if (null != productId && productId != 0) {
                 productIds = new ArrayList<>();
                 productIds.add(productId);
             }
-            return materialInfoService.getListByParams(projectId, tagCode, type, status, productIds, materialName, code, startDate, endDate, userId, pageNo, pageSize);
+            return materialInfoService.getListByParams(projectId, tagCode, type, status, productIds, materialName, code, startDate, endDate, userId, offlineFlag, pageNo, pageSize);
         }
     }
 

+ 1 - 1
module-common/src/main/java/cn/com/ctop/common/module/mapper/MaterialInfoMapper.java

@@ -36,7 +36,7 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> {
 
     List<MaterialInfo> getListByDate(@Param("startDate") String startDate,@Param("endDate") String endDate);
 
-    List<MaterialInfo> getListByParams(@Param("projectId")Long projectId, @Param("tagCode")String tagCode,@Param("type")String type, @Param("status")Integer status, @Param("productIds")List<Long> productIds, @Param("materialName")String materialName, @Param("code")String code, @Param("startDate")String startDate, @Param("endDate")String endDate, @Param("userId")String userId);
+    List<MaterialInfo> getListByParams(@Param("projectId")Long projectId, @Param("tagCode")String tagCode,@Param("type")String type, @Param("status")Integer status, @Param("productIds")List<Long> productIds, @Param("materialName")String materialName, @Param("code")String code, @Param("startDate")String startDate, @Param("endDate")String endDate, @Param("userId")String userId, @Param("offlineFlag") Integer offlineFlag);
 
     JSONArray getIdListByProject(Long projectId);
 }

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

@@ -127,6 +127,9 @@
         <if test="projectId!=null">
             and matInfo.project_id = #{projectId}
         </if>
+        <if test="offlineFlag!=null">
+            and matInfo.offline_flag = #{offlineFlag}
+        </if>
         order by matInfo.create_time desc
 
     </select>

+ 1 - 1
module-common/src/main/java/cn/com/ctop/common/module/service/IMaterialInfoService.java

@@ -78,7 +78,7 @@ public interface IMaterialInfoService extends IService<MaterialInfo> {
 
     List<MaterialInfo> getListByDate(String startDate, String endDate);
 
-    Map<String, Object> getListByParams(Long projectId, String tagCode, String type, Integer status, List<Long> projectIds, String materialName, String code, String startDate, String endDate, String userId, Integer pageNo, Integer pageSize);
+    Map<String, Object> getListByParams(Long projectId, String tagCode, String type, Integer status, List<Long> projectIds, String materialName, String code, String startDate, String endDate, String userId, Integer offlineFlag, Integer pageNo, Integer pageSize);
 
     JSONArray getIdListByProject(Long projectId);
 }

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

@@ -773,10 +773,10 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
     }
 
     @Override
-    public Map<String, Object> getListByParams(Long projectId, String tagCode, String type, Integer status, List<Long> productId, String materialName, String code, String startDate, String endDate, String userId, Integer pageNo, Integer pageSize) {
+    public Map<String, Object> getListByParams(Long projectId, String tagCode, String type, Integer status, List<Long> productId, String materialName, String code, String startDate, String endDate, String userId, Integer offlineFlag, Integer pageNo, Integer pageSize) {
         Map<String, Object> result = new HashMap<>();
         PageHelper.startPage(pageNo, pageSize);
-        List<MaterialInfo> dailyList = materialInfoMapper.getListByParams(projectId, tagCode, type, status, productId, materialName, code, startDate, endDate, userId);
+        List<MaterialInfo> dailyList = materialInfoMapper.getListByParams(projectId, tagCode, type, status, productId, materialName, code, startDate, endDate, userId ,offlineFlag);
         List<MaterialInfo> setList = new ArrayList<>();
         PageInfo<MaterialInfo> pageInfo = new PageInfo<>(dailyList);
         if (null != dailyList && !dailyList.isEmpty()) {