Skip to content

Commit

Permalink
v1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuoda committed May 2, 2021
1 parent 8b18635 commit ca770b2
Show file tree
Hide file tree
Showing 103 changed files with 16,990 additions and 745 deletions.
42 changes: 26 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
### SmartAdmin 2.0 (即 vue3 的 js版本和ts版本 )正在火热开发中,欢迎持续关注 !
#### 简介
SmartAdmin由河南·洛阳 [1024创新实验室](https://www.1024lab.net/)团队研发的一套互联网企业级的通用型中后台解决方案!使用最前沿的前后台技术栈SpringBoot和Vue,前后端分离,<font color="#DC143C">**我们开源一套漂亮的代码和一套整洁的代码规范**</font>,让大家在这浮躁的代码世界里感受到一股把代码写好的清流!同时又让开发者节省大量的时间,减少加班,快乐工作,热爱生活。SmartAdmin 让你从认识到忘不了,绝对是你最想要的!

Expand Down Expand Up @@ -25,32 +26,32 @@ gitee: [https://gitee.com/lab1024/smart-admin](https://gitee.com/lab1024/smart-
#### 演示图
<table>
<tr>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/11.png"/></td>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/12.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180453_252f5e9f_5469596.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180630_ee5b4f46_5469596.png"/></td>
</tr>
<tr>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/21.png"/></td>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/22.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180737_9363e283_5469596.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180802_aefb78f4_5469596.png"/></td>
</tr>
<tr>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/31.png"/></td>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/32.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180821_30fc7aaf_5469596.png")"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180844_01ebd7d2_5469596.png")"/></td>
</tr>
<tr>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/41.png"/></td>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/42.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180902_02c8d838_5469596.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180918_ff1f7ff5_5469596.png"/></td>
</tr>
<tr>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/51.png"/></td>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/52.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180938_86b39645_5469596.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/180956_69e25a9c_5469596.png"/></td>
</tr>
<tr>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/61.png"/></td>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/62.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/181013_791d92f0_5469596.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/181032_9f0dbbee_5469596.png"/></td>
</tr>
<tr>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/71.png"/></td>
<td><img src="http://img.zhuoluodada.cn/cut/1.1.0/72.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/181049_099d0169_5469596.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/181104_914c457a_5469596.png"/></td>
</tr>
</table>

Expand Down Expand Up @@ -106,22 +107,31 @@ ps:以上规范基础都是以团队出发,让团队开心快乐的写代码
#### 联系我们

