Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit 379ecfa

Browse files
committed
修复了一些bug
1 parent df7412d commit 379ecfa

File tree

9 files changed

+41
-22
lines changed

9 files changed

+41
-22
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
#### 项目名称 `efo``Easy File Online` 的缩写,字面意思就是让您轻松实现线上文件管理
1+
### 关于项目
22

3-
##### 且本系统具有文件分享的功能,权限控制和自定义配置都很强大(可能还不完善,望大神指教)
3+
- 项目名称 `efo``Easy File Online` 的缩写,字面意思就是让您轻松实现线上文件管理
44

5-
##### 系统后端框架有Spring Boot,Spring, SpringMVC,MyBatis; 前段框架有Bootstrap,Jquery, Layer, Vue。项目完全纯注解,零XML配置。
5+
- 本系统具有文件分享的功能,权限控制和自定义配置都很强大(可能还不完善)
66

7-
> 第一次运行系统,请先运行 [SQL代码](/mysql/efo.sql) , 并登陆系统修改系统用户(默认密码 `123456``system` 的密码
7+
- 系统后端框架有Spring Boot,Spring, SpringMVC,MyBatis; 前段框架有Bootstrap,Jquery, Layer, Vue。项目完全纯注解,零XML配置。
88

9-
###### 项目部分截图(背景图片可通过配置设置)
9+
> 第一次运行系统,请先运行 [SQL代码](/mysql/efo.sql) , 并登陆系统修改用户 `system` (默认密码 `123456`)的密码
10+
11+
### 系统部分截图(背景图片可通过配置设置)
1012

1113
- 登录页面(包含登录、注册、密码重置),路径 `/signin`
1214

@@ -28,10 +30,10 @@
2830

2931
![登录页面](http://oq4pzgtcb.bkt.clouddn.com/git/efo/filemanager.png)
3032

31-
> 此功能基于 `angular-filamanager` 实现,其中上传部分我搞的还不是很明白,用的很笨的方法实现了上传(但是最多只能上传11个文件,可修改代码,自行设置)
33+
> 此功能基于 `angular-filamanager` 实现,其中上传部分我弄的还不是很明白,用的很笨的方法实现了上传(但是最多只能上传11个文件,可修改代码,自行设置)
3234

3335
> 有知道怎么弄的大神,望告知啊。
3436

35-
> [angular-filamanager项目地址](https://github.com/joni2back/angular-filemanager)
37+
> [angular-filamanager](https://github.com/joni2back/angular-filemanager)
3638

37-
#### 大家有什么好的建议欢迎提出哦,觉得好用的话,给个star呗
39+
**最后,如果大家有什么好的建议欢迎提出哦,觉得可以的话,给个star呗**

src/main/java/com/zhazhapan/efo/dao/sqlprovider/AuthSqlProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public String batchDelete(@Param("ids") String ids) {
2222
}
2323

2424
public String getAuthBy(@Param("id") long id, @Param("userId") int userId, @Param("fileId") long fileId, @Param
25-
("fileName") String fileName) {
25+
("fileName") String fileName, @Param("offset") int offset) {
2626
String sql = new SQL() {{
2727
SELECT("a.id,a.user_id,a.file_id,u.username,f.name file_name,f.local_url,a.is_downloadable,a" + "" + "" +
2828
".is_uploadable,a.is_deletable,a.is_updatable,a.is_visible,a.create_time");
@@ -42,7 +42,7 @@ public String getAuthBy(@Param("id") long id, @Param("userId") int userId, @Para
4242
}
4343
ORDER_BY("a." + EfoApplication.settings.getStringUseEval(ConfigConsts.AUTH_ORDER_BY_OF_SETTINGS));
4444
}}.toString();
45-
return sql + " limit #{offset}," + EfoApplication.settings.getIntegerUseEval(ConfigConsts
46-
.AUTH_PAGE_SIZE_OF_SETTINGS);
45+
int size = EfoApplication.settings.getIntegerUseEval(ConfigConsts.AUTH_PAGE_SIZE_OF_SETTINGS);
46+
return sql + " limit " + (offset * size) + "," + size;
4747
}
4848
}

src/main/java/com/zhazhapan/efo/dao/sqlprovider/UserSqlProvider.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ public String updateAuthById() {
1717
return CommonSqlProvider.updateAuthById("user");
1818
}
1919

20-
public String getUserBy(@Param("permission") int permission, @Param("condition") String condition) {
20+
public String getUserBy(@Param("permission") int permission, @Param("condition") String condition, @Param
21+
("offset") int offset) {
2122
String sql = new SQL() {{
2223
SELECT("*");
2324
FROM("user");
@@ -34,7 +35,7 @@ public String getUserBy(@Param("permission") int permission, @Param("condition")
3435
}
3536
ORDER_BY(EfoApplication.settings.getStringUseEval(ConfigConsts.USER_ORDER_BY_OF_SETTINGS));
3637
}}.toString();
37-
return sql + " limit #{offset}," + EfoApplication.settings.getIntegerUseEval(ConfigConsts
38-
.USER_PAGE_SIZE_OF_SETTINGS);
38+
int size = EfoApplication.settings.getIntegerUseEval(ConfigConsts.USER_PAGE_SIZE_OF_SETTINGS);
39+
return sql + " limit " + (offset * size) + "," + size;
3940
}
4041
}

src/main/java/com/zhazhapan/efo/web/controller/CommonController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public CommonController(ICommonService commonService, HttpServletRequest request
4242
this.jsonObject = jsonObject;
4343
}
4444

45-
@AuthInterceptor
45+
@AuthInterceptor(InterceptorLevel.NONE)
4646
@RequestMapping(value = "/avatar/{name}", method = RequestMethod.GET)
4747
public void getAvatar(HttpServletResponse response, @PathVariable("name") String name) throws IOException {
4848
String path = SettingConfig.getAvatarStoragePath() + ValueConsts.SEPARATOR + name;

src/main/resources/assets/js/admin.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,29 @@ var app = new Vue({
1212
}
1313
});
1414

15+
var authFileSearch = "";
16+
17+
var authSearchOffset = 0;
18+
1519
var authModal = new Vue({
1620
el: "#authAddedModal", methods: {
1721
searchFileInAuth: function () {
1822
var file = $("#auth-file-search").val();
1923
if (isEmpty(file)) {
2024
alerts("内容不能为空");
2125
} else {
26+
if (file === authFileSearch) {
27+
authSearchOffset += 1;
28+
} else {
29+
authSearchOffset = 0;
30+
authFileSearch = file;
31+
}
2232
layer.load(1);
2333
$.get("/file/basic/all", {
2434
user: "",
2535
file: file,
2636
category: "",
27-
offset: 0
37+
offset: authSearchOffset
2838
}, function (data) {
2939
layer.closeAll();
3040
var json = JSON.parse(data);

src/main/resources/assets/js/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,7 @@ function setResources(resources, tabId) {
312312
"&emsp;标签:<b class='file-tag'>" + resource.tag + "</b>&emsp;下载次数:<b>" + resource.downloadTimes + "</b>" +
313313
"</p></div></div><br/></div></div><br/>";
314314
});
315-
/** @namespace globalConfig.paging */
316-
if (offset > 0 && globalConfig.paging.mode === "more") {
315+
if (offset > 0) {
317316
$(tabId).append(contentHtml);
318317
} else {
319318
$(tabId).html(contentHtml);

src/main/resources/assets/js/signin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ $(document).ready(
184184
});
185185
$(".sendVerifyCode").click(function () {
186186
var eventSrc = event.srcElement;
187+
console.info("test");
187188
sendVerifyCode($(eventSrc).parents(location.hash + "-div").find(".email").val(), eventSrc);
188189
});
189190
$(".email-verify-code").keyup(function () {

src/main/resources/static/admin.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
</table>
203203
</div>
204204
<br/>
205-
<button class="btn btn-lg btn-link btn-block" onclick="offset+=1;getDownloaded();"><b><i
205+
<button class="btn btn-lg btn-link btn-block" onclick="offset+=1;getFile();"><b><i
206206
class="glyphicon glyphicon-arrow-down"></i> 获取更多</b></button>
207207
<br/>
208208
</div>

src/main/resources/static/index.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,22 @@
8686
</div>
8787
<br/>
8888
<div id="resources-content"></div>
89-
<paging-more></paging-more>
89+
<button class="btn btn-link btn-block btn-lg" onclick="offset += 1;getPage();"><b><i
90+
class="glyphicon glyphicon-arrow-down"></i> 获取更多</b></button>
91+
<br/><br/>
9092
</div>
9193
<!--我的上传-->
9294
<div class="tab-pane" id="uploaded-tab">
9395
<div id="uploaded-content"></div>
94-
<paging-more></paging-more>
96+
<button class="btn btn-link btn-block btn-lg" onclick="offset += 1;getPage();"><b><i
97+
class="glyphicon glyphicon-arrow-down"></i> 获取更多</b></button>
98+
<br/><br/>
9599
</div>
96100
<div class="tab-pane" id="downloaded-tab">
97101
<div id="downloaded-content"></div>
98-
<paging-more></paging-more>
102+
<button class="btn btn-link btn-block btn-lg" onclick="offset += 1;getPage();"><b><i
103+
class="glyphicon glyphicon-arrow-down"></i> 获取更多</b></button>
104+
<br/><br/>
99105
</div>
100106
<!--我的资料-->
101107
<div class="tab-pane text-left" id="bio-tab">

0 commit comments

Comments
 (0)