|
|
@ -1364,12 +1364,15 @@ class TimingController extends AdminController {
|
|
|
|
// '13272727572' => 'jiangshibo01',
|
|
|
|
// '13272727572' => 'jiangshibo01',
|
|
|
|
// 'hdfzxyz' => 'hdfzxyz01',
|
|
|
|
// 'hdfzxyz' => 'hdfzxyz01',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($items as $fromPromoteAccount => $toPromoteAccount) {
|
|
|
|
foreach ($items as $fromPromoteAccount => $toPromoteAccount) {
|
|
|
|
|
|
|
|
$toPromote = M('promote','tab_')->field(['id', 'account'])->where(['account'=> $toPromoteAccount])->find();
|
|
|
|
$users = M("user","tab_")->where("promote_account='" . $fromPromoteAccount . "'")->select();
|
|
|
|
$users = M("user","tab_")->where("promote_account='" . $fromPromoteAccount . "'")->select();
|
|
|
|
foreach ($users as $user) {
|
|
|
|
foreach ($users as $user) {
|
|
|
|
$params = [
|
|
|
|
$params = [
|
|
|
|
'promote_id_to' => $toPromoteAccount,
|
|
|
|
'promote_id_to' => $toPromote['id'],
|
|
|
|
'promote_id' => $toPromoteAccount,
|
|
|
|
'promote_id' => $toPromote['id'],
|
|
|
|
'order_time' => '2022-08-01 00:00:00',
|
|
|
|
'order_time' => '2022-08-01 00:00:00',
|
|
|
|
'allow_over_week' => 1,
|
|
|
|
'allow_over_week' => 1,
|
|
|
|
'remark' => '后台迁移',
|
|
|
|
'remark' => '后台迁移',
|
|
|
@ -1377,23 +1380,22 @@ class TimingController extends AdminController {
|
|
|
|
'account' => $user['account'],
|
|
|
|
'account' => $user['account'],
|
|
|
|
];
|
|
|
|
];
|
|
|
|
var_dump($params);
|
|
|
|
var_dump($params);
|
|
|
|
// $this->shiftPlayer($params);
|
|
|
|
// $this->shiftPlayer($params, $user, $toPromote);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private function shiftPlayer($params) {
|
|
|
|
private function shiftPlayer($params, $user, $toPromote) {
|
|
|
|
$service = new MendService();
|
|
|
|
$service = new MendService();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
$service->addMendTask($params);
|
|
|
|
$service->addMendTask($params);
|
|
|
|
|
|
|
|
|
|
|
|
$userData = M('user','tab_')->field(['account', 'promote_id', 'promote_account'])->where(['id' => $params['user_id']])->find();
|
|
|
|
$user = M('user','tab_')->field(['account', 'promote_id', 'promote_account'])->where(['id' => $params['user_id']])->find();
|
|
|
|
$promoteToData = M('promote','tab_')->field('account')->where(['id'=> $params['prmoote_id_to']])->find();
|
|
|
|
|
|
|
|
addOperationLog([
|
|
|
|
addOperationLog([
|
|
|
|
'op_type' => 1,
|
|
|
|
'op_type' => 1,
|
|
|
|
'key' => $userData['account'].'/'.$userData['promote_account'].'/'.$promoteToData['account'],
|
|
|
|
'key' => $user['account'] . '/' . $user['promote_account'].'/' . $toPromote['account'],
|
|
|
|
'op_name' => '编辑推广补链',
|
|
|
|
'op_name' => '编辑推广补链',
|
|
|
|
'url' => U('Mend/edit', ['id' => $userData['id']]),
|
|
|
|
'url' => U('Mend/edit', ['id' => $user['id']]),
|
|
|
|
'menu' => '推广员-推广员管理-推广补链-编辑推广补链',
|
|
|
|
'menu' => '推广员-推广员管理-推广补链-编辑推广补链',
|
|
|
|
'content' => json_encode($params)
|
|
|
|
'content' => json_encode($params)
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|