|
|
@ -183,25 +183,52 @@ class PromoteCoinController extends ThinkController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($res) {
|
|
|
|
if ($res) {
|
|
|
|
$keyname = getPromoteAccount(I('promote_id'));
|
|
|
|
//------操作日志-begin
|
|
|
|
$keyname .= ("/".abs(I('num')));
|
|
|
|
if($type == 1){
|
|
|
|
$optionarr = array(
|
|
|
|
//发放
|
|
|
|
"op_type"=>1,
|
|
|
|
$keyname = getPromoteAccount(I('promote_id'));
|
|
|
|
"key"=>$keyname,
|
|
|
|
$keyname .= ("/".abs(I('num')));
|
|
|
|
"menu"=>"充值-平台币订单-后台发放(推广员)-",
|
|
|
|
$optionarr = array(
|
|
|
|
"url"=>U("PromoteCoin/send_lists",array("model"=>"PromoteCoin","promote_id"=>I('promote_id')))
|
|
|
|
"op_type"=>1,
|
|
|
|
);
|
|
|
|
"key"=>$keyname,
|
|
|
|
$promote_type = $_GET['promote_type'];
|
|
|
|
"menu"=>"充值-平台币订单-后台发放(推广员)-",
|
|
|
|
if($promote_type == '1'){
|
|
|
|
"url"=>U("PromoteCoin/send_lists",array("model"=>"PromoteCoin","promote_id"=>I('promote_id')))
|
|
|
|
$optionarr['menu'] .= "给会长发放";
|
|
|
|
);
|
|
|
|
}elseif($promote_type == '2'){
|
|
|
|
$promote_type = $_GET['promote_type'];
|
|
|
|
$optionarr['menu'] .= "给部门长发放";
|
|
|
|
if($promote_type == '1'){
|
|
|
|
}elseif($promote_type == '3'){
|
|
|
|
$optionarr['menu'] .= "给会长发放";
|
|
|
|
$optionarr['menu'] .= "给组长发放";
|
|
|
|
}elseif($promote_type == '2'){
|
|
|
|
}elseif($promote_type == '4'){
|
|
|
|
$optionarr['menu'] .= "给部门长发放";
|
|
|
|
$optionarr['menu'] .= "给组员发放";
|
|
|
|
}elseif($promote_type == '3'){
|
|
|
|
|
|
|
|
$optionarr['menu'] .= "给组长发放";
|
|
|
|
|
|
|
|
}elseif($promote_type == '4'){
|
|
|
|
|
|
|
|
$optionarr['menu'] .= "给组员发放";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
//收回
|
|
|
|
|
|
|
|
$optionarr = array(
|
|
|
|
|
|
|
|
"op_type"=>1,
|
|
|
|
|
|
|
|
"menu"=>"充值-平台币订单-平台币收回-",
|
|
|
|
|
|
|
|
"url"=>U("PromoteCoin/send_lists",array("model"=>"PromoteCoin","promote_id"=>I('promote_id')))
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
if($tt == 1){
|
|
|
|
|
|
|
|
//收回玩家
|
|
|
|
|
|
|
|
$userid = I('user_id');
|
|
|
|
|
|
|
|
$user_account = M("User","tab_")->where("id={$userid}")->field("account")->find()['account'];
|
|
|
|
|
|
|
|
$keyname = ($user_account."/".abs(I('num')));
|
|
|
|
|
|
|
|
$optionarr['key'] = $keyname;
|
|
|
|
|
|
|
|
$optionarr['menu'] .= "玩家收回";
|
|
|
|
|
|
|
|
$optionarr['url'] = U("PromoteCoin/deduct_lists",array("type"=>"1","account"=>$user_account));
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
//收回推广员
|
|
|
|
|
|
|
|
$optionarr['key'] = (getPromoteAccount(I('promote_id'))."/".abs(I('num')));
|
|
|
|
|
|
|
|
$optionarr['menu'] .= "推广员收回";
|
|
|
|
|
|
|
|
$optionarr['url'] = U("PromoteCoin/deduct_lists",array("type"=>"2","promote_id"=>I('promote_id')));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
addOperationLog($optionarr);
|
|
|
|
addOperationLog($optionarr);
|
|
|
|
|
|
|
|
//-------操作日志-end
|
|
|
|
|
|
|
|
|
|
|
|
$this->success('操作成功!', U($url, array('model' => $model['name'], 'type' => $tt)));
|
|
|
|
$this->success('操作成功!', U($url, array('model' => $model['name'], 'type' => $tt)));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$this->error('操作失败!', U($url, array('model' => $model['name'], 'type' => $tt)));
|
|
|
|
$this->error('操作失败!', U($url, array('model' => $model['name'], 'type' => $tt)));
|
|
|
|