From 5421f9d925a15eddfcaf356839ee1a180b36689a Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 25 八月 2023 14:01:35 +0800 Subject: [PATCH] Merge branch 'hotfix' --- service/serviceOrder.go | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/service/serviceOrder.go b/service/serviceOrder.go index cdfe5d9..298afb2 100644 --- a/service/serviceOrder.go +++ b/service/serviceOrder.go @@ -30,13 +30,23 @@ return ecode.OK } -func (ServiceOrderService) GetServiceOrderList(page, pageSize int, queryClass constvar.ServiceOrderQueryClass, keywordType constvar.ServiceOrderKeywordType, keyword string) ([]*model.ServiceOrder, int64, int) { +func (ServiceOrderService) BatchDeleteServiceOrder(ids []int) int { + err := model.NewServiceOrderSearch().DeleteByIds(ids) + if err != nil { + return ecode.DBErr + } + return ecode.OK +} + +func (ServiceOrderService) GetServiceOrderList(page, pageSize int, queryClass constvar.ServiceOrderQueryClass, keywordType constvar.ServiceOrderKeywordType, keyword string, serviceContractId, salesDetailsId int) ([]*model.ServiceOrder, int64, int) { list, total, err := model.NewServiceOrderSearch(). SetPage(page, pageSize). SetKeyword(keyword). SetKeywordType(keywordType). SetQueryClass(queryClass). SetPreload(true). + SetServiceContractId(serviceContractId). + SetSalesDetailsId(salesDetailsId). Find() if err != nil { return nil, 0, ecode.DBErr -- Gitblit v1.8.0