绑币回收-操作日志

master
chenzhi 5 years ago
parent cb696c923f
commit 71f2453bb4

@ -99,7 +99,14 @@ class DeductBindRecordController extends ThinkController {
$result = M('UserPlay','tab_')->where($user_play_map)->setDec('bind_balance',$data["quantity"]); $result = M('UserPlay','tab_')->where($user_play_map)->setDec('bind_balance',$data["quantity"]);
$result1 = $deduct->data($data)->add(); $result1 = $deduct->data($data)->add();
if($result !== false && $result1 !==false){ if($result !== false && $result1 !==false){
M()->commit();$this->success("操作成功",U('DeductBindRecord/recordLists')); M()->commit();
//操作日志
addOperationLog(array(
"op_type"=>1,
"key"=> $data["user_account"]."/".$data["quantity"],
"url"=>U("DeductBindRecord/recordLists",array("account"=>$data["user_account"]))
));
$this->success("操作成功",U('DeductBindRecord/recordLists'));
}else{ }else{
//事务回滚 //事务回滚
M()->rollback(); M()->rollback();

@ -5227,8 +5227,8 @@ class ExportController extends Controller
} }
//操作日志
$this->exportAddOperationLog('DeductBindRecord/recordLists','充值-绑币订单-绑币收回-导出');
$this->exportExcel($xlsName, $xlsCell, $xlsData); $this->exportExcel($xlsName, $xlsCell, $xlsData);
} }
@ -8238,5 +8238,13 @@ class ExportController extends Controller
excelDownStreamTemplate(); excelDownStreamTemplate();
} }
//导出操作日志
public function exportAddOperationLog($url,$menu)
{
$GetData = $_GET;
unset($GetData['xlsname']);
unset($GetData['id']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U($url,$GetData),'menu'=>$menu]);
}
} }

Loading…
Cancel
Save