|
@@ -149,15 +149,16 @@ func (this *CustomAPIController) GetCustomList() {
|
149
|
149
|
"list": list,
|
150
|
150
|
})
|
151
|
151
|
}
|
152
|
|
-func (this *CustomAPIController) DeleteCustom() {
|
153
|
|
- id, _ := this.GetInt64("id")
|
154
|
|
- err := service.DeleteAdmin(id)
|
155
|
|
- if err == nil {
|
156
|
|
- this.ServeSuccessJSON(map[string]interface{}{
|
157
|
|
- "msg": "删除成功",
|
158
|
|
- })
|
159
|
|
- }
|
160
|
|
-}
|
|
152
|
+
|
|
153
|
+// func (this *CustomAPIController) DeleteAdmin() {
|
|
154
|
+// id, _ := this.GetInt64("id")
|
|
155
|
+// err := service.DeleteAdmin(id)
|
|
156
|
+// if err == nil {
|
|
157
|
+// this.ServeSuccessJSON(map[string]interface{}{
|
|
158
|
+// "msg": "删除成功",
|
|
159
|
+// })
|
|
160
|
+// }
|
|
161
|
+// }
|
161
|
162
|
func (this *CustomAPIController) ModifyCustom() {
|
162
|
163
|
id, _ := this.GetInt64("id")
|
163
|
164
|
module, _ := this.GetInt64("module")
|
|
@@ -457,6 +458,25 @@ func (this *CustomAPIController) EditPaymentCollection() {
|
457
|
458
|
})
|
458
|
459
|
|
459
|
460
|
}
|
|
461
|
+
|
|
462
|
+func (this *CustomAPIController) DeleteCustom() {
|
|
463
|
+ id, _ := this.GetInt64("id")
|
|
464
|
+ ct, _ := service.FindCustomInfoByIDTwo(id)
|
|
465
|
+ if ct.ID == 0 {
|
|
466
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
467
|
+ return
|
|
468
|
+ }
|
|
469
|
+ ct.Status = 0
|
|
470
|
+ err := service.SaveCustomTwo(ct)
|
|
471
|
+ if err != nil {
|
|
472
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
473
|
+ return
|
|
474
|
+ }
|
|
475
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
476
|
+ "msg": "删除成功",
|
|
477
|
+ })
|
|
478
|
+}
|
|
479
|
+
|
460
|
480
|
func (this *CustomAPIController) DeletePaymentCollection() {
|
461
|
481
|
id, _ := this.GetInt64("id")
|
462
|
482
|
cpc, _ := service.FindPaymentCollectionInfo(id)
|