mirror of https://github.com/elunez/eladmin
[代码完善](v2.5): v2.5 beta 更新部分依赖,优化druid配置,其他杂项优化
Closes #339 2.5 Beta 详情:https://www.ydyno.com/archives/1225.htmlpull/361/head^2
parent
3f7c8332da
commit
d1777411bf
|
@ -39,13 +39,13 @@ public class GenConfigController {
|
||||||
|
|
||||||
@ApiOperation("查询")
|
@ApiOperation("查询")
|
||||||
@GetMapping(value = "/{tableName}")
|
@GetMapping(value = "/{tableName}")
|
||||||
public ResponseEntity<Object> get(@PathVariable String tableName){
|
public ResponseEntity<Object> query(@PathVariable String tableName){
|
||||||
return new ResponseEntity<>(genConfigService.find(tableName), HttpStatus.OK);
|
return new ResponseEntity<>(genConfigService.find(tableName), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("修改")
|
@ApiOperation("修改")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public ResponseEntity<Object> emailConfig(@Validated @RequestBody GenConfig genConfig){
|
public ResponseEntity<Object> update(@Validated @RequestBody GenConfig genConfig){
|
||||||
return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig),HttpStatus.OK);
|
return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,13 +49,13 @@ public class GeneratorController {
|
||||||
|
|
||||||
@ApiOperation("查询数据库数据")
|
@ApiOperation("查询数据库数据")
|
||||||
@GetMapping(value = "/tables/all")
|
@GetMapping(value = "/tables/all")
|
||||||
public ResponseEntity<Object> getTables(){
|
public ResponseEntity<Object> queryTables(){
|
||||||
return new ResponseEntity<>(generatorService.getTables(), HttpStatus.OK);
|
return new ResponseEntity<>(generatorService.getTables(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询数据库数据")
|
@ApiOperation("查询数据库数据")
|
||||||
@GetMapping(value = "/tables")
|
@GetMapping(value = "/tables")
|
||||||
public ResponseEntity<Object> getTables(@RequestParam(defaultValue = "") String name,
|
public ResponseEntity<Object> queryTables(@RequestParam(defaultValue = "") String name,
|
||||||
@RequestParam(defaultValue = "0")Integer page,
|
@RequestParam(defaultValue = "0")Integer page,
|
||||||
@RequestParam(defaultValue = "10")Integer size){
|
@RequestParam(defaultValue = "10")Integer size){
|
||||||
int[] startEnd = PageUtil.transToStartEnd(page+1, size);
|
int[] startEnd = PageUtil.transToStartEnd(page+1, size);
|
||||||
|
@ -64,7 +64,7 @@ public class GeneratorController {
|
||||||
|
|
||||||
@ApiOperation("查询字段数据")
|
@ApiOperation("查询字段数据")
|
||||||
@GetMapping(value = "/columns")
|
@GetMapping(value = "/columns")
|
||||||
public ResponseEntity<Object> getTables(@RequestParam String tableName){
|
public ResponseEntity<Object> queryColumns(@RequestParam String tableName){
|
||||||
List<ColumnInfo> columnInfos = generatorService.getColumns(tableName);
|
List<ColumnInfo> columnInfos = generatorService.getColumns(tableName);
|
||||||
return new ResponseEntity<>(PageUtil.toPage(columnInfos,columnInfos.size()), HttpStatus.OK);
|
return new ResponseEntity<>(PageUtil.toPage(columnInfos,columnInfos.size()), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import java.util.*;
|
||||||
* @date 2019-01-02
|
* @date 2019-01-02
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@SuppressWarnings("all")
|
|
||||||
public class GenUtil {
|
public class GenUtil {
|
||||||
|
|
||||||
private static final String TIMESTAMP = "Timestamp";
|
private static final String TIMESTAMP = "Timestamp";
|
||||||
|
@ -242,9 +241,9 @@ public class GenUtil {
|
||||||
// 主键类型
|
// 主键类型
|
||||||
String colType = ColUtil.cloToJava(column.getColumnType());
|
String colType = ColUtil.cloToJava(column.getColumnType());
|
||||||
// 小写开头的字段名
|
// 小写开头的字段名
|
||||||
String changeColumnName = StringUtils.toCamelCase(column.getColumnName().toString());
|
String changeColumnName = StringUtils.toCamelCase(column.getColumnName());
|
||||||
// 大写开头的字段名
|
// 大写开头的字段名
|
||||||
String capitalColumnName = StringUtils.toCapitalizeCamelCase(column.getColumnName().toString());
|
String capitalColumnName = StringUtils.toCapitalizeCamelCase(column.getColumnName());
|
||||||
if(PK.equals(column.getKeyType())){
|
if(PK.equals(column.getKeyType())){
|
||||||
// 存储主键类型
|
// 存储主键类型
|
||||||
genMap.put("pkColumnType",colType);
|
genMap.put("pkColumnType",colType);
|
||||||
|
|
|
@ -55,21 +55,21 @@ public class LogController {
|
||||||
@ApiOperation("导出错误数据")
|
@ApiOperation("导出错误数据")
|
||||||
@GetMapping(value = "/error/download")
|
@GetMapping(value = "/error/download")
|
||||||
@PreAuthorize("@el.check()")
|
@PreAuthorize("@el.check()")
|
||||||
public void errorDownload(HttpServletResponse response, LogQueryCriteria criteria) throws IOException {
|
public void downloadErrorLog(HttpServletResponse response, LogQueryCriteria criteria) throws IOException {
|
||||||
criteria.setLogType("ERROR");
|
criteria.setLogType("ERROR");
|
||||||
logService.download(logService.queryAll(criteria), response);
|
logService.download(logService.queryAll(criteria), response);
|
||||||
}
|
}
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@ApiOperation("日志查询")
|
@ApiOperation("日志查询")
|
||||||
@PreAuthorize("@el.check()")
|
@PreAuthorize("@el.check()")
|
||||||
public ResponseEntity<Object> getLogs(LogQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(LogQueryCriteria criteria, Pageable pageable){
|
||||||
criteria.setLogType("INFO");
|
criteria.setLogType("INFO");
|
||||||
return new ResponseEntity<>(logService.queryAll(criteria,pageable), HttpStatus.OK);
|
return new ResponseEntity<>(logService.queryAll(criteria,pageable), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/user")
|
@GetMapping(value = "/user")
|
||||||
@ApiOperation("用户日志查询")
|
@ApiOperation("用户日志查询")
|
||||||
public ResponseEntity<Object> getUserLogs(LogQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> queryUserLog(LogQueryCriteria criteria, Pageable pageable){
|
||||||
criteria.setLogType("INFO");
|
criteria.setLogType("INFO");
|
||||||
criteria.setBlurry(SecurityUtils.getCurrentUsername());
|
criteria.setBlurry(SecurityUtils.getCurrentUsername());
|
||||||
return new ResponseEntity<>(logService.queryAllByUser(criteria,pageable), HttpStatus.OK);
|
return new ResponseEntity<>(logService.queryAllByUser(criteria,pageable), HttpStatus.OK);
|
||||||
|
@ -78,7 +78,7 @@ public class LogController {
|
||||||
@GetMapping(value = "/error")
|
@GetMapping(value = "/error")
|
||||||
@ApiOperation("错误日志查询")
|
@ApiOperation("错误日志查询")
|
||||||
@PreAuthorize("@el.check()")
|
@PreAuthorize("@el.check()")
|
||||||
public ResponseEntity<Object> getErrorLogs(LogQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> queryErrorLog(LogQueryCriteria criteria, Pageable pageable){
|
||||||
criteria.setLogType("ERROR");
|
criteria.setLogType("ERROR");
|
||||||
return new ResponseEntity<>(logService.queryAll(criteria,pageable), HttpStatus.OK);
|
return new ResponseEntity<>(logService.queryAll(criteria,pageable), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@ -86,14 +86,14 @@ public class LogController {
|
||||||
@GetMapping(value = "/error/{id}")
|
@GetMapping(value = "/error/{id}")
|
||||||
@ApiOperation("日志异常详情查询")
|
@ApiOperation("日志异常详情查询")
|
||||||
@PreAuthorize("@el.check()")
|
@PreAuthorize("@el.check()")
|
||||||
public ResponseEntity<Object> getErrorLogs(@PathVariable Long id){
|
public ResponseEntity<Object> queryErrorLogs(@PathVariable Long id){
|
||||||
return new ResponseEntity<>(logService.findByErrDetail(id), HttpStatus.OK);
|
return new ResponseEntity<>(logService.findByErrDetail(id), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@DeleteMapping(value = "/del/error")
|
@DeleteMapping(value = "/del/error")
|
||||||
@Log("删除所有ERROR日志")
|
@Log("删除所有ERROR日志")
|
||||||
@ApiOperation("删除所有ERROR日志")
|
@ApiOperation("删除所有ERROR日志")
|
||||||
@PreAuthorize("@el.check()")
|
@PreAuthorize("@el.check()")
|
||||||
public ResponseEntity<Object> delAllByError(){
|
public ResponseEntity<Object> delAllErrorLog(){
|
||||||
logService.delAllByError();
|
logService.delAllByError();
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ public class LogController {
|
||||||
@Log("删除所有INFO日志")
|
@Log("删除所有INFO日志")
|
||||||
@ApiOperation("删除所有INFO日志")
|
@ApiOperation("删除所有INFO日志")
|
||||||
@PreAuthorize("@el.check()")
|
@PreAuthorize("@el.check()")
|
||||||
public ResponseEntity<Object> delAllByInfo(){
|
public ResponseEntity<Object> delAllInfoLog(){
|
||||||
logService.delAllByInfo();
|
logService.delAllByInfo();
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,12 +39,13 @@
|
||||||
<version>2.4</version>
|
<version>2.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Spring boot websocket -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--jwt-->
|
<!-- jwt -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.jsonwebtoken</groupId>
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
<artifactId>jjwt-api</artifactId>
|
<artifactId>jjwt-api</artifactId>
|
||||||
|
@ -67,18 +68,19 @@
|
||||||
<artifactId>quartz</artifactId>
|
<artifactId>quartz</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- linux的管理 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.ethz.ganymed</groupId>
|
<groupId>ch.ethz.ganymed</groupId>
|
||||||
<artifactId>ganymed-ssh2</artifactId>
|
<artifactId>ganymed-ssh2</artifactId>
|
||||||
<version>build210</version>
|
<version>build210</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.jcraft</groupId>
|
<groupId>com.jcraft</groupId>
|
||||||
<artifactId>jsch</artifactId>
|
<artifactId>jsch</artifactId>
|
||||||
<version>0.1.55</version>
|
<version>0.1.55</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 获取系统信息 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.oshi</groupId>
|
<groupId>com.github.oshi</groupId>
|
||||||
<artifactId>oshi-core</artifactId>
|
<artifactId>oshi-core</artifactId>
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class AppController {
|
||||||
@ApiOperation(value = "查询应用")
|
@ApiOperation(value = "查询应用")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('app:list')")
|
@PreAuthorize("@el.check('app:list')")
|
||||||
public ResponseEntity<Object> getApps(AppQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(AppQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(appService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(appService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class DatabaseController {
|
||||||
@ApiOperation(value = "查询数据库")
|
@ApiOperation(value = "查询数据库")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('database:list')")
|
@PreAuthorize("@el.check('database:list')")
|
||||||
public ResponseEntity<Object> getDatabases(DatabaseQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(DatabaseQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(databaseService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(databaseService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class DeployController {
|
||||||
@ApiOperation(value = "查询部署")
|
@ApiOperation(value = "查询部署")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('deploy:list')")
|
@PreAuthorize("@el.check('deploy:list')")
|
||||||
public ResponseEntity<Object> getDeploys(DeployQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(DeployQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(deployService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(deployService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class DeployHistoryController {
|
||||||
@ApiOperation(value = "查询部署历史")
|
@ApiOperation(value = "查询部署历史")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('deployHistory:list')")
|
@PreAuthorize("@el.check('deployHistory:list')")
|
||||||
public ResponseEntity<Object> getDeployHistorys(DeployHistoryQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(DeployHistoryQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(deployhistoryService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(deployhistoryService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class ServerDeployController {
|
||||||
@ApiOperation(value = "查询服务器")
|
@ApiOperation(value = "查询服务器")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('serverDeploy:list')")
|
@PreAuthorize("@el.check('serverDeploy:list')")
|
||||||
public ResponseEntity<Object> getServers(ServerDeployQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(ServerDeployQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(serverDeployService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(serverDeployService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class QuartzJobController {
|
||||||
@ApiOperation("查询定时任务")
|
@ApiOperation("查询定时任务")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('timing:list')")
|
@PreAuthorize("@el.check('timing:list')")
|
||||||
public ResponseEntity<Object> getJobs(JobQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(JobQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(quartzJobService.queryAll(criteria,pageable), HttpStatus.OK);
|
return new ResponseEntity<>(quartzJobService.queryAll(criteria,pageable), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public class QuartzJobController {
|
||||||
@ApiOperation("查询任务执行日志")
|
@ApiOperation("查询任务执行日志")
|
||||||
@GetMapping(value = "/logs")
|
@GetMapping(value = "/logs")
|
||||||
@PreAuthorize("@el.check('timing:list')")
|
@PreAuthorize("@el.check('timing:list')")
|
||||||
public ResponseEntity<Object> getJobLogs(JobQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> queryJobLog(JobQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(quartzJobService.queryAllLog(criteria,pageable), HttpStatus.OK);
|
return new ResponseEntity<>(quartzJobService.queryAllLog(criteria,pageable), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public class QuartzJobController {
|
||||||
@ApiOperation("更改定时任务状态")
|
@ApiOperation("更改定时任务状态")
|
||||||
@PutMapping(value = "/{id}")
|
@PutMapping(value = "/{id}")
|
||||||
@PreAuthorize("@el.check('timing:edit')")
|
@PreAuthorize("@el.check('timing:edit')")
|
||||||
public ResponseEntity<Object> updateIsPause(@PathVariable Long id){
|
public ResponseEntity<Object> update(@PathVariable Long id){
|
||||||
quartzJobService.updateIsPause(quartzJobService.findById(id));
|
quartzJobService.updateIsPause(quartzJobService.findById(id));
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class OnlineController {
|
||||||
@ApiOperation("查询在线用户")
|
@ApiOperation("查询在线用户")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check()")
|
@PreAuthorize("@el.check()")
|
||||||
public ResponseEntity<Object> getAll(String filter, Pageable pageable){
|
public ResponseEntity<Object> query(String filter, Pageable pageable){
|
||||||
return new ResponseEntity<>(onlineUserService.getAll(filter, pageable),HttpStatus.OK);
|
return new ResponseEntity<>(onlineUserService.getAll(filter, pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class DeptController {
|
||||||
@ApiOperation("查询部门")
|
@ApiOperation("查询部门")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('user:list','dept:list')")
|
@PreAuthorize("@el.check('user:list','dept:list')")
|
||||||
public ResponseEntity<Object> getDepts(DeptQueryCriteria criteria) throws Exception {
|
public ResponseEntity<Object> query(DeptQueryCriteria criteria) throws Exception {
|
||||||
List<DeptDto> deptDtos = deptService.queryAll(criteria, true);
|
List<DeptDto> deptDtos = deptService.queryAll(criteria, true);
|
||||||
return new ResponseEntity<>(PageUtil.toPage(deptDtos, deptDtos.size()),HttpStatus.OK);
|
return new ResponseEntity<>(PageUtil.toPage(deptDtos, deptDtos.size()),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class DictController {
|
||||||
@ApiOperation("查询字典")
|
@ApiOperation("查询字典")
|
||||||
@GetMapping(value = "/all")
|
@GetMapping(value = "/all")
|
||||||
@PreAuthorize("@el.check('dict:list')")
|
@PreAuthorize("@el.check('dict:list')")
|
||||||
public ResponseEntity<Object> all(){
|
public ResponseEntity<Object> queryAll(){
|
||||||
return new ResponseEntity<>(dictService.queryAll(new DictQueryCriteria()),HttpStatus.OK);
|
return new ResponseEntity<>(dictService.queryAll(new DictQueryCriteria()),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public class DictController {
|
||||||
@ApiOperation("查询字典")
|
@ApiOperation("查询字典")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('dict:list')")
|
@PreAuthorize("@el.check('dict:list')")
|
||||||
public ResponseEntity<Object> getByQuery(DictQueryCriteria resources, Pageable pageable){
|
public ResponseEntity<Object> query(DictQueryCriteria resources, Pageable pageable){
|
||||||
return new ResponseEntity<>(dictService.queryAll(resources,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(dictService.queryAll(resources,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class DictDetailController {
|
||||||
@Log("查询字典详情")
|
@Log("查询字典详情")
|
||||||
@ApiOperation("查询字典详情")
|
@ApiOperation("查询字典详情")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResponseEntity<Object> getDictDetails(DictDetailQueryCriteria criteria,
|
public ResponseEntity<Object> query(DictDetailQueryCriteria criteria,
|
||||||
@PageableDefault(sort = {"dictSort"}, direction = Sort.Direction.ASC) Pageable pageable){
|
@PageableDefault(sort = {"dictSort"}, direction = Sort.Direction.ASC) Pageable pageable){
|
||||||
return new ResponseEntity<>(dictDetailService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(dictDetailService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class JobController {
|
||||||
@ApiOperation("查询岗位")
|
@ApiOperation("查询岗位")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('job:list','user:list')")
|
@PreAuthorize("@el.check('job:list','user:list')")
|
||||||
public ResponseEntity<Object> getJobs(JobQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(JobQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(jobService.queryAll(criteria, pageable),HttpStatus.OK);
|
return new ResponseEntity<>(jobService.queryAll(criteria, pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class LimitController {
|
||||||
@AnonymousAccess
|
@AnonymousAccess
|
||||||
@ApiOperation("测试")
|
@ApiOperation("测试")
|
||||||
@Limit(key = "test", period = 60, count = 10, name = "testLimit", prefix = "limit")
|
@Limit(key = "test", period = 60, count = 10, name = "testLimit", prefix = "limit")
|
||||||
public int testLimit() {
|
public int test() {
|
||||||
return ATOMIC_INTEGER.incrementAndGet();
|
return ATOMIC_INTEGER.incrementAndGet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class MenuController {
|
||||||
@ApiOperation("返回全部的菜单")
|
@ApiOperation("返回全部的菜单")
|
||||||
@GetMapping(value = "/lazy")
|
@GetMapping(value = "/lazy")
|
||||||
@PreAuthorize("@el.check('menu:list','roles:list')")
|
@PreAuthorize("@el.check('menu:list','roles:list')")
|
||||||
public ResponseEntity<Object> getMenus(@RequestParam Long pid){
|
public ResponseEntity<Object> query(@RequestParam Long pid){
|
||||||
return new ResponseEntity<>(menuService.getMenus(pid),HttpStatus.OK);
|
return new ResponseEntity<>(menuService.getMenus(pid),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ public class MenuController {
|
||||||
@ApiOperation("查询菜单")
|
@ApiOperation("查询菜单")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('menu:list')")
|
@PreAuthorize("@el.check('menu:list')")
|
||||||
public ResponseEntity<Object> getMenus(MenuQueryCriteria criteria) throws Exception {
|
public ResponseEntity<Object> query(MenuQueryCriteria criteria) throws Exception {
|
||||||
List<MenuDto> menuDtoList = menuService.queryAll(criteria, true);
|
List<MenuDto> menuDtoList = menuService.queryAll(criteria, true);
|
||||||
return new ResponseEntity<>(PageUtil.toPage(menuDtoList, menuDtoList.size()),HttpStatus.OK);
|
return new ResponseEntity<>(PageUtil.toPage(menuDtoList, menuDtoList.size()),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class MonitorController {
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@ApiOperation("查询服务监控")
|
@ApiOperation("查询服务监控")
|
||||||
@PreAuthorize("@el.check('monitor:list')")
|
@PreAuthorize("@el.check('monitor:list')")
|
||||||
public ResponseEntity<Object> getServers(){
|
public ResponseEntity<Object> query(){
|
||||||
return new ResponseEntity<>(serverService.getServers(),HttpStatus.OK);
|
return new ResponseEntity<>(serverService.getServers(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class RoleController {
|
||||||
@ApiOperation("获取单个role")
|
@ApiOperation("获取单个role")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
@PreAuthorize("@el.check('roles:list')")
|
@PreAuthorize("@el.check('roles:list')")
|
||||||
public ResponseEntity<Object> getRoles(@PathVariable Long id){
|
public ResponseEntity<Object> query(@PathVariable Long id){
|
||||||
return new ResponseEntity<>(roleService.findById(id), HttpStatus.OK);
|
return new ResponseEntity<>(roleService.findById(id), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public class RoleController {
|
||||||
@ApiOperation("返回全部的角色")
|
@ApiOperation("返回全部的角色")
|
||||||
@GetMapping(value = "/all")
|
@GetMapping(value = "/all")
|
||||||
@PreAuthorize("@el.check('roles:list','user:add','user:edit')")
|
@PreAuthorize("@el.check('roles:list','user:add','user:edit')")
|
||||||
public ResponseEntity<Object> getAll(@PageableDefault(value = 2000, sort = {"level"}, direction = Sort.Direction.ASC) Pageable pageable){
|
public ResponseEntity<Object> query(@PageableDefault(value = 2000, sort = {"level"}, direction = Sort.Direction.ASC) Pageable pageable){
|
||||||
return new ResponseEntity<>(roleService.queryAll(pageable),HttpStatus.OK);
|
return new ResponseEntity<>(roleService.queryAll(pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public class RoleController {
|
||||||
@ApiOperation("查询角色")
|
@ApiOperation("查询角色")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('roles:list')")
|
@PreAuthorize("@el.check('roles:list')")
|
||||||
public ResponseEntity<Object> getRoles(RoleQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(RoleQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(roleService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(roleService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class UserController {
|
||||||
@ApiOperation("查询用户")
|
@ApiOperation("查询用户")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('user:list')")
|
@PreAuthorize("@el.check('user:list')")
|
||||||
public ResponseEntity<Object> getUsers(UserQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(UserQueryCriteria criteria, Pageable pageable){
|
||||||
if (!ObjectUtils.isEmpty(criteria.getDeptId())) {
|
if (!ObjectUtils.isEmpty(criteria.getDeptId())) {
|
||||||
criteria.getDeptIds().add(criteria.getDeptId());
|
criteria.getDeptIds().add(criteria.getDeptId());
|
||||||
criteria.getDeptIds().addAll(dataService.getDeptChildren(deptService.findByPid(criteria.getDeptId())));
|
criteria.getDeptIds().addAll(dataService.getDeptChildren(deptService.findByPid(criteria.getDeptId())));
|
||||||
|
|
|
@ -92,6 +92,7 @@ public class MenuServiceImpl implements MenuService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Cacheable(key = "#p0")
|
||||||
public List<MenuDto> findByRoles(List<RoleSmallDto> roles) {
|
public List<MenuDto> findByRoles(List<RoleSmallDto> roles) {
|
||||||
Set<Long> roleIds = roles.stream().map(RoleSmallDto::getId).collect(Collectors.toSet());
|
Set<Long> roleIds = roles.stream().map(RoleSmallDto::getId).collect(Collectors.toSet());
|
||||||
LinkedHashSet<Menu> menus = menuRepository.findByRoles_IdInAndTypeNotOrderByMenuSortAsc(roleIds, 2);
|
LinkedHashSet<Menu> menus = menuRepository.findByRoles_IdInAndTypeNotOrderByMenuSortAsc(roleIds, 2);
|
||||||
|
|
|
@ -7,34 +7,42 @@ spring:
|
||||||
url: jdbc:log4jdbc:mysql://localhost:3306/eladmin?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
|
url: jdbc:log4jdbc:mysql://localhost:3306/eladmin?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
|
||||||
username: root
|
username: root
|
||||||
password: 123456
|
password: 123456
|
||||||
|
# 初始连接数
|
||||||
# 初始化配置
|
initial-size: 5
|
||||||
initial-size: 3
|
|
||||||
# 最小连接数
|
# 最小连接数
|
||||||
min-idle: 3
|
min-idle: 10
|
||||||
# 最大连接数
|
# 最大连接数
|
||||||
max-active: 15
|
max-active: 20
|
||||||
# 获取连接超时时间
|
# 获取连接超时时间
|
||||||
max-wait: 5000
|
max-wait: 5000
|
||||||
# 连接有效性检测时间
|
# 连接有效性检测时间
|
||||||
time-between-eviction-runs-millis: 90000
|
time-between-eviction-runs-millis: 60000
|
||||||
# 最大空闲时间
|
# 连接在池中最小生存的时间
|
||||||
min-evictable-idle-time-millis: 1800000
|
min-evictable-idle-time-millis: 300000
|
||||||
|
# 连接在池中最大生存的时间
|
||||||
|
max-evictable-idle-time-millis: 900000
|
||||||
test-while-idle: true
|
test-while-idle: true
|
||||||
test-on-borrow: false
|
test-on-borrow: false
|
||||||
test-on-return: false
|
test-on-return: false
|
||||||
|
# 检测连接是否有效
|
||||||
validation-query: select 1
|
validation-query: select 1
|
||||||
# 配置监控统计拦截的filters
|
# 配置监控统计
|
||||||
filters: stat
|
webStatFilter:
|
||||||
|
enabled: true
|
||||||
stat-view-servlet:
|
stat-view-servlet:
|
||||||
|
enabled: true
|
||||||
url-pattern: /druid/*
|
url-pattern: /druid/*
|
||||||
reset-enable: false
|
reset-enable: false
|
||||||
|
filter:
|
||||||
web-stat-filter:
|
stat:
|
||||||
url-pattern: /*
|
enabled: true
|
||||||
exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"
|
# 记录慢SQL
|
||||||
|
log-slow-sql: true
|
||||||
|
slow-sql-millis: 1000
|
||||||
|
merge-sql: true
|
||||||
|
wall:
|
||||||
|
config:
|
||||||
|
multi-statement-allow: true
|
||||||
#jwt
|
#jwt
|
||||||
jwt:
|
jwt:
|
||||||
header: Authorization
|
header: Authorization
|
||||||
|
|
|
@ -7,36 +7,44 @@ spring:
|
||||||
url: jdbc:log4jdbc:mysql://localhost:3306/eladmin?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
|
url: jdbc:log4jdbc:mysql://localhost:3306/eladmin?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
|
||||||
username: root
|
username: root
|
||||||
password: 123456
|
password: 123456
|
||||||
|
# 初始连接数
|
||||||
# 初始化配置
|
initial-size: 5
|
||||||
initial-size: 3
|
|
||||||
# 最小连接数
|
# 最小连接数
|
||||||
min-idle: 3
|
min-idle: 10
|
||||||
# 最大连接数
|
# 最大连接数
|
||||||
max-active: 15
|
max-active: 20
|
||||||
# 获取连接超时时间
|
# 获取连接超时时间
|
||||||
max-wait: 5000
|
max-wait: 5000
|
||||||
# 连接有效性检测时间
|
# 连接有效性检测时间
|
||||||
time-between-eviction-runs-millis: 90000
|
time-between-eviction-runs-millis: 60000
|
||||||
# 最大空闲时间
|
# 连接在池中最小生存的时间
|
||||||
min-evictable-idle-time-millis: 1800000
|
min-evictable-idle-time-millis: 300000
|
||||||
|
# 连接在池中最大生存的时间
|
||||||
|
max-evictable-idle-time-millis: 900000
|
||||||
test-while-idle: true
|
test-while-idle: true
|
||||||
test-on-borrow: false
|
test-on-borrow: false
|
||||||
test-on-return: false
|
test-on-return: false
|
||||||
|
# 检测连接是否有效
|
||||||
validation-query: select 1
|
validation-query: select 1
|
||||||
# 配置监控统计拦截的filters
|
# 配置监控统计
|
||||||
filters: stat
|
webStatFilter:
|
||||||
|
enabled: true
|
||||||
stat-view-servlet:
|
stat-view-servlet:
|
||||||
|
enabled: true
|
||||||
url-pattern: /druid/*
|
url-pattern: /druid/*
|
||||||
reset-enable: false
|
reset-enable: false
|
||||||
login-username: admin
|
login-username: admin
|
||||||
login-password: 123456
|
login-password: 123456
|
||||||
|
filter:
|
||||||
web-stat-filter:
|
stat:
|
||||||
url-pattern: /*
|
enabled: true
|
||||||
exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"
|
# 记录慢SQL
|
||||||
|
log-slow-sql: true
|
||||||
|
slow-sql-millis: 1000
|
||||||
|
merge-sql: true
|
||||||
|
wall:
|
||||||
|
config:
|
||||||
|
multi-statement-allow: true
|
||||||
#jwt
|
#jwt
|
||||||
jwt:
|
jwt:
|
||||||
header: Authorization
|
header: Authorization
|
||||||
|
|
|
@ -32,7 +32,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://docs.auauz.net
|
* @website https://docs.auauz.net
|
||||||
* @description /
|
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
@ -56,7 +55,7 @@ public class ${className}Controller {
|
||||||
@Log("查询${apiAlias}")
|
@Log("查询${apiAlias}")
|
||||||
@ApiOperation("查询${apiAlias}")
|
@ApiOperation("查询${apiAlias}")
|
||||||
@PreAuthorize("@el.check('${changeClassName}:list')")
|
@PreAuthorize("@el.check('${changeClassName}:list')")
|
||||||
public ResponseEntity<Object> get${className}s(${className}QueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(${className}QueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(${changeClassName}Service.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(${changeClassName}Service.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +80,7 @@ public class ${className}Controller {
|
||||||
@ApiOperation("删除${apiAlias}")
|
@ApiOperation("删除${apiAlias}")
|
||||||
@PreAuthorize("@el.check('${changeClassName}:del')")
|
@PreAuthorize("@el.check('${changeClassName}:del')")
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
public ResponseEntity<Object> deleteAll(@RequestBody ${pkColumnType}[] ids) {
|
public ResponseEntity<Object> delete(@RequestBody ${pkColumnType}[] ids) {
|
||||||
${changeClassName}Service.deleteAll(ids);
|
${changeClassName}Service.deleteAll(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ import org.mapstruct.ReportingPolicy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://docs.auauz.net
|
* @website https://docs.auauz.net
|
||||||
* @description /
|
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -31,7 +31,6 @@ import me.zhengjie.annotation.Query;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://docs.auauz.net
|
* @website https://docs.auauz.net
|
||||||
* @description /
|
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -21,7 +21,6 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://docs.auauz.net
|
* @website https://docs.auauz.net
|
||||||
* @description /
|
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://docs.auauz.net
|
* @website https://docs.auauz.net
|
||||||
* @description /
|
* @description 服务接口
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -56,7 +56,7 @@ import java.util.LinkedHashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://docs.auauz.net
|
* @website https://docs.auauz.net
|
||||||
* @description /
|
* @description 服务实现
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -51,14 +51,14 @@ public class AliPayController {
|
||||||
private final AliPayService alipayService;
|
private final AliPayService alipayService;
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResponseEntity<AlipayConfig> get(){
|
public ResponseEntity<AlipayConfig> queryConfig(){
|
||||||
return new ResponseEntity<>(alipayService.find(),HttpStatus.OK);
|
return new ResponseEntity<>(alipayService.find(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log("配置支付宝")
|
@Log("配置支付宝")
|
||||||
@ApiOperation("配置支付宝")
|
@ApiOperation("配置支付宝")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public ResponseEntity<Object> payConfig(@Validated @RequestBody AlipayConfig alipayConfig){
|
public ResponseEntity<Object> updateConfig(@Validated @RequestBody AlipayConfig alipayConfig){
|
||||||
alipayConfig.setId(1L);
|
alipayConfig.setId(1L);
|
||||||
alipayService.update(alipayConfig);
|
alipayService.update(alipayConfig);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
|
|
@ -41,14 +41,14 @@ public class EmailController {
|
||||||
private final EmailService emailService;
|
private final EmailService emailService;
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResponseEntity<Object> get(){
|
public ResponseEntity<Object> queryConfig(){
|
||||||
return new ResponseEntity<>(emailService.find(),HttpStatus.OK);
|
return new ResponseEntity<>(emailService.find(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log("配置邮件")
|
@Log("配置邮件")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("配置邮件")
|
@ApiOperation("配置邮件")
|
||||||
public ResponseEntity<Object> emailConfig(@Validated @RequestBody EmailConfig emailConfig){
|
public ResponseEntity<Object> updateConfig(@Validated @RequestBody EmailConfig emailConfig){
|
||||||
emailService.update(emailConfig,emailService.find());
|
emailService.update(emailConfig,emailService.find());
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public class EmailController {
|
||||||
@Log("发送邮件")
|
@Log("发送邮件")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("发送邮件")
|
@ApiOperation("发送邮件")
|
||||||
public ResponseEntity<Object> send(@Validated @RequestBody EmailVo emailVo) throws Exception {
|
public ResponseEntity<Object> sendEmail(@Validated @RequestBody EmailVo emailVo) throws Exception {
|
||||||
emailService.send(emailVo,emailService.find());
|
emailService.send(emailVo,emailService.find());
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class LocalStorageController {
|
||||||
@ApiOperation("查询文件")
|
@ApiOperation("查询文件")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('storage:list')")
|
@PreAuthorize("@el.check('storage:list')")
|
||||||
public ResponseEntity<Object> getLocalStorages(LocalStorageQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(LocalStorageQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(localStorageService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(localStorageService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ public class LocalStorageController {
|
||||||
@Log("多选删除")
|
@Log("多选删除")
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
@ApiOperation("多选删除")
|
@ApiOperation("多选删除")
|
||||||
public ResponseEntity<Object> deleteAll(@RequestBody Long[] ids) {
|
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||||
localStorageService.deleteAll(ids);
|
localStorageService.deleteAll(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class PictureController {
|
||||||
@PreAuthorize("@el.check('pictures:list')")
|
@PreAuthorize("@el.check('pictures:list')")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@ApiOperation("查询图片")
|
@ApiOperation("查询图片")
|
||||||
public ResponseEntity<Object> getRoles(PictureQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(PictureQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(pictureService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(pictureService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ public class PictureController {
|
||||||
@ApiOperation("多选删除图片")
|
@ApiOperation("多选删除图片")
|
||||||
@PreAuthorize("@el.check('pictures:del')")
|
@PreAuthorize("@el.check('pictures:del')")
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
public ResponseEntity<Object> deleteAll(@RequestBody Long[] ids) {
|
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||||
pictureService.deleteAll(ids);
|
pictureService.deleteAll(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,14 +50,14 @@ public class QiniuController {
|
||||||
private final QiNiuService qiNiuService;
|
private final QiNiuService qiNiuService;
|
||||||
|
|
||||||
@GetMapping(value = "/config")
|
@GetMapping(value = "/config")
|
||||||
public ResponseEntity<Object> get(){
|
public ResponseEntity<Object> queryConfig(){
|
||||||
return new ResponseEntity<>(qiNiuService.find(), HttpStatus.OK);
|
return new ResponseEntity<>(qiNiuService.find(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log("配置七牛云存储")
|
@Log("配置七牛云存储")
|
||||||
@ApiOperation("配置七牛云存储")
|
@ApiOperation("配置七牛云存储")
|
||||||
@PutMapping(value = "/config")
|
@PutMapping(value = "/config")
|
||||||
public ResponseEntity<Object> emailConfig(@Validated @RequestBody QiniuConfig qiniuConfig){
|
public ResponseEntity<Object> updateConfig(@Validated @RequestBody QiniuConfig qiniuConfig){
|
||||||
qiNiuService.update(qiniuConfig);
|
qiNiuService.update(qiniuConfig);
|
||||||
qiNiuService.update(qiniuConfig.getType());
|
qiNiuService.update(qiniuConfig.getType());
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
@ -73,7 +73,7 @@ public class QiniuController {
|
||||||
@Log("查询文件")
|
@Log("查询文件")
|
||||||
@ApiOperation("查询文件")
|
@ApiOperation("查询文件")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResponseEntity<Object> getRoles(QiniuQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(QiniuQueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity<>(qiNiuService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(qiNiuService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
31
pom.xml
31
pom.xml
|
@ -33,44 +33,51 @@
|
||||||
<jedis.version>2.9.0</jedis.version>
|
<jedis.version>2.9.0</jedis.version>
|
||||||
<log4jdbc.version>1.16</log4jdbc.version>
|
<log4jdbc.version>1.16</log4jdbc.version>
|
||||||
<swagger.version>2.9.2</swagger.version>
|
<swagger.version>2.9.2</swagger.version>
|
||||||
<fastjson.version>1.2.54</fastjson.version>
|
<fastjson.version>1.2.68</fastjson.version>
|
||||||
<druid.version>1.1.10</druid.version>
|
<druid.version>1.1.14</druid.version>
|
||||||
<commons-pool2.version>2.5.0</commons-pool2.version>
|
<commons-pool2.version>2.5.0</commons-pool2.version>
|
||||||
<mapstruct.version>1.2.0.Final</mapstruct.version>
|
<mapstruct.version>1.2.0.Final</mapstruct.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!--Spring boot start-->
|
<!--Spring boot 核心-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--Spring boot Web容器-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--Spring boot 测试-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--Spring boot 安全框架-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-security</artifactId>
|
<artifactId>spring-boot-starter-security</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- spring cache -->
|
|
||||||
|
<!-- spring boot 缓存 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-cache</artifactId>
|
<artifactId>spring-boot-starter-cache</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- redis -->
|
|
||||||
|
<!--Spring boot Redis-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--Spring boot end-->
|
|
||||||
|
|
||||||
<!--spring2.0集成redis所需common-pool2-->
|
<!--spring boot 集成redis所需common-pool2-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-pool2</artifactId>
|
<artifactId>commons-pool2</artifactId>
|
||||||
|
@ -88,7 +95,7 @@
|
||||||
<version>${log4jdbc.version}</version>
|
<version>${log4jdbc.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- RESTful APIs swagger2 -->
|
<!-- Swagger UI 相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
|
@ -126,6 +133,7 @@
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- druid数据源驱动 -->
|
<!-- druid数据源驱动 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
|
@ -140,6 +148,7 @@
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- excel工具 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi</artifactId>
|
<artifactId>poi</artifactId>
|
||||||
|
@ -150,7 +159,6 @@
|
||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
<version>3.17</version>
|
<version>3.17</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/xerces/xercesImpl -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>xerces</groupId>
|
<groupId>xerces</groupId>
|
||||||
<artifactId>xercesImpl</artifactId>
|
<artifactId>xercesImpl</artifactId>
|
||||||
|
@ -163,6 +171,7 @@
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
<version>${fastjson.version}</version>
|
<version>${fastjson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--mapStruct依赖-->
|
<!--mapStruct依赖-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mapstruct</groupId>
|
<groupId>org.mapstruct</groupId>
|
||||||
|
@ -180,11 +189,15 @@
|
||||||
<artifactId>javax.inject</artifactId>
|
<artifactId>javax.inject</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Java图形验证码 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.whvcse</groupId>
|
<groupId>com.github.whvcse</groupId>
|
||||||
<artifactId>easy-captcha</artifactId>
|
<artifactId>easy-captcha</artifactId>
|
||||||
<version>1.6.2</version>
|
<version>1.6.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 解析客户端操作系统、浏览器信息 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>eu.bitwalker</groupId>
|
<groupId>eu.bitwalker</groupId>
|
||||||
<artifactId>UserAgentUtils</artifactId>
|
<artifactId>UserAgentUtils</artifactId>
|
||||||
|
|
Loading…
Reference in New Issue