|
whereSql = fmt.Sprintf(" where %s", strings.Join(orderSql, " and "))
|
|
whereSql = fmt.Sprintf(" where %s", strings.Join(orderSql, " and "))
|
|
- sql := fmt.Sprintf(sqlWhere, " a.id,\n a.order_code,\n a.personPhone,\n a.personName,\n a.create_time,\n a.order_money,\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 e.contract_status,\n DATE(e.contract_time) as contract_time,\n e.contract_archive_status,\n DATE(e.contract_archive_time) as contract_archive_time,\n h.name as ent_user_name", productSql, channelSql, whereSql)
|
|
|
|
|
|
+ sql := fmt.Sprintf(sqlWhere, " a.id,\n a.is_backstage_order, a.order_code,\n a.personPhone,\n a.personName,\n a.create_time,\n a.order_money,\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 e.contract_status,\n DATE(e.contract_time) as contract_time,\n e.contract_archive_status,\n DATE(e.contract_archive_time) as contract_archive_time,\n h.name as ent_user_name", productSql, channelSql, whereSql)
|
|
sqlCount := fmt.Sprintf(sqlWhere, " count(1) ", productSql, channelSql, whereSql)
|
|
sqlCount := fmt.Sprintf(sqlWhere, " count(1) ", productSql, channelSql, whereSql)
|