浏览代码

修改素材可重复上传bug

yumeng 4 年之前
父节点
当前提交
6162942833

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

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

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

@@ -170,10 +170,10 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
 
 
 
 
     @Override
     @Override
-    public MaterialInfo getMaterialInfoByCodeAndProductId(String code, Long productId) {
+    public MaterialInfo getMaterialInfoByCodeAndProductId(String code, Long projectId) {
         QueryWrapper<MaterialInfo> queryWrapper = new QueryWrapper<>();
         QueryWrapper<MaterialInfo> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("code", code);
         queryWrapper.eq("code", code);
-        queryWrapper.eq("product_id", productId);
+        queryWrapper.eq("project_id", projectId);
         queryWrapper.orderByDesc("id").last("limit 1");
         queryWrapper.orderByDesc("id").last("limit 1");
         return this.getOne(queryWrapper);
         return this.getOne(queryWrapper);
     }
     }
@@ -188,9 +188,9 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
     }
     }
 
 
     @Override
     @Override
-    public Map<String, Object> checkMaterialInfo(String code, Long productId) {
+    public Map<String, Object> checkMaterialInfo(String code, Long projectId) {
         Map<String, Object> result = new HashMap<>();
         Map<String, Object> result = new HashMap<>();
-        MaterialInfo info = this.getMaterialInfoByCodeAndProductId(code, productId);
+        MaterialInfo info = this.getMaterialInfoByCodeAndProductId(code, projectId);
         if (null != info) {
         if (null != info) {
             //文件已存在
             //文件已存在
             ResultMapUtils.setResultMap(result, StatusCode.FILE_HAS_UPLOAD.getCode());
             ResultMapUtils.setResultMap(result, StatusCode.FILE_HAS_UPLOAD.getCode());