Pārlūkot izejas kodu

fix: 文件管理批量分类问题处理

chenjianhua 1 mēnesi atpakaļ
vecāks
revīzija
01f0517a34

+ 1 - 1
service-base/src/main/java/com/simuwang/base/mapper/daq/FileManageMapper.java

@@ -25,7 +25,7 @@ public interface FileManageMapper {
 
     long countFileManage(FileManagePageQuery fileManagePageQuery);
 
-    void changeFileSourceType(@Param("idList") List<Integer> fileIdList, @Param("fileType")Integer fileType,@Param("sourceType")Integer sourceType, @Param("userId")Integer userId);
+    void changeFileSourceType(@Param("idList") List<Long> fileIdList, @Param("fileType")Integer fileType,@Param("sourceType")Integer sourceType, @Param("userId")Integer userId);
 
     void batchUpdateFileManageInfo(@Param("idList")List<Integer> fileIdList,@Param("fundId") String fundId, @Param("fundName")String fundName,  @Param("registerNumber")String registerNumber,@Param("sourceType")Integer sourceType,  @Param("userId")Integer userId);
 

+ 22 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/FileManageDO.java

@@ -1,5 +1,9 @@
 package com.simuwang.base.pojo.dos;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
 import com.simuwang.base.common.util.DateUtils;
 import com.simuwang.base.pojo.vo.FileManageVO;
 import lombok.Data;
@@ -13,74 +17,92 @@ import java.util.Date;
  * Description: ${DESCRIPTION}
  */
 @Data
+@TableName("file_manage")
 public class FileManageDO {
     /**
      * ID
      */
+    @TableId(value = "id",type = IdType.AUTO)
     private Integer id;
     /**
      * 文件ID
      */
+    @TableField(value = "file_id")
     private Long fileId;
     /**
      *  文件名称
      */
+    @TableField(value = "file_name")
     private String fileName;
     /**
      *  文件路径
      */
+    @TableField(value = "file_path")
     private String filePath;
     /**
      *  基金ID
      */
+    @TableField(value = "fund_id")
     private String fundId;
     /**
      *  基金名称
      */
+    @TableField(value = "fund_name")
     private String fundName;
     /**
      *  备案编码
      */
+    @TableField(value = "register_number")
     private String registerNumber;
     /**
      * 公司ID
      */
+    @TableField(exist = false)
     private String companyId;
     /**
      * 公司名称
      */
+    @TableField(exist = false)
     private String companyName;
     /**
      *  文件日期
      */
+    @TableField(value = "file_date")
     private Date fileDate;
     /**
      *  文件类别,1-净值规模,2-估值表,3-月度报告,4-季度报告,5-年度报告,6-基金合同,7分红公告,8-变更过公告
      */
+    @TableField(value = "file_type")
     private Integer fileType;
     /**
      * 分类来源,0-系统分类,1-人工分类
      */
+    @TableField(value = "source_type")
     private Integer sourceType;
     /**
      * 创建时间
      */
+    @TableField(value = "createtime")
     private Date createTime;
     /**
      *  修改时间
      */
+    @TableField(value = "updatetime")
     private Date updateTime;
     /**
      *  创建人ID
      */
+    @TableField(value = "creatorid")
     private Integer creatorId;
     /**
      *  修改人ID
      */
+    @TableField(value = "updaterid")
     private Integer updaterId;
     /**
      *  有效标识,1-有效,0-无效
      */
+    @TableField(value = "isvalid")
     private Integer isvalid;
 
     public FileManageVO toVO() {

+ 6 - 6
service-base/src/main/java/com/simuwang/base/pojo/vo/SourceTypeVO.java

@@ -10,17 +10,17 @@ import java.util.List;
  */
 public class SourceTypeVO {
 
-    private List<Integer> fileIdList;
+    private List<Long> fileIdList;
 
     private Integer fileType;
 
-    private Integer fundId;
+    private String fundId;
 
-    public List<Integer> getFileIdList() {
+    public List<Long> getFileIdList() {
         return fileIdList;
     }
 
-    public void setFileIdList(List<Integer> fileIdList) {
+    public void setFileIdList(List<Long> fileIdList) {
         this.fileIdList = fileIdList;
     }
 
@@ -32,11 +32,11 @@ public class SourceTypeVO {
         this.fileType = fileType;
     }
 
-    public Integer getFundId() {
+    public String getFundId() {
         return fundId;
     }
 
-    public void setFundId(Integer fundId) {
+    public void setFundId(String fundId) {
         this.fundId = fundId;
     }
 }

+ 1 - 1
service-base/src/main/resources/mapper/daq/ContactInformationMapper.xml

@@ -69,7 +69,7 @@
   </select>
   <select id="selectByKey" resultMap="BaseResultMap">
     select * from CONTACT_INFORMATION where isvalid=1
-    and company_id =#{companyId} and (contact_email=#{contactEmail} or contact_phone=#{contactPhone} or contact_wechat=#{contactWechat})
+    and company_id =#{companyId} and contact_email=#{contactEmail} limit 1
   </select>
 
 </mapper>

+ 1 - 1
service-manage/src/main/java/com/simuwang/manage/service/impl/CompanyContactServiceImpl.java

@@ -184,7 +184,7 @@ public class CompanyContactServiceImpl implements CompanyContactService {
             CompanyContactExcelData excelData = list.get(dataIdx);
             try{
                 if((StringUtil.isEmpty(excelData.getContactName()) || StringUtil.isEmpty(excelData.getContactDate()) || StringUtil.isEmpty(excelData.getCompanyId()))
-                        || StringUtil.isEmpty(excelData.getContactEmail()) || (StringUtil.isEmpty(excelData.getContactPhone()) && StringUtil.isEmpty(excelData.getContactWechat()))
+                        || StringUtil.isEmpty(excelData.getContactStatus())  || StringUtil.isEmpty(excelData.getContactEmail()) || (StringUtil.isEmpty(excelData.getContactPhone()) && StringUtil.isEmpty(excelData.getContactWechat()))
                 ){
                     CompanyContactExcelFailDataVO failDataVO = toExcelFailDataVO(excelData, ExcelConst.REQUIRE_FIELD,dataIdx+startRow);
                     excelFailDataVOList.add(failDataVO);

+ 1 - 1
service-manage/src/main/java/com/simuwang/manage/service/impl/FileMangeServiceImpl.java

@@ -102,7 +102,7 @@ public class FileMangeServiceImpl implements FileMangeService {
 
     @Override
     public void changeFileSourceType(SourceTypeVO sourceTypeVO) {
-        List<Integer> fileIdList = sourceTypeVO.getFileIdList();
+        List<Long> fileIdList = sourceTypeVO.getFileIdList();
         Integer fileType = sourceTypeVO.getFileType();
         Integer userId = UserUtils.getLoginUser().getUserId();
         fileManageMapper.changeFileSourceType(fileIdList,fileType,FileSourceType.CUSTOM_SOURCE,userId);