陈少旭 5 months ago
parent
commit
fa4b439307

+ 1 - 1
controllers/admin_api_controllers/admin_api_router_register.go View File

18
 	beego.Router("/admin/api/custom/list", &CustomAPIController{}, "get:GetCustomList")
18
 	beego.Router("/admin/api/custom/list", &CustomAPIController{}, "get:GetCustomList")
19
 	beego.Router("/admin/api/custom/get", &CustomAPIController{}, "get:GetCustom")
19
 	beego.Router("/admin/api/custom/get", &CustomAPIController{}, "get:GetCustom")
20
 	beego.Router("/admin/api/custom/check", &CustomAPIController{}, "post:CheckCustom")
20
 	beego.Router("/admin/api/custom/check", &CustomAPIController{}, "post:CheckCustom")
21
-	beego.Router("/admin/api/custom/delete", &CustomAPIController{}, "post:CheckCustom")
21
+	beego.Router("/admin/api/custom/delete", &CustomAPIController{}, "post:DeleteCustom")
22
 
22
 
23
 	//beego.Router("/admin/api/checkcustom/get", &CustomAPIController{}, "get:GetWaitCheckCustom")
23
 	//beego.Router("/admin/api/checkcustom/get", &CustomAPIController{}, "get:GetWaitCheckCustom")
24
 
24
 

+ 1 - 1
service/custom_service.go View File

18
 }
18
 }
19
 
19
 
20
 func SaveCustomTwo(admin models.KyyChargeCustomThree) (err error) {
20
 func SaveCustomTwo(admin models.KyyChargeCustomThree) (err error) {
21
-	err = ChargeWriteDB().Model(&models.KyyChargeCustomThree{}).Create(&admin).Error
21
+	err = ChargeWriteDB().Model(&models.KyyChargeCustomThree{}).Save(&admin).Error
22
 	return
22
 	return
23
 }
23
 }
24
 func GetAllCustoms() (cus []*models.KyyChargeCustom, err error) {
24
 func GetAllCustoms() (cus []*models.KyyChargeCustom, err error) {