后台发放(玩家)1-操作日志

master
chenzhi 5 years ago
parent 31a0a174bd
commit 60edd1f8ca

@ -5046,6 +5046,12 @@ class ExportController extends Controller
if($_REQUEST['type']==2) {
//操作日志
$GetData = $_GET;
unset($GetData['xlsname']);
unset($GetData['id']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('PromoteCoin/deduct_lists',$GetData),'menu'=>'充值-平台币订单-平台币收回-推广员收回-导出']);
$xlsCell = array(
array('promote_account','所属推广员'),
array('promote_type','推广员等级'),
@ -5076,6 +5082,12 @@ class ExportController extends Controller
$model = M('PromoteCoin','tab_');
}else {
//操作日志
$GetData = $_GET;
unset($GetData['xlsname']);
unset($GetData['id']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U('PromoteCoin/deduct_lists',$GetData),'menu'=>'充值-平台币订单-平台币收回-玩家收回-导出']);
$xlsCell = array(
array('user_account','玩家账号'),
array('coin_type','收回类型'),

@ -183,6 +183,9 @@ class PromoteCoinController extends ThinkController
}
if ($res) {
//------操作日志-begin
if($type == 1){
//发放
$keyname = getPromoteAccount(I('promote_id'));
$keyname .= ("/".abs(I('num')));
$optionarr = array(
@ -201,7 +204,31 @@ class PromoteCoinController extends ThinkController
}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)));

@ -36,6 +36,7 @@ class firstpayEvent extends Controller {
$add['op_account']=session("user_auth.username");
$add['create_time']=NOW_TIME;
$prov=M("provide","tab_")->add($add);
$this->feAddOperationLog($account,$amount);
$this->success("提交成功",U("Provide/lists",["type"=>2]));
}else{
$this->error("该玩家还未玩此游戏",U("bdfirstpay"));
@ -91,6 +92,7 @@ class firstpayEvent extends Controller {
$add['create_time']=NOW_TIME;
$prov=M("provide","tab_")->add($add);
if($prov){
$this->feAddOperationLog($add['user_account'],$amount);
$a++;
}
}
@ -179,7 +181,10 @@ class firstpayEvent extends Controller {
$arr['amount'] = (double)$v['C'];
$arr['create_time'] = NOW_TIME;
$arr['create_time'] = NOW_TIME;
D('Provide')->add($arr);
$res = D('Provide')->add($arr);
if($res){
$this->feAddOperationLog($arr['user_account'],$arr['amount']);
}
}
$a = json_encode($errorList);
$json = urlencode(json_encode($errorList));
@ -189,4 +194,15 @@ class firstpayEvent extends Controller {
$this->assign ( 'json', $json);
$this->success('成功:'.$succNum.';失败:'.$errorNum,U("Provide/lists",["type"=>2]));
}
//操作日志
public function feAddOperationLog($user,$num)
{
$optionarr = array(
"op_type"=>0,
"key"=>($user."/".$num),
"menu"=>"充值-绑币订单-后台发放玩家-绑币发放",
"url"=>U("Provide/lists",array("model"=>"provide","user_account"=>$user))
);
addOperationLog($optionarr);
}
}

Loading…
Cancel
Save