From fbb3b8c3eb3b48772dc1123561e68741d05dfffa Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 30 八月 2023 13:31:35 +0800
Subject: [PATCH] 统一记录编号
---
service/saleChance.go | 24 +++++++++---------------
1 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/service/saleChance.go b/service/saleChance.go
index 2c62a4f..1610c07 100644
--- a/service/saleChance.go
+++ b/service/saleChance.go
@@ -15,21 +15,6 @@
return ecode.OK
}
-func (SaleChanceService) DeleteSaleChance(id int) int {
- // check saleChange exist
- _, err := model.NewSaleChanceSearch().SetId(id).Find()
- if err != nil {
- return ecode.SaleChanceNotExist
- }
-
- // delete saleChange
- err = model.NewSaleChanceSearch().SetId(id).Delete()
- if err != nil {
- return ecode.SaleChanceDeleteErr
- }
- return ecode.OK
-}
-
func (SaleChanceService) UpdateSaleChance(saleChange *model.SaleChance) int {
// update saleChange
err := model.NewSaleChanceSearch().SetId(saleChange.Id).Update(saleChange)
@@ -84,3 +69,12 @@
return ecode.OK
}
+
+func (SaleChanceService) DeleteSaleChance(ids []int) int {
+ // delete client
+ err := model.NewSaleChanceSearch().SetIds(ids).Delete()
+ if err != nil {
+ return ecode.SaleChanceDeleteErr
+ }
+ return ecode.OK
+}
--
Gitblit v1.8.0