Commit 4dab8293 by guanchen

修复数据 不更新奖励金额

parent 96fa5639
......@@ -78,7 +78,7 @@ public class AgentSettleTask {
}
private void updateAll(long beginTs, long endTs) {
updateOrderCommission(beginTs, endTs, 0, 0);
// updateOrderCommission(beginTs, endTs, 0, 0);
doSettle(beginTs, endTs);
}
......
......@@ -381,4 +381,34 @@ SET a.tail_order_sn=b.tail_order_sn,a.deposite_tail_rate=b.deposite_tail_rate;
UPDATE agent_reward a
JOIN update_partner_agent_tail_order_reward b on a.reward_type in (300,750) and a.reference_id=b.order_id
SET a.tail_order_sn=b.tail_order_sn,a.deposite_tail_rate=b.deposite_tail_rate;
\ No newline at end of file
SET a.tail_order_sn=b.tail_order_sn,a.deposite_tail_rate=b.deposite_tail_rate;
update agent_account a
join (
select agent_id,sum(change_num) change_num_
from agent_account_log a
where a.yeartime=2019 and a.monthtime=12 and a.daytime=24
group by 1
) b on a.agent_id=b.agent_id
join agent_account_2019122422 c on a.agent_id=c.agent_id
set a.balance=c.balance;
delete from agent_account_log where yeartime=2019 and monthtime=12 and daytime=24;
delete from agent_salary where yeartime=2019 and monthtime=11;
update agent_reward
set reward_status=100
where settle_time between '2019-11-01 00:00:00' and '2019-11-30 23:59:59' and reward_status=120
and settle_state>0;
update agent_reward
set settle_time=case when recharge_time<'2019-11-01 00:00:00' then '2019-11-01 00:00:00' else recharge_time end
where settle_time is null and recharge_time<'2019-11-30 23:59:59' and settle_state>0
and reward_type in (710,740);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment