瀏覽代碼

转义问题,是否可以下载pdf,返回200

shiqian 4 年之前
父節點
當前提交
d668261502

+ 1 - 1
boman-web-core/src/main/java/com/boman/web/core/controller/MessageController.java

@@ -39,7 +39,7 @@ public class MessageController {
     @GetMapping("canDownload/{id}")
     public AjaxResult canDownload(@PathVariable("id") Long id) {
         boolean withdraw = service.canDownload(id);
-        return withdraw ? AjaxResult.success("可以下载") : AjaxResult.error("无法下载");
+        return withdraw ? AjaxResult.success("可以下载") : AjaxResult.success("无法下载");
     }
 
     /**

+ 2 - 2
boman-web-core/src/main/java/com/boman/web/core/utils/AuthUtils.java

@@ -18,13 +18,13 @@ import com.boman.domain.SysUser;
 import com.boman.system.api.model.LoginUser;
 import com.boman.domain.dto.FormDataDto;
 import com.boman.web.core.service.common.ICommonService;
+import com.google.common.base.Joiner;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.util.List;
 
 import static com.boman.common.core.utils.obj.ObjectUtils.*;
-import static com.boman.web.core.utils.ColumnUtils.joinList;
 import static com.boman.web.core.utils.ColumnUtils.joinList1;
 
 /**
@@ -199,7 +199,7 @@ public class AuthUtils {
     public static void checkRoleDataAuth(String tableName, String pkName, Long id) {
         List<Long> roleIdList = getLoginUserRoleIdList();
         RemoteRoleDataService remoteRoleDataService = SpringUtils.getBean(RemoteRoleDataService.class);
-        List<SysRoleData> roleDataList = remoteRoleDataService.listByRoleIdListTableName(joinList(roleIdList), tableName);
+        List<SysRoleData> roleDataList = remoteRoleDataService.listByRoleIdListTableName(Joiner.on(",").join(roleIdList), tableName);
         if (isEmpty(roleDataList)) {
             //没有配,证明有此表的全部权限
             return;