任务记录统计提交
This commit is contained in:
@@ -676,21 +676,36 @@ class Statistical extends adminApi
|
||||
if(!empty($etime)){
|
||||
$where['a.createtime'] = ['<=', strtotime($etime)];
|
||||
}
|
||||
if(!empty($stime) && !empty($etime)){
|
||||
$where['a.createtime'] = ['between', [strtotime($stime), strtotime($etime)]];
|
||||
}
|
||||
if($search_user_id > 0){
|
||||
$where['a.user_id'] = $search_user_id;
|
||||
}
|
||||
if($search_gift_bag_id > 0){
|
||||
$where['a.gift_bag_id'] = $search_gift_bag_id;
|
||||
}
|
||||
$tasks_bag_details = db::name('vs_gift_bag_receive_log')
|
||||
->alias('a')
|
||||
->join('vs_gift_bag_detail b', 'a.parent_id=b.id')
|
||||
->field('a.createtime,b.type,b.foreign_id,b.quantity,b.gold')
|
||||
->where(['b.type'=>['in', [1,2]]])
|
||||
->where('a.gift_bag_id','>=',18)
|
||||
->where('a.gift_bag_id','<=',51)
|
||||
->where($where)
|
||||
->select();
|
||||
if(!empty($stime) && !empty($etime) && $etime<="1767038400"){//2025-12-30 04:00:00
|
||||
$tasks_bag_details = db::name('vs_gift_bag_receive_log')
|
||||
->alias('a')
|
||||
->join('vs_gift_bag_detail b', 'a.parent_id=b.id')
|
||||
->field('a.createtime,b.type,b.foreign_id,b.quantity,b.gold')
|
||||
->where(['b.type'=>['in', [1,2]]])
|
||||
->where('a.gift_bag_id','>=',18)
|
||||
->where('a.gift_bag_id','<=',51)
|
||||
->where($where)
|
||||
->select();
|
||||
}else{
|
||||
$tasks_bag_details = db::name('vs_gift_bag_receive_tasks_log')
|
||||
->alias('a')
|
||||
->join('vs_gift_bag_detail b', 'a.parent_id=b.id')
|
||||
->field('a.createtime,b.type,b.foreign_id,b.quantity,b.gold')
|
||||
->where(['b.type'=>['in', [1,2]]])
|
||||
->where('a.gift_bag_id','>=',18)
|
||||
->where('a.gift_bag_id','<=',51)
|
||||
->where($where)
|
||||
->select();
|
||||
}
|
||||
$total_reward_price = 0;
|
||||
foreach ($tasks_bag_details as $detail){
|
||||
if($detail['type'] == 1){
|
||||
|
||||
Reference in New Issue
Block a user