优化个人重算

master
chenzhi 5 years ago
parent 553ee7a752
commit 3fc9b578a9

@ -787,7 +787,7 @@ class CompanyStatementPoolController extends ThinkController
//重新计算 //重新计算
$stime = $info['statement_end_time']-0+1; $stime = $info['statement_end_time']-0+1;
$type = $info['withdraw_type']; $type = $info['withdraw_type'];
A("CompanyStatementSet")->promoteUserPool($type,$stime,true); A("CompanyStatementSet")->promoteUserPool($type,$stime,true,$info['is_payment']);
M()->commit(); M()->commit();
$this->ajaxReturn(array( $this->ajaxReturn(array(

@ -791,7 +791,7 @@ class CompanyStatementSetController extends Controller {
} }
} }
public function promoteUserPool($type,$stime,$recount = false){ public function promoteUserPool($type,$stime,$recount = false,$is_payment=false){
$t = $this->setBeginAndEndTime($type,$stime); $t = $this->setBeginAndEndTime($type,$stime);
$begintime = $t[0]; $begintime = $t[0];
$endtime = $t[1]; $endtime = $t[1];
@ -835,9 +835,15 @@ class CompanyStatementSetController extends Controller {
$user['withdraw_type'] = 2; $user['withdraw_type'] = 2;
$this->doPromoteUserPool($user,$users,2,$stime,$recount); $this->doPromoteUserPool($user,$users,2,$stime,$recount);
} }
if($is_payment !== false && $is_payment==1){
$this->savePromotateUserPool($users);
}else if($is_payment !== false && $is_payment==2){
$this->savePromotateUserPool($user);
}else{
$this->savePromotateUserPool($users);
$this->savePromotateUserPool($user);
}
$this->savePromotateUserPool($users);
$this->savePromotateUserPool($user);
} }
/** /**

Loading…
Cancel
Save