正在显示
8 个修改的文件
包含
99 行增加
和
50 行删除
@@ -57,13 +57,13 @@ func (columnSettingService *ColumnSettingService) CreateColumnSetting(createColu | @@ -57,13 +57,13 @@ func (columnSettingService *ColumnSettingService) CreateColumnSetting(createColu | ||
57 | } else { | 57 | } else { |
58 | columnSettingRepository = value | 58 | columnSettingRepository = value |
59 | } | 59 | } |
60 | - if columnSetting, errSaved := columnSettingRepository.Save(newColumnSetting); errSaved != nil { | 60 | + if columnSettingSaved, errSaved := columnSettingRepository.Save(newColumnSetting); errSaved != nil { |
61 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, errSaved.Error()) | 61 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, errSaved.Error()) |
62 | } else { | 62 | } else { |
63 | if errCommit := transactionContext.CommitTransaction(); errCommit != nil { | 63 | if errCommit := transactionContext.CommitTransaction(); errCommit != nil { |
64 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errCommit.Error()) | 64 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errCommit.Error()) |
65 | } | 65 | } |
66 | - return columnSetting, nil | 66 | + return columnSettingSaved, nil |
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
@@ -106,7 +106,16 @@ func (columnSettingService *ColumnSettingService) GetColumnSetting(getColumnSett | @@ -106,7 +106,16 @@ func (columnSettingService *ColumnSettingService) GetColumnSetting(getColumnSett | ||
106 | if errCommit := transactionContext.CommitTransaction(); errCommit != nil { | 106 | if errCommit := transactionContext.CommitTransaction(); errCommit != nil { |
107 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errCommit.Error()) | 107 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errCommit.Error()) |
108 | } | 108 | } |
109 | - return columnSettingFound, nil | 109 | + |
110 | + // 数据mapper | ||
111 | + orderBaseColumns := map[string]interface{}{ | ||
112 | + "orderBaseColumns": map[string]interface{}{ | ||
113 | + "selected": columnSettingFound.Value, | ||
114 | + "unselected": columnSettingFound.InvalidValue, | ||
115 | + }, | ||
116 | + } | ||
117 | + | ||
118 | + return orderBaseColumns, nil | ||
110 | } | 119 | } |
111 | } | 120 | } |
112 | 121 | ||
@@ -188,7 +197,16 @@ func (columnSettingService *ColumnSettingService) RemoveColumnSetting(removeColu | @@ -188,7 +197,16 @@ func (columnSettingService *ColumnSettingService) RemoveColumnSetting(removeColu | ||
188 | if errTr := transactionContext.CommitTransaction(); errTr != nil { | 197 | if errTr := transactionContext.CommitTransaction(); errTr != nil { |
189 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errRm.Error()) | 198 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errRm.Error()) |
190 | } | 199 | } |
191 | - return columnSettingRemoved, nil | 200 | + |
201 | + // 数据mapper | ||
202 | + orderBaseColumns := map[string]interface{}{ | ||
203 | + "orderBaseColumns": map[string]interface{}{ | ||
204 | + "selected": columnSettingRemoved.Value, | ||
205 | + "unselected": columnSettingRemoved.InvalidValue, | ||
206 | + }, | ||
207 | + } | ||
208 | + | ||
209 | + return orderBaseColumns, nil | ||
192 | } | 210 | } |
193 | } | 211 | } |
194 | 212 | ||
@@ -238,7 +256,16 @@ func (columnSettingService *ColumnSettingService) ResetColumn(resetColumnCommand | @@ -238,7 +256,16 @@ func (columnSettingService *ColumnSettingService) ResetColumn(resetColumnCommand | ||
238 | if errCommit := transactionContext.CommitTransaction(); errCommit != nil { | 256 | if errCommit := transactionContext.CommitTransaction(); errCommit != nil { |
239 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errCommit.Error()) | 257 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errCommit.Error()) |
240 | } | 258 | } |
241 | - return columnSettingSaved, nil | 259 | + |
260 | + // 数据mapper | ||
261 | + orderBaseColumns := map[string]interface{}{ | ||
262 | + "orderBaseColumns": map[string]interface{}{ | ||
263 | + "selected": columnSettingSaved.Value, | ||
264 | + "unselected": columnSettingSaved.InvalidValue, | ||
265 | + }, | ||
266 | + } | ||
267 | + | ||
268 | + return orderBaseColumns, nil | ||
242 | } | 269 | } |
243 | } | 270 | } |
244 | 271 | ||
@@ -289,7 +316,16 @@ func (columnSettingService *ColumnSettingService) UpdateColumnSetting(updateColu | @@ -289,7 +316,16 @@ func (columnSettingService *ColumnSettingService) UpdateColumnSetting(updateColu | ||
289 | if errCommit := transactionContext.CommitTransaction(); errCommit != nil { | 316 | if errCommit := transactionContext.CommitTransaction(); errCommit != nil { |
290 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errCommit.Error()) | 317 | return nil, application.ThrowError(application.TRANSACTION_ERROR, errCommit.Error()) |
291 | } | 318 | } |
292 | - return columnSettingSaved, nil | 319 | + |
320 | + // 数据mapper | ||
321 | + orderBaseColumns := map[string]interface{}{ | ||
322 | + "orderBaseColumns": map[string]interface{}{ | ||
323 | + "selected": columnSettingSaved.Value, | ||
324 | + "unselected": columnSettingSaved.InvalidValue, | ||
325 | + }, | ||
326 | + } | ||
327 | + | ||
328 | + return orderBaseColumns, nil | ||
293 | } | 329 | } |
294 | } | 330 | } |
295 | 331 |
@@ -20,6 +20,8 @@ type ListOrderBaseQuery struct { | @@ -20,6 +20,8 @@ type ListOrderBaseQuery struct { | ||
20 | OrderType int `json:"orderType"` | 20 | OrderType int `json:"orderType"` |
21 | //合伙人分类 | 21 | //合伙人分类 |
22 | PartnerCategory int `json:"partnerCategory"` | 22 | PartnerCategory int `json:"partnerCategory"` |
23 | + //合伙人类型名称 | ||
24 | + PartnerCategoryName string `json:"partnerCategoryName"` | ||
23 | //更新时间开始 | 25 | //更新时间开始 |
24 | UpdateTimeBegin string `json:"updateTimeBegin"` | 26 | UpdateTimeBegin string `json:"updateTimeBegin"` |
25 | //更新时间截止 | 27 | //更新时间截止 |
@@ -29,7 +31,7 @@ type ListOrderBaseQuery struct { | @@ -29,7 +31,7 @@ type ListOrderBaseQuery struct { | ||
29 | //创建时间截止 | 31 | //创建时间截止 |
30 | CreateTimeEnd string `json:"createTimeEnd"` | 32 | CreateTimeEnd string `json:"createTimeEnd"` |
31 | //销售时间开始 | 33 | //销售时间开始 |
32 | - SaleDateStart string `json:"saleDateStart"` | 34 | + SaleDateBegin string `json:"saleDateBegin"` |
33 | //销售时间结束 | 35 | //销售时间结束 |
34 | SaleDateEnd string `json:"sateDateEnd"` | 36 | SaleDateEnd string `json:"sateDateEnd"` |
35 | } | 37 | } |
@@ -64,8 +64,9 @@ func (service OrderInfoService) PageListOrderBase(listOrderQuery query.ListOrder | @@ -64,8 +64,9 @@ func (service OrderInfoService) PageListOrderBase(listOrderQuery query.ListOrder | ||
64 | listOrderQuery.DeliveryCode, // 发货单号 | 64 | listOrderQuery.DeliveryCode, // 发货单号 |
65 | [2]string{listOrderQuery.UpdateTimeBegin, listOrderQuery.UpdateTimeEnd}, // 订单创建时间 | 65 | [2]string{listOrderQuery.UpdateTimeBegin, listOrderQuery.UpdateTimeEnd}, // 订单创建时间 |
66 | [2]string{listOrderQuery.CreateTimeBegin, listOrderQuery.CreateTimeEnd}, // 订单更新时间 | 66 | [2]string{listOrderQuery.CreateTimeBegin, listOrderQuery.CreateTimeEnd}, // 订单更新时间 |
67 | - [2]string{listOrderQuery.SaleDateStart, listOrderQuery.SaleDateEnd}, // 销售日期 | 67 | + [2]string{listOrderQuery.SaleDateBegin, listOrderQuery.SaleDateEnd}, // 销售日期 |
68 | listOrderQuery.PartnerCategory, | 68 | listOrderQuery.PartnerCategory, |
69 | + listOrderQuery.PartnerCategoryName, | ||
69 | listOrderQuery.Limit, listOrderQuery.Offset, | 70 | listOrderQuery.Limit, listOrderQuery.Offset, |
70 | ) | 71 | ) |
71 | if err != nil { | 72 | if err != nil { |
@@ -927,7 +928,7 @@ func (service OrderInfoService) ListOrderForExcel(listOrderQuery query.ListOrder | @@ -927,7 +928,7 @@ func (service OrderInfoService) ListOrderForExcel(listOrderQuery query.ListOrder | ||
927 | listOrderQuery.DeliveryCode, // 发货单号 | 928 | listOrderQuery.DeliveryCode, // 发货单号 |
928 | [2]string{listOrderQuery.UpdateTimeBegin, listOrderQuery.UpdateTimeEnd}, | 929 | [2]string{listOrderQuery.UpdateTimeBegin, listOrderQuery.UpdateTimeEnd}, |
929 | [2]string{listOrderQuery.CreateTimeBegin, listOrderQuery.CreateTimeEnd}, | 930 | [2]string{listOrderQuery.CreateTimeBegin, listOrderQuery.CreateTimeEnd}, |
930 | - [2]string{listOrderQuery.SaleDateStart, listOrderQuery.SaleDateEnd}, | 931 | + [2]string{listOrderQuery.SaleDateBegin, listOrderQuery.SaleDateEnd}, |
931 | listOrderQuery.PartnerCategory, | 932 | listOrderQuery.PartnerCategory, |
932 | ) | 933 | ) |
933 | if err != nil { | 934 | if err != nil { |
@@ -330,7 +330,7 @@ type GoodErrInfo struct { | @@ -330,7 +330,7 @@ type GoodErrInfo struct { | ||
330 | 330 | ||
331 | type OrderBaseRepository interface { | 331 | type OrderBaseRepository interface { |
332 | Save(order *OrderBase) error | 332 | Save(order *OrderBase) error |
333 | - FindOne(qureyOptions OrderBaseFindOneQuery) (*OrderBase, error) | 333 | + FindOne(queryOptions OrderBaseFindOneQuery) (*OrderBase, error) |
334 | Find(queryOptions OrderBaseFindQuery) ([]OrderBase, int, error) | 334 | Find(queryOptions OrderBaseFindQuery) ([]OrderBase, int, error) |
335 | Remove(id int64, companyId int64) error | 335 | Remove(id int64, companyId int64) error |
336 | } | 336 | } |
@@ -191,7 +191,7 @@ func (dao OrderBaseDao) OrderBonusListForExcel(companyId int64, orderType int, p | @@ -191,7 +191,7 @@ func (dao OrderBaseDao) OrderBonusListForExcel(companyId int64, orderType int, p | ||
191 | //@param updateTime 订单更新时间范围"[开始时间,结束时间]",时间格式"2006-01-02 15:04:05+07" | 191 | //@param updateTime 订单更新时间范围"[开始时间,结束时间]",时间格式"2006-01-02 15:04:05+07" |
192 | //@param createTime 订单的创建时间范围"[开始时间,结束时间]" 时间格式"2006-01-02 15:04:05+07" | 192 | //@param createTime 订单的创建时间范围"[开始时间,结束时间]" 时间格式"2006-01-02 15:04:05+07" |
193 | func (dao OrderBaseDao) OrderListByCondition(companyId int64, orderType int, partnerName string, orderCode string, deliveryCode string, | 193 | func (dao OrderBaseDao) OrderListByCondition(companyId int64, orderType int, partnerName string, orderCode string, deliveryCode string, |
194 | - updateTime [2]string, createTime [2]string, saleDate [2]string, partnerCategory int, limit, offset int) ([]models.OrderBase, int, error) { | 194 | + updateTime [2]string, createTime [2]string, saleDate [2]string, partnerCategory int, partnerCategoryName string, limit, offset int) ([]models.OrderBase, int, error) { |
195 | tx := dao.transactionContext.GetDB() | 195 | tx := dao.transactionContext.GetDB() |
196 | var orders []models.OrderBase | 196 | var orders []models.OrderBase |
197 | query := tx.Model(&orders).Where("order_base.company_id=?", companyId) | 197 | query := tx.Model(&orders).Where("order_base.company_id=?", companyId) |
@@ -203,6 +203,9 @@ func (dao OrderBaseDao) OrderListByCondition(companyId int64, orderType int, par | @@ -203,6 +203,9 @@ func (dao OrderBaseDao) OrderListByCondition(companyId int64, orderType int, par | ||
203 | if partnerCategory > 0 { | 203 | if partnerCategory > 0 { |
204 | query = query.Where(`order_base.partner_category@>'{"id":?}'`, partnerCategory) | 204 | query = query.Where(`order_base.partner_category@>'{"id":?}'`, partnerCategory) |
205 | } | 205 | } |
206 | + if partnerCategoryName != "" { | ||
207 | + query = query.Where(`order_base.partner_category->>'name' like ?`, "%"+partnerCategoryName+"%") | ||
208 | + } | ||
206 | if len(updateTime[0]) > 0 { | 209 | if len(updateTime[0]) > 0 { |
207 | query = query.Where(`order_base.update_time>=?`, updateTime[0]) | 210 | query = query.Where(`order_base.update_time>=?`, updateTime[0]) |
208 | } | 211 | } |
@@ -215,6 +218,12 @@ func (dao OrderBaseDao) OrderListByCondition(companyId int64, orderType int, par | @@ -215,6 +218,12 @@ func (dao OrderBaseDao) OrderListByCondition(companyId int64, orderType int, par | ||
215 | if len(createTime[1]) > 0 { | 218 | if len(createTime[1]) > 0 { |
216 | query = query.Where(`order_base.create_time<=?`, createTime[1]) | 219 | query = query.Where(`order_base.create_time<=?`, createTime[1]) |
217 | } | 220 | } |
221 | + if len(saleDate[0]) > 0 { | ||
222 | + query = query.Where(`order_base.sale_date>=?`, saleDate[0]) | ||
223 | + } | ||
224 | + if len(saleDate[1]) > 0 { | ||
225 | + query = query.Where(`order_base.sale_date<=?`, saleDate[1]) | ||
226 | + } | ||
218 | if len(partnerName) > 0 { | 227 | if len(partnerName) > 0 { |
219 | query = query.Join("LEFT JOIN partner_info as p ON order_base.partner_id=p.id"). | 228 | query = query.Join("LEFT JOIN partner_info as p ON order_base.partner_id=p.id"). |
220 | Where("p.partner_name like ? ", "%"+partnerName+"%") | 229 | Where("p.partner_name like ? ", "%"+partnerName+"%") |
@@ -38,7 +38,6 @@ func (repository *ColumnSettingRepository) Save(columnSetting *domain.ColumnSett | @@ -38,7 +38,6 @@ func (repository *ColumnSettingRepository) Save(columnSetting *domain.ColumnSett | ||
38 | if err != nil { | 38 | if err != nil { |
39 | return nil, err | 39 | return nil, err |
40 | } | 40 | } |
41 | - return nil, err | ||
42 | //_, err := repository.nextIdentify() | 41 | //_, err := repository.nextIdentify() |
43 | //if err != nil { | 42 | //if err != nil { |
44 | // return columnSetting, err | 43 | // return columnSetting, err |
@@ -23,7 +23,7 @@ func NewOrderBaseRepository(transactionContext *transaction.TransactionContext) | @@ -23,7 +23,7 @@ func NewOrderBaseRepository(transactionContext *transaction.TransactionContext) | ||
23 | return &OrderBaseRepository{transactionContext: transactionContext}, nil | 23 | return &OrderBaseRepository{transactionContext: transactionContext}, nil |
24 | } | 24 | } |
25 | 25 | ||
26 | -func (reponsitory OrderBaseRepository) transformPgModelToDomainModel(orderModel *models.OrderBase) (order domain.OrderBase, err error) { | 26 | +func (repository OrderBaseRepository) transformPgModelToDomainModel(orderModel *models.OrderBase) (order domain.OrderBase, err error) { |
27 | order = domain.OrderBase{ | 27 | order = domain.OrderBase{ |
28 | Id: orderModel.Id, OrderType: orderModel.OrderType, OrderCode: orderModel.OrderCode, | 28 | Id: orderModel.Id, OrderType: orderModel.OrderType, OrderCode: orderModel.OrderCode, |
29 | DeliveryCode: orderModel.DeliveryCode, Buyer: orderModel.Buyer, RegionInfo: orderModel.RegionInfo, | 29 | DeliveryCode: orderModel.DeliveryCode, Buyer: orderModel.Buyer, RegionInfo: orderModel.RegionInfo, |
@@ -50,10 +50,10 @@ func (reponsitory OrderBaseRepository) transformPgModelToDomainModel(orderModel | @@ -50,10 +50,10 @@ func (reponsitory OrderBaseRepository) transformPgModelToDomainModel(orderModel | ||
50 | return order, nil | 50 | return order, nil |
51 | } | 51 | } |
52 | 52 | ||
53 | -func (reponsitory OrderBaseRepository) Save(orderInfo *domain.OrderBase) error { | 53 | +func (repository OrderBaseRepository) Save(orderInfo *domain.OrderBase) error { |
54 | var ( | 54 | var ( |
55 | err error | 55 | err error |
56 | - tx = reponsitory.transactionContext.PgTx | 56 | + tx = repository.transactionContext.PgTx |
57 | ) | 57 | ) |
58 | m := &models.OrderBase{ | 58 | m := &models.OrderBase{ |
59 | Id: orderInfo.Id, OrderType: orderInfo.OrderType, OrderCode: orderInfo.OrderCode, | 59 | Id: orderInfo.Id, OrderType: orderInfo.OrderType, OrderCode: orderInfo.OrderCode, |
@@ -90,8 +90,8 @@ func (reponsitory OrderBaseRepository) Save(orderInfo *domain.OrderBase) error { | @@ -90,8 +90,8 @@ func (reponsitory OrderBaseRepository) Save(orderInfo *domain.OrderBase) error { | ||
90 | return err | 90 | return err |
91 | } | 91 | } |
92 | 92 | ||
93 | -func (reponsitory OrderBaseRepository) Find(queryOption domain.OrderBaseFindQuery) ([]domain.OrderBase, int, error) { | ||
94 | - db := reponsitory.transactionContext.GetDB() | 93 | +func (repository OrderBaseRepository) Find(queryOption domain.OrderBaseFindQuery) ([]domain.OrderBase, int, error) { |
94 | + db := repository.transactionContext.GetDB() | ||
95 | orderModels := []models.OrderBase{} | 95 | orderModels := []models.OrderBase{} |
96 | query := db.Model(&orderModels) | 96 | query := db.Model(&orderModels) |
97 | if queryOption.PartnerId > 0 { | 97 | if queryOption.PartnerId > 0 { |
@@ -127,7 +127,7 @@ func (reponsitory OrderBaseRepository) Find(queryOption domain.OrderBaseFindQuer | @@ -127,7 +127,7 @@ func (reponsitory OrderBaseRepository) Find(queryOption domain.OrderBaseFindQuer | ||
127 | return ordersReturn, 0, err | 127 | return ordersReturn, 0, err |
128 | } | 128 | } |
129 | for i := range orderModels { | 129 | for i := range orderModels { |
130 | - domainOrder, err := reponsitory.transformPgModelToDomainModel(&orderModels[i]) | 130 | + domainOrder, err := repository.transformPgModelToDomainModel(&orderModels[i]) |
131 | if err != nil { | 131 | if err != nil { |
132 | return ordersReturn, 0, err | 132 | return ordersReturn, 0, err |
133 | } | 133 | } |
@@ -136,29 +136,29 @@ func (reponsitory OrderBaseRepository) Find(queryOption domain.OrderBaseFindQuer | @@ -136,29 +136,29 @@ func (reponsitory OrderBaseRepository) Find(queryOption domain.OrderBaseFindQuer | ||
136 | return ordersReturn, count, nil | 136 | return ordersReturn, count, nil |
137 | } | 137 | } |
138 | 138 | ||
139 | -func (reponsitory OrderBaseRepository) FindOne(qureyOptions domain.OrderBaseFindOneQuery) (*domain.OrderBase, error) { | 139 | +func (repository OrderBaseRepository) FindOne(queryOptions domain.OrderBaseFindOneQuery) (*domain.OrderBase, error) { |
140 | var ( | 140 | var ( |
141 | err error | 141 | err error |
142 | - tx = reponsitory.transactionContext.PgDd | 142 | + tx = repository.transactionContext.PgDd |
143 | ) | 143 | ) |
144 | m := new(models.OrderBase) | 144 | m := new(models.OrderBase) |
145 | query := tx.Model(m). | 145 | query := tx.Model(m). |
146 | - Where("id=?", qureyOptions.OrderId) | ||
147 | - if qureyOptions.CompanyId > 0 { | ||
148 | - query = query.Where("company_id=?", qureyOptions.CompanyId) | 146 | + Where("id=?", queryOptions.OrderId) |
147 | + if queryOptions.CompanyId > 0 { | ||
148 | + query = query.Where("company_id=?", queryOptions.CompanyId) | ||
149 | } | 149 | } |
150 | err = query.First() | 150 | err = query.First() |
151 | if err != nil { | 151 | if err != nil { |
152 | return nil, err | 152 | return nil, err |
153 | } | 153 | } |
154 | - result, err := reponsitory.transformPgModelToDomainModel(m) | 154 | + result, err := repository.transformPgModelToDomainModel(m) |
155 | return &result, err | 155 | return &result, err |
156 | } | 156 | } |
157 | 157 | ||
158 | -func (reponsitory OrderBaseRepository) Remove(id int64, companyId int64) error { | 158 | +func (repository OrderBaseRepository) Remove(id int64, companyId int64) error { |
159 | var ( | 159 | var ( |
160 | err error | 160 | err error |
161 | - tx = reponsitory.transactionContext.PgTx | 161 | + tx = repository.transactionContext.PgTx |
162 | ) | 162 | ) |
163 | m := &models.OrderBase{ | 163 | m := &models.OrderBase{ |
164 | Id: id, | 164 | Id: id, |
@@ -160,15 +160,16 @@ func (postData *postOrderPurposeDelivery) Valid() error { | @@ -160,15 +160,16 @@ func (postData *postOrderPurposeDelivery) Valid() error { | ||
160 | **/ | 160 | **/ |
161 | func (c *OrderInfoController) PageListOrderReal() { | 161 | func (c *OrderInfoController) PageListOrderReal() { |
162 | type Parameter struct { | 162 | type Parameter struct { |
163 | - PartnerName string `json:"partnerName"` // 合伙人姓名 | ||
164 | - OrderCode string `json:"orderCode"` // 订单号 | ||
165 | - DeliveryCode string `json:"deliveryCode"` // 发货单号 | ||
166 | - PartnerCategory int `json:"PartnerCategory"` // 合伙人类型id | ||
167 | - PageSize int `json:"pageSize"` | ||
168 | - PageNumber int `json:"pageNumber"` | ||
169 | - UpdateTime []string `json:"updateTime"` // 订单更新时间 | ||
170 | - CreateTime []string `json:"createTime"` // 订单创建时间 | ||
171 | - SaleDate []string `json:"saleDate"` // 销售时间 | 163 | + PartnerName string `json:"partnerName"` // 合伙人姓名 |
164 | + OrderCode string `json:"orderCode"` // 订单号 | ||
165 | + DeliveryCode string `json:"deliveryCode"` // 发货单号 | ||
166 | + PartnerCategory int `json:"partnerCategory"` // 合伙人类型id | ||
167 | + PartnerCategoryName string `json:"partnerCategoryName"` // 合伙人类型名称 | ||
168 | + PageSize int `json:"pageSize"` | ||
169 | + PageNumber int `json:"pageNumber"` | ||
170 | + UpdateTime []string `json:"updateTime"` // 订单更新时间 | ||
171 | + CreateTime []string `json:"createTime"` // 订单创建时间 | ||
172 | + SaleDate []string `json:"saleDate"` // 销售时间 | ||
172 | } | 173 | } |
173 | var ( | 174 | var ( |
174 | param Parameter | 175 | param Parameter |
@@ -269,20 +270,21 @@ func (c *OrderInfoController) PageListOrderReal() { | @@ -269,20 +270,21 @@ func (c *OrderInfoController) PageListOrderReal() { | ||
269 | companyId := c.GetUserCompany() | 270 | companyId := c.GetUserCompany() |
270 | orderSrv := orderService.NewOrderInfoService(nil) | 271 | orderSrv := orderService.NewOrderInfoService(nil) |
271 | orderInfos, cnt, err := orderSrv.PageListOrderBase(orderQuery.ListOrderBaseQuery{ | 272 | orderInfos, cnt, err := orderSrv.PageListOrderBase(orderQuery.ListOrderBaseQuery{ |
272 | - PartnerName: param.PartnerName, | ||
273 | - OrderCode: param.OrderCode, | ||
274 | - DeliveryCode: param.DeliveryCode, | ||
275 | - OrderType: domain.OrderReal, | ||
276 | - Limit: param.PageSize, | ||
277 | - Offset: (param.PageNumber - 1) * param.PageSize, | ||
278 | - CompanyId: companyId, | ||
279 | - PartnerCategory: param.PartnerCategory, | ||
280 | - UpdateTimeBegin: updateTimeBegin, | ||
281 | - UpdateTimeEnd: updateTimeEnd, | ||
282 | - CreateTimeBegin: createTimeBegin, | ||
283 | - CreateTimeEnd: createTimeEnd, | ||
284 | - SaleDateStart: saleDateBegin, | ||
285 | - SaleDateEnd: saleDateEnd, | 273 | + PartnerName: param.PartnerName, |
274 | + OrderCode: param.OrderCode, | ||
275 | + DeliveryCode: param.DeliveryCode, | ||
276 | + OrderType: domain.OrderReal, | ||
277 | + Limit: param.PageSize, | ||
278 | + Offset: (param.PageNumber - 1) * param.PageSize, | ||
279 | + CompanyId: companyId, | ||
280 | + PartnerCategory: param.PartnerCategory, | ||
281 | + PartnerCategoryName: param.PartnerCategoryName, | ||
282 | + UpdateTimeBegin: updateTimeBegin, | ||
283 | + UpdateTimeEnd: updateTimeEnd, | ||
284 | + CreateTimeBegin: createTimeBegin, | ||
285 | + CreateTimeEnd: createTimeEnd, | ||
286 | + SaleDateBegin: saleDateBegin, | ||
287 | + SaleDateEnd: saleDateEnd, | ||
286 | }) | 288 | }) |
287 | if err != nil { | 289 | if err != nil { |
288 | c.ResponseError(err) | 290 | c.ResponseError(err) |
@@ -361,7 +363,7 @@ func (c *OrderInfoController) GetOrderReal() { | @@ -361,7 +363,7 @@ func (c *OrderInfoController) GetOrderReal() { | ||
361 | "product": allGoods, | 363 | "product": allGoods, |
362 | "create_time": orderinfo.CreateTime.Local().Format("2006-01-02 15:04:06"), | 364 | "create_time": orderinfo.CreateTime.Local().Format("2006-01-02 15:04:06"), |
363 | "update_time": orderinfo.UpdateTime.Local().Format("2006-01-02 15:04:06"), | 365 | "update_time": orderinfo.UpdateTime.Local().Format("2006-01-02 15:04:06"), |
364 | - "sale_date": orderinfo.SaleDate.Local().Format("2006-01-02 15:04:06"), | 366 | + "saleDate": orderinfo.SaleDate.Local().Format("2006-01-02 15:04:06"), |
365 | "partnerCategoryId": orderinfo.PartnerCategory.Id, | 367 | "partnerCategoryId": orderinfo.PartnerCategory.Id, |
366 | "partnerCategoryName": orderinfo.PartnerCategory.Name, | 368 | "partnerCategoryName": orderinfo.PartnerCategory.Name, |
367 | } | 369 | } |
-
请 注册 或 登录 后发表评论