add
wangpengfei
2023-08-17 08d858716ad674ebe81e9c11c62c9ec4b6ce8d87
service/quotation.go
@@ -16,19 +16,6 @@
   return ecode.OK
}
func (QuotationService) DeleteQuotation(id int) int {
   _, err := model.NewQuotationSearch().SetId(id).Find()
   if err != nil {
      return ecode.QuotationNotExist
   }
   err = model.NewQuotationSearch().SetId(id).Delete()
   if err != nil {
      return ecode.QuotationNotExist
   }
   return ecode.OK
}
func (QuotationService) UpdateQuotation(quotation *model.Quotation) int {
   // check quotation exist
   _, err := model.NewQuotationSearch().SetId(quotation.Id).Find()
@@ -52,3 +39,12 @@
   }
   return contacts, total, ecode.OK
}
func (QuotationService) DeleteQuotation(ids []int) int {
   // delete client
   err := model.NewQuotationSearch().SetIds(ids).Delete()
   if err != nil {
      return ecode.QuotationDeleteErr
   }
   return ecode.OK
}