Browse Source

Merge pull request #36 from Ruio9244/gin-vue-admin-develop

updata->update,Updata->Update
main
蒋吉兆 5 years ago
committed by GitHub
parent
commit
8e4a732f83
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      QMPlusServer/controller/api/exa_customer.go
  2. 6
      QMPlusServer/controller/api/sys_api.go
  3. 6
      QMPlusServer/controller/api/sys_casbin.go
  4. 6
      QMPlusServer/controller/api/sys_menu.go
  5. 36
      QMPlusServer/db/qmplus.sql
  6. 8
      QMPlusServer/docs/docs.go
  7. 8
      QMPlusServer/docs/swagger.json
  8. 8
      QMPlusServer/docs/swagger.yaml
  9. 2
      QMPlusServer/model/dbModel/exa_customer.go
  10. 4
      QMPlusServer/model/sysModel/sys_api.go
  11. 2
      QMPlusServer/model/sysModel/sys_base_menu.go
  12. 4
      QMPlusServer/model/sysModel/sys_casbin.go
  13. 2
      QMPlusServer/router/exp_customer.go
  14. 2
      QMPlusServer/router/sys_api.go
  15. 2
      QMPlusServer/router/sys_casbin.go
  16. 2
      QMPlusServer/router/sys_menu.go
  17. 6
      QMPlusVuePage/src/api/api.js
  18. 6
      QMPlusVuePage/src/api/casbin.js
  19. 6
      QMPlusVuePage/src/api/customer.js
  20. 6
      QMPlusVuePage/src/api/menu.js
  21. 8
      QMPlusVuePage/src/view/example/customer/customer.vue
  22. 4
      QMPlusVuePage/src/view/superAdmin/api/api.vue
  23. 4
      QMPlusVuePage/src/view/superAdmin/authority/components/apis.vue
  24. 4
      QMPlusVuePage/src/view/superAdmin/menu/menu.vue

6
QMPlusServer/controller/api/exa_customer.go

