公会分成管理--更新

master
chenxiaojun 5 years ago
parent 48ca90bbf3
commit 517d4ec05f

@ -1070,7 +1070,6 @@ public function auto_rrdae(){
private function promoteWithdraw($settlement = 1, $initial = false) private function promoteWithdraw($settlement = 1, $initial = false)
{ {
$withdrawModel = new WithdrawModel(); $withdrawModel = new WithdrawModel();
$map['id'] = 84;
$map['level'] = 1; $map['level'] = 1;
$map['ver_status'] = 1; $map['ver_status'] = 1;
$map['settlement_type'] = ($settlement == 3) ? 1 : $settlement; $map['settlement_type'] = ($settlement == 3) ? 1 : $settlement;
@ -1083,17 +1082,22 @@ public function auto_rrdae(){
$error_repeat = 0; $error_repeat = 0;
if (!empty($promotes)) { if (!empty($promotes)) {
switch ($settlement) {
case 1:
$fun = 'promoteWithdrawWeeklyByPromote';
break;
case 2:
$fun = 'promoteWithdrawPerMonthByPromote';
break;
case 3:
$fun = 'promoteWithdrawRecoupByPromote';
break;
}
foreach ($promotes as $promote) { foreach ($promotes as $promote) {
switch ($settlement) { if ($fun == 'promoteWithdrawRecoupByPromote') {
case 1: $result = $withdrawModel->$fun($promote);
$result = $withdrawModel->promoteWithdrawWeeklyByPromote($promote, $initial); } else {
break; $result = $withdrawModel->$fun($promote, $initial);
case 2:
$result = $withdrawModel->promoteWithdrawRecoupByPromote($promote, $initial);
break;
case 3:
$result = $withdrawModel->promoteWithdrawRecoupByPromote($promote);
break;
} }
switch ($result) { switch ($result) {
case -4: case -4:

Loading…
Cancel
Save