|
|
@ -1099,8 +1099,10 @@ public function auto_rrdae(){
|
|
|
|
$promoteMap['chain'] = ['like', "{$promote['chain']}{$promote['id']}/%"];
|
|
|
|
$promoteMap['chain'] = ['like', "{$promote['chain']}{$promote['id']}/%"];
|
|
|
|
$promoteIds = M('promote', 'tab_')->where($promoteMap)->getField('id', true);
|
|
|
|
$promoteIds = M('promote', 'tab_')->where($promoteMap)->getField('id', true);
|
|
|
|
$promoteIds[] = $promote['id'];
|
|
|
|
$promoteIds[] = $promote['id'];
|
|
|
|
|
|
|
|
$settlementType = $promote['settlement_type'];
|
|
|
|
$settlementEndTime = strtotime(date('Y-m-d')) - 1;
|
|
|
|
$settlementEndTime = strtotime(date('Y-m-d')) - 1;
|
|
|
|
if ($initial) {
|
|
|
|
if ($initial) {
|
|
|
|
|
|
|
|
$settlementType = 5;
|
|
|
|
$settlementBeginTime = 0;
|
|
|
|
$settlementBeginTime = 0;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
switch ($promote['settlement_type']) {
|
|
|
|
switch ($promote['settlement_type']) {
|
|
|
@ -1141,7 +1143,7 @@ public function auto_rrdae(){
|
|
|
|
$add['op_type'] = 3;
|
|
|
|
$add['op_type'] = 3;
|
|
|
|
$add['last_op_id'] = $add['op_id'];
|
|
|
|
$add['last_op_id'] = $add['op_id'];
|
|
|
|
$add['last_op_type'] = 3;
|
|
|
|
$add['last_op_type'] = 3;
|
|
|
|
$add['settlement_type'] = $promote['settlement_type'];
|
|
|
|
$add['settlement_type'] = $settlementType;
|
|
|
|
|
|
|
|
|
|
|
|
M()->startTrans();//开启事物
|
|
|
|
M()->startTrans();//开启事物
|
|
|
|
$withdrawId = D('withdraw')->add($add);
|
|
|
|
$withdrawId = D('withdraw')->add($add);
|
|
|
|