updata->update

Updata->Update
This commit is contained in:
rainyan
2020-04-02 20:35:19 +08:00
parent abc88cdbe0
commit 40ef40afa8
24 changed files with 74 additions and 74 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {