| | |
| | | return ecode.OK |
| | | } |
| | | |
| | | func (MasterOrderService) GetMasterOrderList() ([]*model.MasterOrder, int) { |
| | | list, err := model.NewMasterOrderSearch().FindAll() |
| | | if err != nil { |
| | | return nil, ecode.MasterOrderListErr |
| | | } |
| | | |
| | | return list, ecode.OK |
| | | } |
| | | |
| | | func (MasterOrderService) UpdateMasterOrder(masterOrder *model.MasterOrder) int { |
| | | // check masterOrder exist |
| | | _, err := model.NewMasterOrderSearch().SetId(masterOrder.Id).Find() |
| | |
| | | |
| | | return ecode.OK |
| | | } |
| | | |
| | | func (MasterOrderService) GetMasterOrderList(page, pageSize int, keyword string) ([]*model.MasterOrder, int) { |
| | | // get contact list |
| | | contacts, err := model.NewMasterOrderSearch().SetKeyword(keyword).SetPage(page, pageSize).FindAll() |
| | | if err != nil { |
| | | return nil, ecode.MasterOrderListErr |
| | | } |
| | | return contacts, ecode.OK |
| | | } |