合并分支 'dev' 到 'test'
fix:高管分红统计增加时间限制 查看合并请求 !59
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -115,7 +115,7 @@ A left join | @@ -115,7 +115,7 @@ A left join | ||
115 | plan_order_amount amount, | 115 | plan_order_amount amount, |
116 | (case when use_order_count>=0 then use_partner_bonus else plan_partner_bonus end) bonus, | 116 | (case when use_order_count>=0 then use_partner_bonus else plan_partner_bonus end) bonus, |
117 | partner_bonus_expense bonus_expense FROM "order_base" AS "order_base" | 117 | partner_bonus_expense bonus_expense FROM "order_base" AS "order_base" |
118 | - WHERE (partner_id in (?)) and (order_type in (?)) | 118 | + WHERE (partner_id in (?)) and (order_type in (?) and (sale_date < ?) ) |
119 | UNION ALL | 119 | UNION ALL |
120 | SELECT partner_info_id partner_id, | 120 | SELECT partner_info_id partner_id, |
121 | 0 amount, bonus bonus, bonus_expense bonus_expense FROM business_bonus | 121 | 0 amount, bonus bonus, bonus_expense bonus_expense FROM business_bonus |
@@ -132,7 +132,7 @@ GROUP BY partner_id | @@ -132,7 +132,7 @@ GROUP BY partner_id | ||
132 | sql.WriteString(fmt.Sprintf(" \nOFFSET %v", offset)) | 132 | sql.WriteString(fmt.Sprintf(" \nOFFSET %v", offset)) |
133 | } | 133 | } |
134 | } | 134 | } |
135 | - _, err = tx.Query(&statics, sql.String(), pg.In(partnerIds), pg.In(partnerIds), pg.In(domain.UserOrderTypes(domain.Career)), pg.In(partnerIds)) | 135 | + _, err = tx.Query(&statics, sql.String(), pg.In(partnerIds), pg.In(partnerIds), pg.In(domain.UserOrderTypes(domain.Career)), GetDayEnd(), pg.In(partnerIds)) |
136 | return | 136 | return |
137 | } | 137 | } |
138 | 138 |
-
请 注册 或 登录 后发表评论