@ -58,11 +58,11 @@ func DeleteExaCustomer(c *gin.Context) {
// @Produce application/json
// @Param data body dbModel.ExaCustomer true "创建客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/updataExaCustomer [post]
func UpdataExaCustomer(c *gin.Context) {
// @Router /customer/updateExaCustomer [post]
func UpdateExaCustomer(c *gin.Context) {
var cu dbModel.ExaCustomer
_ = c.ShouldBindJSON(&cu)
err := cu.UpdataExaCustomer()
err := cu.UpdateExaCustomer()
if err != nil {
servers.ReportFormat(c, false, fmt.Sprintf("创建失败:%v", err), gin.H{})
} else {

6
QMPlusServer/controller/api/sys_api.go

@ -121,11 +121,11 @@ func GetApiById(c *gin.Context) {
// @Produce application/json
// @Param data body api.CreateApiParams true "创建api"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/updataApi [post]
func UpdataApi(c *gin.Context) {
// @Router /api/updateApi [post]
func UpdateApi(c *gin.Context) {
var api sysModel.SysApi
_ = c.ShouldBindJSON(&api)
err := api.UpdataApi()
err := api.UpdateApi()
if err != nil {
servers.ReportFormat(c, false, fmt.Sprintf("修改数据失败,%v", err), gin.H{})
} else {

6
QMPlusServer/controller/api/sys_casbin.go

@ -14,11 +14,11 @@ import (
// @Produce application/json
// @Param data body sysModel.CasbinInReceive true "更改角色api权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/casbinPUpdata [post]
func CasbinPUpdata(c *gin.Context) {
// @Router /casbin/casbinPUpdate [post]
func CasbinPUpdate(c *gin.Context) {
var cmr sysModel.CasbinInReceive
_ = c.ShouldBindJSON(&cmr)
err := new(sysModel.CasbinModel).CasbinPUpdata(cmr.AuthorityId, cmr.CasbinInfos)
err := new(sysModel.CasbinModel).CasbinPUpdate(cmr.AuthorityId, cmr.CasbinInfos)
if err != nil {
servers.ReportFormat(c, false, fmt.Sprintf("添加规则失败,%v", err), gin.H{})
} else {

6
QMPlusServer/controller/api/sys_menu.go

@ -163,11 +163,11 @@ func DeleteBaseMenu(c *gin.Context) {
// @Produce application/json
// @Param data body sysModel.SysBaseMenu true "更新菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/updataBaseMen [post]
func UpdataBaseMenu(c *gin.Context) {
// @Router /menu/updateBaseMen [post]
func UpdateBaseMenu(c *gin.Context) {
var menu sysModel.SysBaseMenu
_ = c.ShouldBindJSON(&menu)
err := menu.UpdataBaseMenu()
err := menu.UpdateBaseMenu()
if err != nil {
servers.ReportFormat(c, false, fmt.Sprintf("修改失败:%v", err), gin.H{})
} else {

36
QMPlusServer/db/qmplus.sql

@ -101,7 +101,7 @@ INSERT INTO `apis` VALUES (4, '2019-09-28 14:09:04', '2019-09-28 17:05:59', NULL
INSERT INTO `apis` VALUES (5, '2019-09-28 14:15:50', '2019-09-28 17:05:53', NULL, NULL, '/api/getApiById', '获取api详细信息', 'api');
INSERT INTO `apis` VALUES (6, '2019-09-28 14:19:08', '2019-09-28 17:05:48', NULL, NULL, '/api/setAuthAndApi', '设置api和角色关系', 'api');
INSERT INTO `apis` VALUES (7, '2019-09-28 14:19:26', '2019-09-28 17:05:44', NULL, NULL, '/api/deleteApi', '删除Api', 'api');
INSERT INTO `apis` VALUES (8, '2019-09-28 14:19:48', '2019-09-28 17:05:39', NULL, NULL, '/api/updataApi', '更新Api', 'api');
INSERT INTO `apis` VALUES (8, '2019-09-28 14:19:48', '2019-09-28 17:05:39', NULL, NULL, '/api/updateApi', '更新Api', 'api');
INSERT INTO `apis` VALUES (9, '2019-09-30 15:04:55', '2019-09-30 15:04:55', NULL, NULL, '/api/getAuthAndApi', '获取api和角色关系', 'api');
INSERT INTO `apis` VALUES (10, '2019-09-30 15:05:38', '2019-09-30 15:05:38', NULL, NULL, '/api/getAllApis', '获取所有api', 'api');
INSERT INTO `apis` VALUES (11, '2019-09-30 15:23:09', '2019-09-30 15:23:09', NULL, NULL, '/authority/createAuthority', '创建角色', 'authority');
@ -114,7 +114,7 @@ INSERT INTO `apis` VALUES (17, '2019-09-30 15:25:25', '2019-09-30 15:25:25', NUL
INSERT INTO `apis` VALUES (18, '2019-09-30 15:25:53', '2019-09-30 15:25:53', NULL, NULL, '/menu/addMenuAuthority', '增加menu和角色关联关系', 'menu');
INSERT INTO `apis` VALUES (19, '2019-09-30 15:26:20', '2019-09-30 15:26:20', NULL, NULL, '/menu/getMenuAuthority', '获取指定角色menu', 'menu');
INSERT INTO `apis` VALUES (20, '2019-09-30 15:26:43', '2019-09-30 15:26:43', NULL, NULL, '/menu/deleteBaseMenu', '删除菜单', 'menu');
INSERT INTO `apis` VALUES (21, '2019-09-30 15:28:05', '2019-09-30 15:28:05', NULL, NULL, '/menu/updataBaseMenu', '更新菜单', 'menu');
INSERT INTO `apis` VALUES (21, '2019-09-30 15:28:05', '2019-09-30 15:28:05', NULL, NULL, '/menu/updateBaseMenu', '更新菜单', 'menu');
INSERT INTO `apis` VALUES (22, '2019-09-30 15:28:21', '2019-09-30 15:28:21', NULL, NULL, '/menu/getBaseMenuById', '根据id获取菜单', 'menu');
INSERT INTO `apis` VALUES (23, '2019-09-30 15:29:19', '2019-09-30 15:29:19', NULL, NULL, '/user/changePassword', '修改密码', 'user');
INSERT INTO `apis` VALUES (24, '2019-09-30 15:29:33', '2019-09-30 15:29:33', NULL, NULL, '/user/uploadHeaderImg', '上传头像', 'user');
@ -217,7 +217,7 @@ INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/createApi', 'POST', '', '',
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/getApiList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/getApiById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/deleteApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/updataApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/updateApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/getAllApis', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/createAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/deleteAuthority', 'POST', '', '', '');
@ -230,7 +230,7 @@ INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getBaseMenuTree', 'POST',
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/addMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/deleteBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/updataBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/updateBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getBaseMenuById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/changePassword', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/uploadHeaderImg', 'POST', '', '', '');
@ -240,13 +240,13 @@ INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/setUserAuthority', 'POST',
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/getFileList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/deleteFile', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/casbinPUpdata', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/casbinPUpdate', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/getPolicyPathByAuthorityId', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/jwt/jsonInBlacklist', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/system/getSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/system/setSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/createExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/updataExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/updateExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/deleteExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/getExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/getExaCustomerList', 'POST', '', '', '');
@ -256,7 +256,7 @@ INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/createApi', 'POST', '', '',
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/getApiList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/getApiById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/deleteApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/updataApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/updateApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/getAllApis', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/createAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/deleteAuthority', 'POST', '', '', '');
@ -269,7 +269,7 @@ INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getBaseMenuTree', 'POST',
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/addMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/deleteBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/updataBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/updateBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getBaseMenuById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/changePassword', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/uploadHeaderImg', 'POST', '', '', '');
@ -279,13 +279,13 @@ INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/setUserAuthority', 'POST',
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/getFileList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/deleteFile', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/casbinPUpdata', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/casbinPUpdate', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/getPolicyPathByAuthorityId', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/jwt/jsonInBlacklist', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/system/getSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/system/setSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/createExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/updataExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/updateExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/deleteExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/getExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/getExaCustomerList', 'POST', '', '', '');
@ -296,7 +296,7 @@ INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/createApi', 'POST', '', '',
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/getApiList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/getApiById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/deleteApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/updataApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/updateApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/getAllApis', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/createAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/deleteAuthority', 'POST', '', '', '');
@ -309,7 +309,7 @@ INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getBaseMenuTree', 'POST', '
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/addMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/deleteBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/updataBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/updateBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getBaseMenuById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/changePassword', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/uploadHeaderImg', 'POST', '', '', '');
@ -319,14 +319,14 @@ INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/setUserAuthority', 'POST',
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/getFileList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/deleteFile', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/casbinPUpdata', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/casbinPUpdate', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/getPolicyPathByAuthorityId', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/casbinTest/:pathParam', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/jwt/jsonInBlacklist', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/system/getSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/system/setSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/createExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/updataExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/updateExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/deleteExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/getExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/getExaCustomerList', 'POST', '', '', '');
@ -4159,7 +4159,7 @@ INSERT INTO `sys_apis` VALUES (3, '2019-09-28 11:33:41', '2019-12-11 16:51:41',
INSERT INTO `sys_apis` VALUES (4, '2019-09-28 14:09:04', '2019-09-28 17:05:59', NULL, NULL, '/api/getApiList', '获取api列表', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (5, '2019-09-28 14:15:50', '2019-09-28 17:05:53', NULL, NULL, '/api/getApiById', '获取api详细信息', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (7, '2019-09-28 14:19:26', '2019-09-28 17:05:44', NULL, NULL, '/api/deleteApi', '删除Api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (8, '2019-09-28 14:19:48', '2019-09-28 17:05:39', NULL, NULL, '/api/updataApi', '更新Api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (8, '2019-09-28 14:19:48', '2019-09-28 17:05:39', NULL, NULL, '/api/updateApi', '更新Api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (10, '2019-09-30 15:05:38', '2019-09-30 15:05:38', NULL, NULL, '/api/getAllApis', '获取所有api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (11, '2019-09-30 15:23:09', '2019-09-30 15:23:09', NULL, NULL, '/authority/createAuthority', '创建角色', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (12, '2019-09-30 15:23:33', '2019-09-30 15:23:33', NULL, NULL, '/authority/deleteAuthority', '删除角色', 'authority', 'POST');
@ -4171,7 +4171,7 @@ INSERT INTO `sys_apis` VALUES (17, '2019-09-30 15:25:25', '2019-09-30 15:25:25',
INSERT INTO `sys_apis` VALUES (18, '2019-09-30 15:25:53', '2019-09-30 15:25:53', NULL, NULL, '/menu/addMenuAuthority', '增加menu和角色关联关系', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (19, '2019-09-30 15:26:20', '2019-09-30 15:26:20', NULL, NULL, '/menu/getMenuAuthority', '获取指定角色menu', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (20, '2019-09-30 15:26:43', '2019-09-30 15:26:43', NULL, NULL, '/menu/deleteBaseMenu', '删除菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (21, '2019-09-30 15:28:05', '2019-09-30 15:28:05', NULL, NULL, '/menu/updataBaseMenu', '更新菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (21, '2019-09-30 15:28:05', '2019-09-30 15:28:05', NULL, NULL, '/menu/updateBaseMenu', '更新菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (22, '2019-09-30 15:28:21', '2019-09-30 15:28:21', NULL, NULL, '/menu/getBaseMenuById', '根据id获取菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (23, '2019-09-30 15:29:19', '2019-09-30 15:29:19', NULL, NULL, '/user/changePassword', '修改密码', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (24, '2019-09-30 15:29:33', '2019-09-30 15:29:33', NULL, NULL, '/user/uploadHeaderImg', '上传头像', 'user', 'POST');
@ -4180,7 +4180,7 @@ INSERT INTO `sys_apis` VALUES (28, '2019-10-09 15:15:17', '2019-10-09 15:17:07',
INSERT INTO `sys_apis` VALUES (29, '2019-10-09 23:01:40', '2019-10-09 23:01:40', NULL, NULL, '/user/setUserAuthority', '修改用户角色', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (30, '2019-10-26 20:14:38', '2019-10-26 20:14:38', NULL, NULL, '/fileUploadAndDownload/upload', '文件上传示例', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (31, '2019-10-26 20:14:59', '2019-10-26 20:14:59', NULL, NULL, '/fileUploadAndDownload/getFileList', '获取上传文件列表', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (32, '2019-12-12 13:28:47', '2019-12-12 13:28:47', NULL, NULL, '/casbin/casbinPUpdata', '更改角色api权限', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (32, '2019-12-12 13:28:47', '2019-12-12 13:28:47', NULL, NULL, '/casbin/casbinPUpdate', '更改角色api权限', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (33, '2019-12-12 13:28:59', '2019-12-12 13:28:59', NULL, NULL, '/casbin/getPolicyPathByAuthorityId', '获取权限列表', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (34, '2019-12-12 17:02:15', '2019-12-12 17:02:15', NULL, NULL, '/fileUploadAndDownload/deleteFile', '删除文件', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (35, '2019-12-28 18:18:07', '2019-12-28 18:18:07', NULL, NULL, '/jwt/jsonInBlacklist', 'jwt加入黑名单', 'jwt', 'POST');
@ -4188,7 +4188,7 @@ INSERT INTO `sys_apis` VALUES (36, '2020-01-06 17:56:36', '2020-01-06 17:56:36',
INSERT INTO `sys_apis` VALUES (37, '2020-01-13 14:04:05', '2020-01-13 14:04:05', NULL, NULL, '/system/getSystemConfig', '获取配置文件内容', 'system', 'POST');
INSERT INTO `sys_apis` VALUES (38, '2020-01-13 15:02:06', '2020-01-13 15:02:06', NULL, NULL, '/system/setSystemConfig', '设置配置文件内容', 'system', 'POST');
INSERT INTO `sys_apis` VALUES (39, '2020-02-25 15:32:39', '2020-02-25 15:32:39', NULL, NULL, '/customer/createExaCustomer', '创建客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (40, '2020-02-25 15:32:51', '2020-02-25 15:34:56', NULL, NULL, '/customer/updataExaCustomer', '更新客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (40, '2020-02-25 15:32:51', '2020-02-25 15:34:56', NULL, NULL, '/customer/updateExaCustomer', '更新客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (41, '2020-02-25 15:33:57', '2020-02-25 15:33:57', NULL, NULL, '/customer/deleteExaCustomer', '删除客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (42, '2020-02-25 15:36:48', '2020-02-25 15:37:16', NULL, NULL, '/customer/getExaCustomer', '获取单一客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (43, '2020-02-25 15:37:06', '2020-02-25 15:37:06', NULL, NULL, '/customer/getExaCustomerList', '获取客户列表', 'customer', 'POST');

8
QMPlusServer/docs/docs.go

@ -209,7 +209,7 @@ var doc = `{
}
}
},
"/api/updataApi": {
"/api/updateApi": {
"post": {
"security": [
{
@ -559,7 +559,7 @@ var doc = `{
}
}
},
"/casbin/casbinPUpdata": {
"/casbin/casbinPUpdate": {
"post": {
"security": [
{
@ -793,7 +793,7 @@ var doc = `{
}
}
},
"/customer/updataExaCustomer": {
"/customer/updateExaCustomer": {
"post": {
"security": [
{
@ -1345,7 +1345,7 @@ var doc = `{
}
}
},
"/menu/updataBaseMen": {
"/menu/updateBaseMen": {
"post": {
"security": [
{

8
QMPlusServer/docs/swagger.json

@ -192,7 +192,7 @@
}
}
},
"/api/updataApi": {
"/api/updateApi": {
"post": {
"security": [
{
@ -542,7 +542,7 @@
}
}
},
"/casbin/casbinPUpdata": {
"/casbin/casbinPUpdate": {
"post": {
"security": [
{
@ -776,7 +776,7 @@
}
}
},
"/customer/updataExaCustomer": {
"/customer/updateExaCustomer": {
"post": {
"security": [
{
@ -1328,7 +1328,7 @@
}
}
},
"/menu/updataBaseMen": {
"/menu/updateBaseMen": {
"post": {
"security": [
{

8
QMPlusServer/docs/swagger.yaml

@ -420,7 +420,7 @@ paths:
summary: 分页获取API列表
tags:
- SysApi
/api/updataApi:
/api/updateApi:
post:
consumes:
- application/json
@ -636,7 +636,7 @@ paths:
summary: casb RBAC RESTFUL测试路由
tags:
- casbin
/casbin/casbinPUpdata:
/casbin/casbinPUpdate:
post:
consumes:
- application/json
@ -780,7 +780,7 @@ paths:
summary: 获取权限客户列表
tags:
- SysApi
/customer/updataExaCustomer:
/customer/updateExaCustomer:
post:
consumes:
- application/json
@ -1118,7 +1118,7 @@ paths:
summary: 分页获取基础menu列表
tags:
- menu
/menu/updataBaseMen:
/menu/updateBaseMen:
post:
consumes:
- application/json

2
QMPlusServer/model/dbModel/exa_customer.go

@ -30,7 +30,7 @@ func (e *ExaCustomer)DeleteExaCustomer()(err error){
}
//更新用户
func (e *ExaCustomer)UpdataExaCustomer()(err error){
func (e *ExaCustomer)UpdateExaCustomer()(err error){
err = qmsql.DEFAULTDB.Save(e).Error
return err
}

4
QMPlusServer/model/sysModel/sys_api.go

@ -35,7 +35,7 @@ func (a *SysApi) DeleteApi() (err error) {
}
//更新api
func (a *SysApi) UpdataApi() (err error) {
func (a *SysApi) UpdateApi() (err error) {
var oldA SysApi
flag := qmsql.DEFAULTDB.Where("path = ?", a.Path).RecordNotFound()
if !flag {
@ -45,7 +45,7 @@ func (a *SysApi) UpdataApi() (err error) {
if err != nil {
return err
} else {
err = new(CasbinModel).CasbinApiUpdata(oldA.Path, a.Path)
err = new(CasbinModel).CasbinApiUpdate(oldA.Path, a.Path)
if err != nil {
return err
} else {

2
QMPlusServer/model/sysModel/sys_base_menu.go

@ -48,7 +48,7 @@ func (b *SysBaseMenu) DeleteBaseMenu(id float64) (err error) {
}
//更新路由
func (b *SysBaseMenu) UpdataBaseMenu() (err error) {
func (b *SysBaseMenu) UpdateBaseMenu() (err error) {
upDataMap := make(map[string]interface{})
upDataMap["parent_id"] = b.ParentId
upDataMap["path"] = b.Path

4
QMPlusServer/model/sysModel/sys_casbin.go

@ -31,7 +31,7 @@ type CasbinInReceive struct {
}
// 更新权限
func (c *CasbinModel) CasbinPUpdata(AuthorityId string, casbinInfos []CasbinInfo) error {
func (c *CasbinModel) CasbinPUpdate(AuthorityId string, casbinInfos []CasbinInfo) error {
c.clearCasbin(0, AuthorityId)
for _, v := range casbinInfos {
cm := CasbinModel{
@ -50,7 +50,7 @@ func (c *CasbinModel) CasbinPUpdata(AuthorityId string, casbinInfos []CasbinInfo
}
// API更新随动
func (c *CasbinModel) CasbinApiUpdata(oldPath string, newPath string) error {
func (c *CasbinModel) CasbinApiUpdate(oldPath string, newPath string) error {
var cs []CasbinModel
err := qmsql.DEFAULTDB.Table("casbin_rule").Where("v1 = ?", oldPath).Find(&cs).Update("v1", newPath).Error
return err

2
QMPlusServer/router/exp_customer.go

@ -10,7 +10,7 @@ func InitCustomerRouter(Router *gin.RouterGroup) {
ApiRouter := Router.Group("customer").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
{
ApiRouter.POST("createExaCustomer", api.CreateExaCustomer) // 创建客户
ApiRouter.POST("updataExaCustomer", api.UpdataExaCustomer) // 更新客户
ApiRouter.POST("updateExaCustomer", api.UpdateExaCustomer) // 更新客户
ApiRouter.POST("deleteExaCustomer", api.DeleteExaCustomer) // 删除客户
ApiRouter.POST("getExaCustomer", api.GetExaCustomer) // 获取单一客户信息
ApiRouter.POST("getExaCustomerList", api.GetExaCustomerList) // 获取客户列表

2
QMPlusServer/router/sys_api.go

@ -13,7 +13,7 @@ func InitApiRouter(Router *gin.RouterGroup) {
ApiRouter.POST("deleteApi", api.DeleteApi) //删除Api
ApiRouter.POST("getApiList", api.GetApiList) //获取Api列表
ApiRouter.POST("getApiById", api.GetApiById) //获取单条Api消息
ApiRouter.POST("updataApi", api.UpdataApi) //更新api
ApiRouter.POST("updateApi", api.UpdateApi) //更新api
ApiRouter.POST("getAllApis", api.GetAllApis) // 获取所有api
}
}

2
QMPlusServer/router/sys_casbin.go

@ -9,7 +9,7 @@ import (
func InitCasbinRouter(Router *gin.RouterGroup) {
CasbinRouter := Router.Group("casbin").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
{
CasbinRouter.POST("casbinPUpdata", api.CasbinPUpdata)
CasbinRouter.POST("casbinPUpdate", api.CasbinPUpdate)
CasbinRouter.POST("getPolicyPathByAuthorityId", api.GetPolicyPathByAuthorityId)
CasbinRouter.GET("casbinTest/:pathParam", api.CasbinTest)
}

2
QMPlusServer/router/sys_menu.go

@ -16,7 +16,7 @@ func InitMenuRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
MenuRouter.POST("addMenuAuthority", api.AddMenuAuthority) // 增加menu和角色关联关系
MenuRouter.POST("getMenuAuthority", api.GetMenuAuthority) // 获取指定角色menu
MenuRouter.POST("deleteBaseMenu", api.DeleteBaseMenu) // 删除菜单
MenuRouter.POST("updataBaseMenu", api.UpdataBaseMenu) // 更新菜单
MenuRouter.POST("updateBaseMenu", api.UpdateBaseMenu) // 更新菜单
MenuRouter.POST("getBaseMenuById", api.GetBaseMenuById) //根据id获取菜单
}
return MenuRouter

6
QMPlusVuePage/src/api/api.js

@ -61,10 +61,10 @@ export const getApiById = (data) => {
// @Produce application/json
// @Param data body api.CreateApiParams true "更新api"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /api/updataApi [post]
export const updataApi = (data) => {
// @Router /api/updateApi [post]
export const updateApi = (data) => {
return service({
url: "/api/updataApi",
url: "/api/updateApi",
method: 'post',
data
})

6
QMPlusVuePage/src/api/casbin.js

@ -7,11 +7,11 @@ import service from '@/utils/request'
// @Produce application/json
// @Param data body api.CreateAuthorityPatams true "更改角色api权限"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/casbinPUpdata [post]
// @Router /casbin/casbinPUpdate [post]
export const casbinPUpdata = (data) => {
export const casbinPUpdate = (data) => {
return service({
url: "/casbin/casbinPUpdata",
url: "/casbin/casbinPUpdate",
method: 'post',
data
})

6
QMPlusVuePage/src/api/customer.js

@ -25,10 +25,10 @@ export const createExaCustomer = (data) => {
// @Produce application/json
// @Param data body dbModel.ExaCustomer true "更新客户信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/updataExaCustomer [post]
export const updataExaCustomer = (data) => {
// @Router /customer/updateExaCustomer [post]
export const updateExaCustomer = (data) => {
return service({
url: "/customer/updataExaCustomer",
url: "/customer/updateExaCustomer",
method: 'post',
data
})

6
QMPlusVuePage/src/api/menu.js

@ -90,10 +90,10 @@ export const deleteBaseMenu = (data) => {
// @Summary 修改menu列表
// @Produce application/json
// @Param menu Object
// @Router /menu/updataBaseMenu [post]
export const updataBaseMenu = (data) => {
// @Router /menu/updateBaseMenu [post]
export const updateBaseMenu = (data) => {
return service({
url: "/menu/updataBaseMenu",
url: "/menu/updateBaseMenu",
method: 'post',
data
})

8
QMPlusVuePage/src/view/example/customer/customer.vue

@ -25,7 +25,7 @@
<el-table-column label="接入人ID" prop="sysUserId" width="120"></el-table-column>
<el-table-column label="按钮组">
<template slot-scope="scope">
<el-button @click="updataCustomer(scope.row)" size="small" type="text">变更</el-button>
<el-button @click="updateCustomer(scope.row)" size="small" type="text">变更</el-button>
<el-popover
placement="top"
width="160"
@ -74,7 +74,7 @@
import {
createExaCustomer,
updataExaCustomer,
updateExaCustomer,
deleteExaCustomer,
getExaCustomer,
getExaCustomerList
@ -113,7 +113,7 @@ export default {
}
},
methods:{
async updataCustomer(row){
async updateCustomer(row){
const res = await getExaCustomer(row)
this.type = "update"
if(res.success){
@ -138,7 +138,7 @@ export default {
res =await createExaCustomer(this.form)
break;
case "update":
res =await updataExaCustomer(this.form)
res =await updateExaCustomer(this.form)
break;
default:
res =await createExaCustomer(this.form)

4
QMPlusVuePage/src/view/superAdmin/api/api.vue

@ -103,7 +103,7 @@ import {
getApiById,
getApiList,
createApi,
updataApi,
updateApi,
deleteApi
} from '@/api/api'
import infoList from '@/components/mixins/infoList'
@ -231,7 +231,7 @@ export default {
break
case 'edit':
{
const res = await updataApi(this.form)
const res = await updateApi(this.form)
if (res.success) {
this.$message({
type: 'success',

4
QMPlusVuePage/src/view/superAdmin/authority/components/apis.vue

@ -17,7 +17,7 @@
</template>
<script>
import { getAllApis } from '@/api/api'
import { casbinPUpdata, getPolicyPathByAuthorityId } from '@/api/casbin'
import { casbinPUpdate, getPolicyPathByAuthorityId } from '@/api/casbin'
export default {
name: 'Apis',
props: {
@ -72,7 +72,7 @@ export default {
}
casbinInfos.push(casbinInfo)
})
const res = await casbinPUpdata({
const res = await casbinPUpdate({
authorityId: this.activeUserId,
casbinInfos
})

4
QMPlusVuePage/src/view/superAdmin/menu/menu.vue

@ -75,7 +75,7 @@
// mixins getTableData
import {
updataBaseMenu,
updateBaseMenu,
getMenuList,
addBaseMenu,
deleteBaseMenu,
@ -186,7 +186,7 @@ export default {
let res
this.form.name = this.form.path
if (this.isEdit) {
res = await updataBaseMenu(this.form)
res = await updateBaseMenu(this.form)
} else {
res = await addBaseMenu(this.form)
}

Loading…
Cancel
Save