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