Ver Fonte

fix:sql修改

duxin há 3 meses atrás
pai
commit
f4f71c6974
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      internal/logic/order/list.go

+ 1 - 1
internal/logic/order/list.go

@@ -172,7 +172,7 @@ LEFT JOIN (
 WHERE 
     %s`
 	sql := fmt.Sprintf(sqlWhere, " a.id,\n  a.order_code,\n  a.create_time,\n  a.company_name,\n    a.user_phone,\n    a.user_nickname,\n    a.buy_subject,\n    a.audit_status,\n    a.order_status,\n    a.pay_money - IFNULL(g.orderMoney, 0) as pay_money,\n    a.commission,\n    a.return_status,\n    IFNULL(c.return_money, 0) as return_money,\n    IFNULL(b.invoiced_amount, 0) as invoiced_amount,\n    a.refund_status,\n    IFNULL(d.refund_money, 0) as refund_money,\n    f.ent_userId,\n    e.contract_status,\n    e.contract_time,\n    e.contract_archive_status,\n    e.contract_archive_time,\n    (SELECT id FROM jy_order_detail where order_code = a.order_code order by final_price desc, id desc LIMIT 1) as order_detail_id  ", adminId, strings.Join(orderSql, " and "))
-	sqlCount := fmt.Sprintf(sqlWhere, " * ", adminId, strings.Join(orderSql, " and "))
+	sqlCount := fmt.Sprintf(sqlWhere, " count(1) ", adminId, strings.Join(orderSql, " and "))
 
 	log.Println("list count sql :", sqlCount)
 	log.Println("list sql :", sql)