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

Commit 4ce06dc

Browse files
committed
rename some "get" mehod to "list"
1 parent d6fb0b5 commit 4ce06dc

33 files changed

+134
-60
lines changed

efo.iml

+29-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,35 @@
2929
</content>
3030
<orderEntry type="inheritedJdk" />
3131
<orderEntry type="sourceFolder" forTests="false" />
32+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-all:1.4.0" level="project" />
33+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.4.0" level="project" />
34+
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
35+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.4.0" level="project" />
36+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.4.0" level="project" />
37+
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
38+
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
39+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-core:1.4.0" level="project" />
40+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-hash:1.4.0" level="project" />
41+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.4.0" level="project" />
42+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.4.0" level="project" />
43+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.4.0" level="project" />
44+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.4.0" level="project" />
45+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.4.0" level="project" />
46+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-aspectj:1.4.0" level="project" />
47+
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.8.13" level="project" />
48+
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
49+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-ehcache:1.4.0" level="project" />
50+
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache-core:2.6.11" level="project" />
51+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-guice:1.4.0" level="project" />
52+
<orderEntry type="library" name="Maven: com.google.inject:guice:3.0" level="project" />
53+
<orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
54+
<orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
55+
<orderEntry type="library" name="Maven: com.google.inject.extensions:guice-multibindings:3.0" level="project" />
56+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-hazelcast:1.4.0" level="project" />
57+
<orderEntry type="library" name="Maven: com.hazelcast:hazelcast:3.9" level="project" />
58+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-quartz:1.4.0" level="project" />
59+
<orderEntry type="library" name="Maven: org.opensymphony.quartz:quartz:1.6.1" level="project" />
60+
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.4.0" level="project" />
3261
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
3362
<orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
3463
<orderEntry type="library" name="Maven: com.zhazhapan:util:1.0.7" level="project" />
@@ -107,7 +136,6 @@
107136
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
108137
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
109138
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
110-
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
111139
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.8.0" level="project" />
112140
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.12.0" level="project" />
113141
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.7.9" level="project" />

pom.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.zhazhapan</groupId>
77
<artifactId>efo</artifactId>
8-
<version>1.1</version>
8+
<version>1.2</version>
99
<packaging>jar</packaging>
1010

1111
<name>efo</name>
@@ -25,11 +25,11 @@
2525
</properties>
2626

2727
<dependencies>
28-
<!--<dependency>-->
29-
<!--<groupId>org.apache.shiro</groupId>-->
30-
<!--<artifactId>shiro-all</artifactId>-->
31-
<!--<version>1.4.0</version>-->
32-
<!--</dependency>-->
28+
<dependency>
29+
<groupId>org.apache.shiro</groupId>
30+
<artifactId>shiro-all</artifactId>
31+
<version>1.4.0</version>
32+
</dependency>
3333
<dependency>
3434
<groupId>commons-fileupload</groupId>
3535
<artifactId>commons-fileupload</artifactId>

src/main/java/com/zhazhapan/efo/dao/AuthDAO.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,6 @@ boolean updateAuthById(@Param("id") long id, @Param("isDownloadable") int isDown
102102
* @return {@link List}
103103
*/
104104
@SelectProvider(type = AuthSqlProvider.class, method = "getAuthBy")
105-
List<AuthRecord> getAuthBy(@Param("id") long id, @Param("userId") int userId, @Param("fileId") long fileId,
106-
@Param("fileName") String fileName, @Param("offset") int offset);
105+
List<AuthRecord> listAuthBy(@Param("id") long id, @Param("userId") int userId, @Param("fileId") long fileId,
106+
@Param("fileName") String fileName, @Param("offset") int offset);
107107
}

