| | |
| | | return ecode.DBErr |
| | | } |
| | | |
| | | err = model.NewInvoiceTypeSearch().SetId(v.Id).Updates(map[string]interface{}{ |
| | | |
| | | }) |
| | | err = model.NewInvoiceTypeSearch().SetId(v.Id).Updates(map[string]interface{}{}) |
| | | if err != nil { |
| | | return ecode.DBErr |
| | | } |
| | |
| | | } |
| | | |
| | | func (InvoiceTypeService) UpdateInvoiceType(invoiceType *model.InvoiceType) int { |
| | | err := model.NewInvoiceTypeSearch().SetId(invoiceType.Id).Save(invoiceType) |
| | | if err != nil { |
| | | return ecode.DBErr |
| | | } |
| | | err := model.NewInvoiceTypeSearch().SetId(invoiceType.Id).Update(invoiceType) |
| | | if err != nil { |
| | | return ecode.DBErr |
| | | } |
| | | return ecode.OK |
| | | } |