8 Commits

Author SHA1 Message Date
zhuoda
b782b953a5 update README.md. 2022-04-26 05:38:58 +00:00
zhuoda
4fc2976624 update 2021-09-13 14:36:17 +00:00
lipeng
c692d0e6d3 增加缺失依赖 2021-08-10 13:13:17 +08:00
zhuoda
1204787cf3 update 代码规范/api接口规范.md. 2021-05-19 10:48:01 +08:00
zhuoda
2d61c21398 update 代码规范/api接口规范.md. 2021-05-19 10:47:44 +08:00
zhuoda
fe6ab3798a update 代码规范/api接口规范.md. 2021-05-19 10:47:36 +08:00
zhuoda
0c0da77ecd 更新api接口规范 2021-05-19 10:46:37 +08:00
zhuoda
c530d8db15 add 代码规范/api接口规范.md. 2021-05-19 10:39:04 +08:00
4 changed files with 48 additions and 6 deletions

View File

@@ -6,8 +6,8 @@ SmartAdmin由河南·洛阳 [1024创新实验室](https://www.1024lab.net/)团
github: [https://github.com/1024-lab/smart-admin](https://github.com/1024-lab/smart-admin)
gitee: [https://gitee.com/lab1024/smart-admin](https://gitee.com/lab1024/smart-admin)
在线预览: [http://preview.smartadmin.1024lab.net](http://preview.smartadmin.1024lab.net)
部署文档:[http://smartadmin.1024lab.net/doc/2/168](http://smartadmin.1024lab.net/doc/2/168)
平滑升级:[http://smartadmin.1024lab.net/doc/2/173](http://smartadmin.1024lab.net/doc/2/173)
部署文档:[http://smartadmin.1024lab.net](http://smartadmin.1024lab.net)
#### 疑惑
有人问:又是个“轮子”? 轮子靠谱吗?为什么要选择你这个轮子?

View File

@@ -23,6 +23,7 @@
"cropperjs": "^1.2.2",
"dayjs": "^1.7.7",
"decimal.js": "^10.1.1",
"core-js":"^2.0.0",
"e-guide-layer": "^0.1.1",
"echarts": "^4.0.4",
"gq-plus": "^2.1.5",

View File

@@ -1,5 +1,5 @@
<template>
<div>
<Col :lg="19" :md="16">
<Card class="warp-card" dis-hover>
<!--Row 顶部操作区 start-->
@@ -73,8 +73,8 @@
</Row>
<!--Row 底部操作区 end-->
</Card>
</Col>
<!--EmployeeTableAdd 添加成员弹窗 start-->
<!--EmployeeTableAdd 添加成员弹窗 start-->
<EmployeeTableAdd
:selectDepartment="selectDepartment"
@addSuccess="getEmployeeList"
@@ -101,7 +101,10 @@
<!--EmployeeTableDetail 角色详情 start-->
<EmployeeTableDetail ref="employeeTableDetail"></EmployeeTableDetail>
<!--EmployeeTableDetail 角色详情 end-->
</div>
</Col>
</template>
<script>
import { departmentApi } from '@/api/department';

View File

@@ -0,0 +1,38 @@
### Restful接口规范
1、不推荐使用 rest 命名 url 只能使用 get/post 方法。url 命名上规范如下:虽然 Rest 大法好,但是有时并不能一眼根据 url看出来是什么操作。
url 格式为:
/业务模块/子模块/动作
举例:
```
GET /department/get/{id} 查询某个部门详细信息
POST /department/query 复杂查询
POST /department/add 添加部门
POST /department/update 更新部门
GET /department/delete/{id} 删除部门
```
### controller 里接口 swagger 规范
1、controller每个方法必须添加 swagger 文档注解 @ApiOperation ,并填写接口描述信息,描述最后必须加上作者信息 @author 哪吒
比如:
```java
@ApiOperation("更新部门信息 @author 哪吒")
@PostMapping("/department/update")
public ResponseDTO<String> updateDepartment(@Valid @RequestBody DeptUpdateDTO deptUpdateDTO) {
return departmentService.updateDepartment(deptUpdateDTO);
}
```
### controller 里 传入和返回 JavaBean 规范
1、类中的每个字段添加注释
2、对于枚举值的类型要清楚标注清楚可能的值以及每个值表示什么含义
比如:
```
public class UserVO{
@ApiModelProperty("性别0表示 女1表示 男2表示 未知")
private Integer gender;
}
```