src/main/java/com/zhazhapan/efo/dao/CategoryDAO.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public interface CategoryDAO {
7979
* @return {@link List}
8080
*/
8181
@Select("select * from category")
82-
List<Category> getAllCategory();
82+
List<Category> listCategory();
8383

8484
/**
8585
* 通过编号获取一个分类

src/main/java/com/zhazhapan/efo/dao/DownloadedDAO.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public interface DownloadedDAO {
3838
* @return 下载记录
3939
*/
4040
@SelectProvider(type = DownloadedSqlProvider.class, method = "getDownloadBy")
41-
List<DownloadRecord> getDownloadedBy(@Param("userId") int userId, @Param("fileId") long fileId, @Param
41+
List<DownloadRecord> listDownloadedBy(@Param("userId") int userId, @Param("fileId") long fileId, @Param
4242
("fileName") String fileName, @Param("categoryId") int categoryId, @Param("offset") int offset);
4343

4444
/**

src/main/java/com/zhazhapan/efo/dao/FileDAO.java

+23-4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public interface FileDAO {
2121
* 获取文件权限
2222
*
2323
* @param id 文件编号
24+
*
2425
* @return {@link BaseAuthRecord}
2526
*/
2627
@Select("select is_downloadable,is_uploadable,is_deletable,is_updatable,is_visible from file where id=#{id}")
@@ -30,6 +31,7 @@ public interface FileDAO {
3031
* 通过编号获取文件
3132
*
3233
* @param id 编号
34+
*
3335
* @return {@link File}
3436
*/
3537
@Select("select * from file where id=#{id}")
@@ -39,6 +41,7 @@ public interface FileDAO {
3941
* 通过ID获取本地路径
4042
*
4143
* @param fileId 文件编号
44+
*
4245
* @return {@link String}
4346
*/
4447
@Select("select local_url from file where id=#{id}")
@@ -48,6 +51,7 @@ public interface FileDAO {
4851
* 通过编号删除文件
4952
*
5053
* @param id 编号
54+
*
5155
* @return 是否删除成功
5256
*/
5357
@Delete("delete from file where id=#{id}")
@@ -57,6 +61,7 @@ public interface FileDAO {
5761
* 通过本地路径获取文件编号
5862
*
5963
* @param visitUrl 本地路径
64+
*
6065
* @return 编号
6166
*/
6267
@Select("select id from file where visit_url=#{visitUrl}")
@@ -66,6 +71,7 @@ public interface FileDAO {
6671
* 通过本地路径获取文件编号
6772
*
6873
* @param localUrl 本地路径
74+
*
6975
* @return 编号
7076
*/
7177
@Select("select id from file where local_url=#{localUrl}")
@@ -75,6 +81,7 @@ public interface FileDAO {
7581
* 通过访问路径获取本地文件路径
7682
*
7783
* @param visitUrl 访问路径
84+
*
7885
* @return {@link String}
7986
*/
8087
@Select("select local_url from file where visit_url=#{visitUrl}")
@@ -84,6 +91,7 @@ public interface FileDAO {
8491
* 通过访问路径删除
8592
*
8693
* @param visitUrl 访问路径
94+
*
8795
* @return 是否删除成功
8896
*/
8997
@Delete("delete from file where visit_url=#{visitUrl}")
@@ -93,6 +101,7 @@ public interface FileDAO {
93101
* 通过本地路径删除
94102
*
95103
* @param localUrl 本地路径
104+
*
96105
* @return 是否删除成功
97106
*/
98107
@Delete("delete from file where local_url=#{localUrl}")
@@ -102,6 +111,7 @@ public interface FileDAO {
102111
* 检查本地路径
103112
*
104113
* @param localUrl 本地路径
114+
*
105115
* @return {@link Integer}
106116
*/
107117
@Select("select count(*) from file where local_url=#{localUrl}")
@@ -111,6 +121,7 @@ public interface FileDAO {
111121
* 检查访问路径
112122
*
113123
* @param visitUrl 访问路径
124+
*
114125
* @return {@link Integer}
115126
*/
116127
@Select("select count(*) from file where visit_url=#{visitUrl}")
@@ -120,6 +131,7 @@ public interface FileDAO {
120131
* 添加一个文件
121132
*
122133
* @param file {@link File}
134+
*
123135
* @return 是否添加成功
124136
*/
125137
@Insert("insert into file(name,suffix,local_url,visit_url,size,description,tag,user_id,category_id," +
@@ -156,6 +168,7 @@ public interface FileDAO {
156168
* 更新文件基本信息
157169
*
158170
* @param file 文件
171+
*
159172
* @return 是否更新成功
160173
*/
161174
@Update("update file set name=#{name},suffix=#{suffix},local_url=#{localUrl},visit_url=#{visitUrl}," +
@@ -172,6 +185,7 @@ public interface FileDAO {
172185
* @param isVisible 可查权限
173186
* @param isDeletable 删除权限
174187
* @param isUpdatable 上传权限
188+
*
175189
* @return 是否更新成功
176190
*/
177191
@UpdateProvider(type = FileSqlProvider.class, method = "updateAuthById")
@@ -262,6 +276,7 @@ boolean updateAuthById(@Param("id") long id, @Param("isDownloadable") int isDown
262276
* 获取文件信息
263277
*
264278
* @param visitUrl 访问链接
279+
*
265280
* @return {@link File}
266281
*/
267282
@Select("select * from file where visit_url=#{visitUrl}")
@@ -275,10 +290,11 @@ boolean updateAuthById(@Param("id") long id, @Param("isDownloadable") int isDown
275290
* @param categoryId 分类编号
276291
* @param orderBy 排序方式
277292
* @param search 搜索
293+
*
278294
* @return {@link List}
279295
*/
280296
@SelectProvider(type = FileSqlProvider.class, method = "getAll")
281-
List<FileRecord> getAll(@Param("userId") int userId, @Param("offset") int offset, @Param("categoryId") int
297+
List<FileRecord> listAll(@Param("userId") int userId, @Param("offset") int offset, @Param("categoryId") int
282298
categoryId, @Param("orderBy") String orderBy, @Param("search") String search);
283299

284300
/**
@@ -287,10 +303,11 @@ List<FileRecord> getAll(@Param("userId") int userId, @Param("offset") int offset
287303
* @param userId 用户编号
288304
* @param offset 偏移
289305
* @param search 搜索
306+
*
290307
* @return {@link List}
291308
*/
292309
@SelectProvider(type = FileSqlProvider.class, method = "getUserUploaded")
293-
List<FileRecord> getUserUploaded(@Param("userId") int userId, @Param("offset") int offset, @Param("search")
310+
List<FileRecord> listUserUploaded(@Param("userId") int userId, @Param("offset") int offset, @Param("search")
294311
String search);
295312

296313
/**
@@ -299,10 +316,11 @@ List<FileRecord> getUserUploaded(@Param("userId") int userId, @Param("offset") i
299316
* @param userId 用户编号
300317
* @param offset 偏移
301318
* @param search 搜索
319+
*
302320
* @return {@link List}
303321
*/
304322
@SelectProvider(type = FileSqlProvider.class, method = "getUserDownloaded")
305-
List<FileRecord> getUserDownloaded(@Param("userId") int userId, @Param("offset") int offset, @Param("search")
323+
List<FileRecord> listUserDownloaded(@Param("userId") int userId, @Param("offset") int offset, @Param("search")
306324
String search);
307325

308326
/**
@@ -313,9 +331,10 @@ List<FileRecord> getUserDownloaded(@Param("userId") int userId, @Param("offset")
313331
* @param categoryId 分类编号,不用分类编号作为条件时设置值小于等于0即可
314332
* @param fileName 文件名,不使用文件名作为条件时设置值为空即可
315333
* @param offset 偏移
334+
*
316335
* @return 上传记录
317336
*/
318337
@SelectProvider(type = FileSqlProvider.class, method = "getBasicBy")
319-
List<FileBasicRecord> getBasicBy(@Param("userId") int userId, @Param("fileId") long fileId, @Param("fileName")
338+
List<FileBasicRecord> listBasicBy(@Param("userId") int userId, @Param("fileId") long fileId, @Param("fileName")
320339
String fileName, @Param("categoryId") int categoryId, @Param("offset") int offset);
321340
}

src/main/java/com/zhazhapan/efo/dao/UploadedDAO.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.zhazhapan.efo.dao;
22

33
import com.zhazhapan.efo.dao.sqlprovider.UploadedSqlProvider;
4-
import com.zhazhapan.efo.model.DownloadRecord;
54
import com.zhazhapan.efo.model.UploadedRecord;
65
import org.apache.ibatis.annotations.Param;
76
import org.apache.ibatis.annotations.SelectProvider;
@@ -28,6 +27,6 @@ public interface UploadedDAO {
2827
* @return 上传记录
2928
*/
3029
@SelectProvider(type = UploadedSqlProvider.class, method = "getDownloadBy")
31-
List<UploadedRecord> getUploadedBy(@Param("userId") int userId, @Param("fileId") long fileId, @Param("fileName")
30+
List<UploadedRecord> listUploadedBy(@Param("userId") int userId, @Param("fileId") long fileId, @Param("fileName")
3231
String fileName, @Param("categoryId") int categoryId, @Param("offset") int offset);
3332
}

src/main/java/com/zhazhapan/efo/dao/UserDAO.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ boolean updateBasicInfo(@Param("id") int id, @Param("avatar") String avatar, @Pa
6969
* @return {@link List}
7070
*/
7171
@SelectProvider(type = UserSqlProvider.class, method = "getUserBy")
72-
List<User> getUserBy(@Param("permission") int permission, @Param("condition") String condition, @Param("offset")
72+
List<User> listUserBy(@Param("permission") int permission, @Param("condition") String condition, @Param("offset")
7373
int offset);
7474

7575
/**

src/main/java/com/zhazhapan/efo/modules/constant/ConfigConsts.java

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
*/
77
public class ConfigConsts {
88

9+
/**
10+
* 认证方式
11+
*/
12+
public static final String AUTHENTICATION_OF_SETTING = "system.authentication";
13+
914
/**
1015
* 最大标签长度
1116
*/

src/main/java/com/zhazhapan/efo/service/IAuthService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public interface IAuthService {
5050
*
5151
* @return {@link List}
5252
*/
53-
List<AuthRecord> getAuth(String usernameOrEmail, String fileName, int offset);
53+
List<AuthRecord> listAuth(String usernameOrEmail, String fileName, int offset);
5454

5555
/**
5656
* 获取一个权限

src/main/java/com/zhazhapan/efo/service/ICategoryService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public interface ICategoryService {
5252
*
5353
* @return {@link List}
5454
*/
55-
List<Category> getAll();
55+
List<Category> list();
5656

5757
/**
5858
* 通过分类名获取ID

src/main/java/com/zhazhapan/efo/service/IDownloadedService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ public interface IDownloadedService {
3535
*
3636
* @return {@link DownloadRecord}
3737
*/
38-
List<DownloadRecord> getAll(String user, String file, String category, int offset);
38+
List<DownloadRecord> list(String user, String file, String category, int offset);
3939
}

0 commit comments

Comments
 (0)