| | |
| | | return ecode.OK |
| | | } |
| | | |
| | | func (QuotationService) GetQuotationList() ([]*model.Quotation, int) { |
| | | list, err := model.NewQuotationSearch().FindAll() |
| | | if err != nil { |
| | | return nil, ecode.QuotationListErr |
| | | } |
| | | |
| | | return list, ecode.OK |
| | | } |
| | | |
| | | func (QuotationService) UpdateQuotation(quotation *model.Quotation) int { |
| | | // check quotation exist |
| | | _, err := model.NewQuotationSearch().SetId(quotation.Id).Find() |
| | |
| | | |
| | | return ecode.OK |
| | | } |
| | | |
| | | func (QuotationService) GetQuotationList(page, pageSize int, keyword string) ([]*model.Quotation, int) { |
| | | // get contact list |
| | | contacts, err := model.NewQuotationSearch().SetKeyword(keyword).SetPage(page, pageSize).FindAll() |
| | | if err != nil { |
| | | return nil, ecode.QuotationListErr |
| | | } |
| | | return contacts, ecode.OK |
| | | } |