id,
account_id as accountId,
act_time as actTime,
num,
t_advertiser.name as advertiserName,
memo,
agent_id as agentId,
advertiser_id as advertiserId,
charge,
allocate,
consume,
balance
insert into t_adv_balance
(account_id,agent_id,advertiser_id,charge,allocate,consume,memo,num,balance,act_time)
values
(#{accountId},#{agentId},#{advertiserId},0,#{allocate},0,#{memo},#{num},#{balance}+#{allocate},NOW())
insert into t_adv_balance
(account_id,agent_id,advertiser_id,allocate,balance,act_time)
values
(#{accountId},#{agentId},0,#{allocate},#{agentBalance}-#{allocate},NOW())