| | |
| | | ctx.Ok() |
| | | } |
| | | |
| | | |
| | | // checkQuotationParams |
| | | func checkQuotationParams(quotation request.Quotation) (int, model.Quotation) { |
| | | var errCode int |
| | |
| | | return errCode, quotationModel |
| | | } |
| | | |
| | | // 将时间字符转换为时间类型 |
| | | |
| | | quotationModel.ValidityDate = t |
| | | quotationModel.ClientId = quotation.ClientId |
| | | quotationModel.QuotationStatusId = quotation.QuotationStatusId |
| | |
| | | return |
| | | } |
| | | |
| | | quotations, total, errCode := quotationService.GetQuotationList(params.Page, params.PageSize, params.Keyword) |
| | | quotations, total, errCode := quotationService.GetQuotationList(params.Page, params.PageSize, params.SearchMap) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | ctx.OkWithDetailed(response.QuotationResponse{ |
| | | List: quotations, |
| | | List: quotations, |
| | | Count: int(total), |
| | | }) |
| | | } |
| | | } |