|
@@ -210,7 +210,7 @@ func (m *GoodsDAO) GetCustomerOrders(custID string, page, pageSize int) ([]Order
|
210
|
210
|
sql := `select a.*, c.case_name from ta_goods_orders a
|
211
|
211
|
inner join sys_case c on a.case_id=c.case_id
|
212
|
212
|
where a.user_id='` + custID +
|
213
|
|
- `' and a.user_type='` + USERTYPE_CUSTOMER + `' and b.status=` + strconv.Itoa(models.STATUS_NORMAL) + ` and a.status=` + strconv.Itoa(models.STATUS_NORMAL)
|
|
213
|
+ `' and a.user_type='` + USERTYPE_CUSTOMER + `' and c.status=` + strconv.Itoa(models.STATUS_NORMAL) + ` and a.status=` + strconv.Itoa(models.STATUS_NORMAL)
|
214
|
214
|
sql += ` order by a.create_date desc limit ` + strconv.Itoa((page-1)*pageSize) + `, ` + strconv.Itoa(pageSize)
|
215
|
215
|
err := m.db.Sql(sql).Find(&orderList)
|
216
|
216
|
if err != nil {
|
|
@@ -232,7 +232,7 @@ func (m *GoodsDAO) GetCustomerOrdersCount(custID string) (int, error) {
|
232
|
232
|
sql := `select a.*, c.case_name from ta_goods_orders a
|
233
|
233
|
inner join sys_case c on a.case_id=c.case_id
|
234
|
234
|
where a.user_id='` + custID +
|
235
|
|
- `' and a.user_type='` + USERTYPE_CUSTOMER + `' and b.status=` + strconv.Itoa(models.STATUS_NORMAL) + ` and a.status=` + strconv.Itoa(models.STATUS_NORMAL)
|
|
235
|
+ `' and a.user_type='` + USERTYPE_CUSTOMER + `' and c.status=` + strconv.Itoa(models.STATUS_NORMAL) + ` and a.status=` + strconv.Itoa(models.STATUS_NORMAL)
|
236
|
236
|
err := m.db.Sql(sql).Find(&orderList)
|
237
|
237
|
if err != nil {
|
238
|
238
|
return 0, err
|