首页 > 其他 > 详细

1111

时间:2018-12-15 13:26:01      阅读:160      评论:0      收藏:0      [点我收藏+]

5.ELF上市活动

delimiter $$
DROP PROCEDURE IF EXISTS pro_act_fee_18 ;
CREATE PROCEDURE pro_act_fee_18()
begin
DECLARE var_fcounter_id varchar(50);
DECLARE var_fid varchar(50);
DECLARE var_fcoin_id varchar(50);
DECLARE var_fcount decimal(60,30);
DECLARE var_fassert_id varchar(50);

declare cur_fee select fcounter_id,fid,fcoin_id
from ac_asset_change_bb_centre where ftype=‘deal_acquire‘
and fid in ( select fid from ac_exchange_bb_center
where fmaker_user_id !=ftaker_user_id
and ftime>=‘2018-12-18 00:00:00‘ and ftime<=‘2018-12-18 23:59:59‘ );

open cur_fee;
FETCH cur_fee INTO var_fcounter_id,var_fid,var_fcoin_id ;

update ac_asset_bb_centre set fcount=fcount*1.2
where fcounter_id=var_fcounter_id and fuser_id=var_fid and fcoin_id=var_fcoin_id;

declare cur_fee_sub select fcount,fid from ac_asset_bb_centre
where fcounter_id=var_fcounter_id and fuser_id=var_fid and fcoin_id=var_fcoin_id;

open cur_fee_sub:
FETCH cur_fee_sub INTO var_fcount,var_fassert_id ;

INSERT INTO `assets_core`.`ac_asset_change_bb_centre`
(`fid`, `fassert_id`, `fcounter_id`, `fuser_id`, `fcoin_id`, `fcount`, `ftype`, `fside`,
`ftime`, `flabel`, `fee`, `fstate`, `flock_count`, `fasset_change_id`)
VALUES (CEILING(RAND()*8888888888888+88888888888888888), var_fassert_id, ‘2‘, var_fid, var_fcoin_id, var_fcount,
‘2018-12-18 activity‘, 0, now(), ‘空投资产‘, 0.000000000000000000000000000000, ‘1‘, 0, NULL);

insert into mypro.pro_act_fee_18 select var_fid,var_fcounter_id,var_fcoin_id ;

end;
$$
DELIMITER ;

call pro_act_fee_18();

 

 


update ac_asset_bb_centre set fcount=100.000000000000000000000000000000 where fuser_id in (‘8.888895959301134e16‘,‘8.888910392747178e16‘,‘8.888915328173198e16‘,‘8.888955456709758e16‘)

select * from ac_asset_bb_centre where fuser_id in (‘8.888895959301134e16‘,‘8.888910392747178e16‘,‘8.888915328173198e16‘,‘8.888955456709758e16‘)

select * from `assets_core`.`ac_asset_change_bb_centre` where fid in (‘8.888895959301134e16‘,‘8.888910392747178e16‘,‘8.888915328173198e16‘,‘8.888955456709758e16‘)
delete from `assets_core`.`ac_asset_change_bb_centre` where fid in (‘8.888895959301134e16‘,‘8.888910392747178e16‘,‘8.888915328173198e16‘,‘8.888955456709758e16‘)

select * from mypro.pro_act_fee_18
delete from mypro.pro_act_fee_18

 

1111

原文:https://www.cnblogs.com/liang545621/p/10122692.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!