فهرست منبع

修改回调日志信息

syh 5 سال پیش
والد
کامیت
32b921d645

+ 16 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wps/dto/UserAclBO.java

@@ -4,8 +4,22 @@ import lombok.Data;
 
 @Data
 public class UserAclBO {
+    /**
+     * 历史版本权限,1为打开该权限,0为关闭该权限,默认为1
+     */
+    private int history;
+    /**
+     * 重命名权限,1为打开该权限,0为关闭该权限,默认为0
+     */
+    private int rename;
 
-    private int rename = 0; //重命名权限,1为打开该权限,0为关闭该权限,默认为0
-    private int history = 0; //历史版本权限,1为打开该权限,0为关闭该权限,默认为1
+    /**
+     * 打印
+     */
+    private int print;
+
+    private int copy;
+
+    private int export;
 
 }

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wps/entity/WpsFileVersion.java

@@ -26,7 +26,7 @@ public class WpsFileVersion {
 	/**id*/
 	@TableId(type = IdType.AUTO)
     @ApiModelProperty(value = "id")
-	private Integer id;
+	private Long id;
 	/**fileId*/
 	@Excel(name = "fileId", width = 15)
     @ApiModelProperty(value = "fileId")

+ 6 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wps/entity/WpsUserAcl.java

@@ -48,6 +48,12 @@ public class WpsUserAcl {
     @ApiModelProperty(value = "history")
 	private Integer history;
 
+	private Integer cp;
+
+	private Integer expt;
+
+	private Integer prt;
+
 	public WpsUserAcl() {
 	}
 

+ 6 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wps/service/impl/WpsFileServiceImpl.java

@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.net.URLEncoder;
 import java.util.*;
 
 /**
@@ -42,6 +43,8 @@ public class WpsFileServiceImpl extends ServiceImpl<WpsFileMapper, WpsFile> impl
     private IWpsUserService wpsUserService;
     @Autowired
     private WpsUtil wpsUtil;
+
+    private static final String OSS_URL_PREFIX = "https://ctop-media.oss-cn-beijing.aliyuncs.com/script-lib/wps/";
     @Override
     public Token getViewUrl(String fileUrl, boolean checkToken){
         Token t = new Token();
@@ -146,14 +149,12 @@ public class WpsFileServiceImpl extends ServiceImpl<WpsFileMapper, WpsFile> impl
             BeanUtils.copyProperties(userAclEntity,userAcl);
             permission = userAclEntity.getPermission();
         }
-        log.info("permission:{}",permission);
         // 增加水印
         WpsFileWatermark watermarkEntity = wpsFileWatermarkService.findFirstByFileId(fileId);
         WatermarkBO watermark = new WatermarkBO();
         if (watermarkEntity != null){
             BeanUtils.copyProperties(watermarkEntity,watermark);
         }
-        log.info("mark:{}",watermark.toString());
         //获取user
         WpsUser wpsUser = wpsUserService.getById(userId);
         UserDTO user = new UserDTO();
@@ -165,13 +166,13 @@ public class WpsFileServiceImpl extends ServiceImpl<WpsFileMapper, WpsFile> impl
         // 构建fileInfo
         FileDTO file = new FileDTO();
         BeanUtils.copyProperties(fileEntity,file);
-        file.setDownload_url("https://ctop-media.oss-cn-beijing.aliyuncs.com/script-lib/wps/%E5%B7%A5%E4%BD%9C%E8%AE%A1%E5%88%92%E6%97%A5%E7%A8%8B%E8%A1%A820200618131143825.docx");
+        String url = fileEntity.getDownloadUrl();
+        url = URLEncoder.encode(url.replace(OSS_URL_PREFIX,""));
+        file.setDownload_url(OSS_URL_PREFIX+url);
         file.setUser_acl(userAcl);
         file.setWatermark(watermark);
         result.put("file",file);
         result.put("user",user);
-        log.info("file:{}",file.toString());
-        log.info("user:{}",user.toString());
         return result;
     }