[1024创新实验室](https://www.1024lab.net/)
公众号
<table>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2021/0305/210257_cd96d824_5469596.jpeg"/></td>
</tr>
</table>

SmartAdmin微信群(**加我微信拉你入群!**

<table>
<tr>
<td><img src="http://img.zhuoluodada.cn/wechat/zhuoda-wechat.jpg"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/181125_2ab89aa9_5469596.jpeg"/></td>
</tr>
</table>





#### 捐赠
开源不易,感谢捐赠
>*佛祖保佑捐赠这些人写程序永无bug,工资翻倍,迎娶白富美,走上人生巅峰!*
<table>
<tr>
<td><img src="http://img.zhuoluodada.cn/wechat/zhuoda-wechat-money-v1.jpg"/></td>
<td><img src="https://images.gitee.com/uploads/images/2020/1208/181143_b6804a87_5469596.jpeg"/></td>
</tr>
</table>
Expand Down
18 changes: 7 additions & 11 deletions smart-admin-service/smart-admin-api/doc/readme.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
1 更新密码
EmployeeController.updatePwd

2 更新功能点
PrivilegeController functionSaveOrUpdate和menuBatchSave、batchSaveFunctionList

3 超管默认账号
1 超管默认账号
sa/123456

4 执行脚本:
2 执行脚本:
先执行:src/main/resources/sql/smart-admin.sql
再执行:src/main/resources/sql/quartz_mysql_2.3.0.sql

5 除dev之外文件
3 除dev之外文件

6 刷新页面,获取权限是否走缓存
4 刷新页面,获取权限是否走缓存
LoginService.getSession

7 test类中去掉代码生成run
5 test类中去掉代码生成run

6 前端百度统计
16 changes: 15 additions & 1 deletion smart-admin-service/smart-admin-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,18 @@
<artifactId>fastjson</artifactId>
</dependency>

<!--druid -->
<!-- druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>

<!-- p6spy -->
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
</dependency>

<!-- swagger begin -->
<dependency>
<groupId>io.springfox</groupId>
Expand All @@ -126,6 +132,14 @@
</dependency>
<!-- swagger end -->

<!-- knife4j begin -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>${knife4j.version}</version>
</dependency>
<!-- knife4j end -->

<!-- guava -->
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@

String example() default "";

/**
* 是否隐藏
*
* @return
*/
boolean hidden() default false;

/**
* 是否必须
*
* @return
*/
boolean required() default true;

String dataType() default "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package net.lab1024.smartadmin.common.anno;

import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeTypeEnum;
import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeWhereInTypeEnum;
import net.lab1024.smartadmin.module.system.datascope.strategy.DataScopePowerStrategy;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand All @@ -23,12 +25,25 @@

DataScopeTypeEnum dataScopeType() default DataScopeTypeEnum.DEFAULT;

DataScopeWhereInTypeEnum whereInType() default DataScopeWhereInTypeEnum.EMPLOYEE;

/**
* DataScopeWhereInTypeEnum.CUSTOM_STRATEGY类型 才可使用joinSqlImplClazz属性
* @return
*/
Class<? extends DataScopePowerStrategy> joinSqlImplClazz() default DataScopePowerStrategy.class;

/**
*
* 第几个where 条件 从0开始
* @return
*/
int whereIndex() default 0;

/**
* DataScopeWhereInTypeEnum为CUSTOM_STRATEGY类型时,此属性无效
* @return
*/
String joinSql() default "";

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import net.lab1024.smartadmin.module.system.employee.constant.EmployeeResponseCodeConst;
import net.lab1024.smartadmin.module.support.file.constant.FileResponseCodeConst;
import net.lab1024.smartadmin.module.business.log.orderoperatelog.constant.OrderOperateLogOperateTypeConst;
import net.lab1024.smartadmin.module.business.login.LoginResponseCodeConst;
import net.lab1024.smartadmin.module.system.login.LoginResponseCodeConst;
import net.lab1024.smartadmin.module.system.position.PositionResponseCodeConst;
import net.lab1024.smartadmin.module.system.privilege.constant.PrivilegeResponseCodeConst;
import net.lab1024.smartadmin.module.system.role.basic.RoleResponseCodeConst;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class PageParamDTO {

@NotNull(message = "每页数量不能为空")
@ApiModelProperty(value = "每页数量(不能为空)", example = "10")
@Max(value = 200, message = "每页最大为200")
@Max(value = 500, message = "每页最大为500")
protected Integer pageSize;

@ApiModelProperty("是否查询总条数")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public static <T> ResponseDTO<T> wrap(ResponseCodeConst codeConst, String msg) {
return new ResponseDTO<T>(codeConst, msg);
}

public static <T> ResponseDTO<T> wrapMsg(ResponseCodeConst codeConst, String msg) {
return new ResponseDTO<T>(codeConst, msg);
}

public String getMsg() {
return msg;
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,23 @@ public class SmartSwaggerApiModelEnumPlugin implements ModelPropertyBuilderPlugi

@Override
public void apply(ModelPropertyContext context) {
Optional<ApiModelPropertyEnum> annotation = Optional.absent();
Optional<ApiModelPropertyEnum> enumOptional = Optional.absent();

if (context.getAnnotatedElement().isPresent()) {
annotation = annotation.or(findApiModePropertyAnnotation(context.getAnnotatedElement().get()));
enumOptional = enumOptional.or(findApiModePropertyAnnotation(context.getAnnotatedElement().get()));
}
if (context.getBeanPropertyDefinition().isPresent()) {
annotation = annotation.or(findPropertyAnnotation(context.getBeanPropertyDefinition().get(), ApiModelPropertyEnum.class));
enumOptional = enumOptional.or(findPropertyAnnotation(context.getBeanPropertyDefinition().get(), ApiModelPropertyEnum.class));
}

if (annotation.isPresent()) {
Class<? extends BaseEnum> aClass = annotation.get().value();
String enumInfo = BaseEnum.getInfo(aClass);
String enumDesc = annotation.get().enumDesc();
context.getBuilder().required(annotation.transform(toIsRequired()).or(false))
.description(enumDesc +":"+enumInfo)
.example(annotation.transform(toExample()).orNull());
if (enumOptional.isPresent()) {
ApiModelPropertyEnum anEnum = enumOptional.get();
String enumInfo = BaseEnum.getInfo(anEnum.value());
context.getBuilder()
.required(enumOptional.transform(toIsRequired()).or(false))
.description(anEnum.enumDesc() + ":" + enumInfo)
.example(enumOptional.transform(toExample()).orNull())
.isHidden(anEnum.hidden());
}
}

Expand Down
Loading

0 comments on commit ca770b2

Please sign in to comment.