Merge branch 'feature/platfrom_aggregate_finance' of wmtx/platform into release

取消测试的虚拟验证码
master
廖金灵 4 years ago committed by Gogs
commit db32f11215

@ -14,6 +14,12 @@ class CompanyGameRatioController extends AdminController
"1"=>"市场部通过",
"2"=>"管理员通过"
];
public $SettlementType=[
"-1"=>"未设定",
"0"=>"无",
"1"=>"周结",
"2"=>"月结"
];
public function _initialize()
{
$this->admininfo = $_SESSION['onethink_admin']['user_auth'];
@ -36,23 +42,56 @@ class CompanyGameRatioController extends AdminController
$gamewhere['relation_game_id'] = $params['relation_game_id'];
$where['m.relation_game_id'] = $params['relation_game_id'];
}
$pwhere = false;
if(isset($params['company_belong'])){
$pwhere = " and p.company_belong = {$params['company_belong']}";
}
if(isset($params['company_id'])){
$where['m.company_id'] = $params['company_id'];
}
// $this->checkListOrCountAuthRestMap($where);
if(isset($params['game_type'])){
$gamewhere['game_type_id'] = $params['game_type'];
}
if(isset($params['settlement_type'])){
$companyid = $this->returnSettlementTypeCompanyid($params['settlement_type']);
if(empty($companyid)){
$where['_string'] = "m.company_id = -1";
}else{
if($params['settlement_type'] != -1){
$where['_string'] = "m.company_id in ({$companyid})";
}else{
$where['_string'] = "m.company_id NOT IN ({$companyid})";
}
}
}
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$time_start = strtotime($_REQUEST['time_start']);
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
$where["_string"] = "(begin_time BETWEEN {$time_start} AND {$time_end}) OR (end_time BETWEEN {$time_start} AND {$time_end})";
} elseif (isset($_REQUEST['time_start'])) {
$time_start = strtotime($_REQUEST['time_start']);
$where["_string"] = "end_time >= {$time_start} OR end_time = 0";
} elseif (isset($_REQUEST['time_end'])) {
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
$where["_string"] = "begin_time <= {$time_end}";
}
$gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->where($gamewhere)->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false);
$dbres = M("company_game_ratio","tab_")
->alias('m')
->field("m.*,g.*,p.company_name,p.company_belong,IFNULL(r.settlement_type,0) settlement_type")
->join("left JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")
->join("left JOIN tab_promote_company p ON m.company_id = p.id")
->join("left JOIN tab_company_relation r ON (r.first_company_type =2 AND r.first_company_id = m.company_id) OR (r.second_company_type =2 AND r.second_company_id = m.company_id)")
->where($where);
->field("m.*,g.*,p.company_name,p.company_belong,IFNULL(r.settlement_type,-1) settlement_type")
->join("JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")
->join("JOIN tab_promote_company p ON ( m.company_id = p.id".$pwhere.")")
->join("left JOIN tab_company_relation r ON (r.first_company_type =2 AND r.first_company_id = m.company_id) OR (r.second_company_type =2 AND r.second_company_id = m.company_id)");
if(isset($params['export'])){
$dbres = $dbres->select();
$dbres = $dbres->where($where)->select();
}else{
$dbres = $dbres->page($page, $row)->select();
$dbres = $dbres->where($where)->page($page, $row)->select();
}
foreach($dbres as $k=>&$v){
$v['begin_time'] = date("Y-m-d",$v['begin_time']);
@ -66,11 +105,9 @@ class CompanyGameRatioController extends AdminController
} else {
$symbol = "<br>";
}
if($v['settlement_type'] == 0){
$v['settlement_type'] = '--';
}else{
$v['settlement_type'] = $v['settlement_type']== 1 ? "周结" : '月结';
}
$v['settlement_type'] = $this->SettlementType[$v['settlement_type']];
//新
$thisTurnoverRatios = $v['turnover_ratio'] ? json_decode($v['turnover_ratio'], true) : [];
$thisRatioDtl = "默认:{$v['ratio']}%";
@ -101,7 +138,10 @@ class CompanyGameRatioController extends AdminController
));
}
$count = M("company_game_ratio","tab_")->alias('m')->field("count(id) count")->where($where)->find()['count'];
$count = M("company_game_ratio","tab_")->alias('m')->field("count(m.id) count")
->join("JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")
->join("JOIN tab_promote_company p ON ( m.company_id = p.id".$pwhere.")")
->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row);
if($page) {
@ -110,6 +150,7 @@ class CompanyGameRatioController extends AdminController
$this->assign("companyList",D("PromoteCompany")->getList());
$this->assign("gameList",D("Game")->getRelationGameLits());
$this->assign("SettlementType",$this->SettlementType);
$this->display();
}
@ -129,20 +170,56 @@ class CompanyGameRatioController extends AdminController
$gamewhere['relation_game_id'] = $params['relation_game_id'];
$where['m.relation_game_id'] = $params['relation_game_id'];
}
if(isset($params['status'])){
$where['m.status'] = $params['status'];
}
$pwhere = false;
if(isset($params['company_belong'])){
$pwhere = " and p.company_belong = {$params['company_belong']}";
}
if(isset($params['company_id'])){
$where['m.company_id'] = $params['company_id'];
}
if(isset($params['status'])){
$where['m.status'] = $params['status'];
if(isset($params['game_type'])){
$gamewhere['game_type_id'] = $params['game_type'];
}
if(isset($params['settlement_type'])){
$companyid = $this->returnSettlementTypeCompanyid($params['settlement_type']);
if(empty($companyid)){
$where['_string'] = "m.company_id = -1";
}else{
if($params['settlement_type'] != -1){
$where['_string'] = "m.company_id in ({$companyid})";
}else{
$where['_string'] = "m.company_id NOT IN ({$companyid})";
}
}
}
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$time_start = strtotime($_REQUEST['time_start']);
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
$where["_string"] = "(begin_time BETWEEN {$time_start} AND {$time_end}) OR (end_time BETWEEN {$time_start} AND {$time_end})";
} elseif (isset($_REQUEST['time_start'])) {
$time_start = strtotime($_REQUEST['time_start']);
$where["_string"] = "end_time >= {$time_start} OR end_time = 0";
} elseif (isset($_REQUEST['time_end'])) {
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
$where["_string"] = "begin_time <= {$time_end}";
}
//TODO:未计算公司类型
// $this->checkListOrCountAuthRestMap($where);
$gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->where($gamewhere)->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false);
$dbres = M("company_game_ratio_log","tab_")
->alias('m')
->field("m.*,g.*,p.company_name,p.company_belong,IFNULL(r.settlement_type,0) settlement_type")
->join("left JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")
->join("left JOIN tab_promote_company p ON m.company_id = p.id")
->join("JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")
->join("JOIN tab_promote_company p ON ( m.company_id = p.id".$pwhere.")")
->join("left JOIN tab_company_relation r ON (r.first_company_type =2 AND r.first_company_id = m.company_id) OR (r.second_company_type =2 AND r.second_company_id = m.company_id)")
->where($where)
->order("FIELD(m.status,0,1,-1,-2,2),id desc");
@ -152,11 +229,7 @@ class CompanyGameRatioController extends AdminController
$dbres = $dbres->page($page, $row)->select();
}
foreach($dbres as $k=>&$v){
if($v['settlement_type'] == 0){
$v['settlement_type'] = '--';
}else{
$v['settlement_type'] = $v['settlement_type']== 1 ? "周结" : '月结';
}
$v['settlement_type'] = $this->SettlementType[$v['settlement_type']];
$v['begin_time'] = date("Y-m-d",$v['begin_time']);
$v['end_time'] = $v['end_time'] ? date('Y-m-d', $v['end_time']) : '永久';
@ -239,7 +312,10 @@ class CompanyGameRatioController extends AdminController
));
}
$count = M("company_game_ratio_log","tab_")->alias('m')->field("count(id) count")->where($where)->find()['count'];
$count =M("company_game_ratio_log","tab_")->alias('m')->field("count(m.id) count")
->join("JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")
->join("JOIN tab_promote_company p ON ( m.company_id = p.id".$pwhere.")")
->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row);
if($page) {
@ -251,6 +327,7 @@ class CompanyGameRatioController extends AdminController
$this->assign("companyList",D("PromoteCompany")->getList());
$this->assign("gameList",D("Game")->getRelationGameLits());
$this->assign("SettlementType",$this->SettlementType);
$this->display();
}
@ -646,6 +723,31 @@ class CompanyGameRatioController extends AdminController
$data =json_encode(['msg'=>$data,"code"=>4000],JSON_UNESCAPED_UNICODE);
exit($data);
}
protected function returnSettlementTypeCompanyid($st)
{
if($st != -1){
$setwhere = [
"settlement_type"=>$st,
"_string"=>"first_company_type=2 OR second_company_type=2"
];
}else{
$setwhere = [
"_string"=>"first_company_type=2 OR second_company_type=2"
];
}
$scompany_id = M("company_relation","tab_")->field("first_company_type,second_company_type,first_company_id,second_company_id")->where($setwhere)->select();
$company_id = [];
foreach($scompany_id as $k=>$v){
if($v['first_company_type'] == 0){
$company_id[] = $v['second_company_id'];
}else{
$company_id[] = $v['first_company_id'];
}
}
unset($scompany_id);
$company_id = implode(",",$company_id);
return $company_id;
}
}

@ -9,6 +9,11 @@ use Think\Controller;
*/
class CompanyStatementSetController extends Controller {
public $cpapihost;
public $TYPE=[
"0"=>"周结",
"1"=>"月结",
"2"=>"补点"
];
public $token = "LYHTQDJS";
public function _initialize(){
@ -71,7 +76,7 @@ class CompanyStatementSetController extends Controller {
echo "∟----推广公司周结统计ok".PHP_EOL;
$this->promoteUserPool(0,$stime);
echo "∟----推广个人月结&补点统计ok".PHP_EOL;
echo "∟----推广个人周结ok".PHP_EOL;
}
if($d == 1){
echo $nowdate.":".PHP_EOL;
@ -86,7 +91,7 @@ class CompanyStatementSetController extends Controller {
echo "∟----推广公司月结&补点统计ok".PHP_EOL;
$this->promoteUserPool(1,$stime);
$this->promoteUserPool(2,$stime);
// $this->promoteUserPool(2,$stime);
echo "∟----推广个人月结&补点统计ok".PHP_EOL;
}
}else{
@ -665,10 +670,54 @@ class CompanyStatementSetController extends Controller {
$pcList[$k]['list'] = $v;
}
}
public function promoteUserPool($type,$stime,$recount = false){
$t = $this->setBeginAndEndTime($type,$stime);
$begintime = $t[0];
$endtime = $t[1];
$basedata = [
"pay_amount"=>0,
"statement_money"=>0,
"lack_statement_money"=>0,
"withdraw_type"=>$type,
"platform_amount"=>0,
"create_lack_ids"=>[],
"del_lack_ids"=>[],
"statement_begin_time"=>$begintime,
"statement_end_time"=>$endtime,
"fine"=>0,
"reward"=>0,
"verify_status"=>0,
"company_type"=>2,
"verify_log"=>json_encode(["create_user"=>"system","create_time"=>date("Y-m-d H:i:s")]),
"op_time"=>time()
];
$users = $user = $basedata;
$users['is_payment'] = 1;
$users['statement_num'] = "PL_".date('Ymd').date('His').sp_random_num(3);
$user['is_payment'] = 2;
$user['statement_num'] = "PL_".date('Ymd').date('His').sp_random_num(3);
if($type == 0){//周结
$this->doPromoteUserPool($user,$users,$type,$stime,$recount);
}else{
$users['withdraw_type'] = 1;
$user['withdraw_type'] = 1;
//月结&补点
$this->doPromoteUserPool($user,$users,1,$stime,$recount);
$this->doPromoteUserPool($user,$users,2,$stime,$recount);
}
$this->savePromotateUserPool($users);
$this->savePromotateUserPool($user);
}
/**
* 下游个人汇总单
*/
public function promoteUserPool($type,$stime,$recount = false)
public function doPromoteUserPool(&$user,&$users,$type,$stime,$recount = false)
{
$t = $this->setBeginAndEndTime($type,$stime);
$begintime = $t[0];
@ -718,33 +767,7 @@ class CompanyStatementSetController extends Controller {
$RewardRecord = M("RewardRecord","tab_");
$LackStatement = M("company_lack_statement_info","tab_");
$StatementInfo = M("company_statement_info","tab_");
$basedata = [
"pay_amount"=>0,
"statement_money"=>0,
"lack_statement_money"=>0,
"withdraw_type"=>$type,
"platform_amount"=>0,
"create_lack_ids"=>[],
"del_lack_ids"=>[],
"statement_begin_time"=>$begintime,
"statement_end_time"=>$endtime,
"fine"=>0,
"reward"=>0,
"verify_status"=>0,
"company_type"=>2,
"verify_log"=>json_encode(["create_user"=>"system","create_time"=>date("Y-m-d H:i:s")]),
"op_time"=>time()
];
$users = $user = $basedata;
$users['is_payment'] = 1;
$users['statement_num'] = "PL_".date('Ymd').date('His').sp_random_num(3);
$user['is_payment'] = 2;
$user['statement_num'] = "PL_".date('Ymd').date('His').sp_random_num(3);
//
foreach($pc as $k=>&$v){
//获取其他信息
$v = $this->getCompanyOtherInfo($v,$k);
@ -916,15 +939,12 @@ class CompanyStatementSetController extends Controller {
}
}
}
$this->savePromotateUserPool($users,$type);
$this->savePromotateUserPool($user,$type);
}
/**
* 保存信息汇总信息
*/
public function savePromotateUserPool($data){
if(empty($data['create_lack_ids']) && empty($data['del_lack_ids']) && empty($data['info_ids'])){ return;}
if($data['statement_money'] == 0 && $type ==2){ return;}
if($data['statement_money'] == 0){
$data['verify_status'] = 5;
$data['verify_log'] = json_encode(["create_user"=>"system","create_time"=>date("Y-m-d H:i:s"),"verify_user"=>"system","verify_time"=>date("Y-m-d H:i:s"),"payment_user"=>"system","payment_time"=>date("Y-m-d H:i:s")]);

@ -77,11 +77,8 @@ class PublicController extends \Think\Controller
public function cp_login($mobile = null, $verify = null)
{
if (IS_POST) {
/* 检测验证码 TODO: */
if($verify !== 'txsb0601'){
if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误');
}
if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误');
}
$promote = M('promote_company', 'tab_')->where(['contact_phone' => $mobile])->find();
if ($promote) {

@ -711,10 +711,9 @@ class ToolController extends ThinkController {
$parameter['id'] = $id;
}
if (isset($_REQUEST['status']) && $_REQUEST['status'] !== '') {
$status = intval($_REQUEST['status']);
$map['tab_company_info.status'] = $status;
$parameter['status'] = $status;
if (isset($_REQUEST['partner']) && $_REQUEST['partner'] !== '') {
$map['p.partner'] = ["like","%{$_REQUEST['partner']}%"];
}
$page = intval(I('get.p', 0));
@ -733,6 +732,7 @@ class ToolController extends ThinkController {
/* 查询记录总数 */
$count = $model
->alias('p')
->where($map)
->count();

@ -78,6 +78,14 @@
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="game_type" class="select_gallery" >
<option value="">游戏类型</option>
<volist name=":get_game_type_all()" id="vo">
<option value="{$vo.id}" <if condition="isset($_GET['game_type']) && $vo.id eq I('game_type')">selected</if> >{$vo.type_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="relation_game_id" name="relation_game_id" class="select_gallery" >
<option value="">现包名</option>
@ -86,6 +94,37 @@
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="company_belong" name="company_belong" class="select_gallery" >
<option value="">内外团</option>
<volist name=":getCompanyBlong()" id="vo">
<option value="{$vo.id}" <if condition="isset($_GET['company_belong']) && $vo.company_belong eq I('company_belong')">selected</if> >下游{$vo.name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="settlement_type" name="settlement_type" class="select_gallery" >
<option value="">结算周期</option>
<volist name="SettlementType" id="vo">
<option value="{$key}" <if condition="isset($_GET['settlement_type']) && $vo eq I('settlement_type')">selected</if> >{$vo}</option>
</volist>
</select>
</div>
<div class="input-list">
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="生效时间开始" />
&nbsp;-&nbsp;
<div class="input-append date" style="display:inline-block">
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}" placeholder="生效时间结束" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('index','&row='.I('row'),false)}">搜索</a>
@ -184,6 +223,7 @@
</volist>
$(".select_gallery").select2();
</script>
<script src="__STATIC__/laydate/laydate.js" type="text/javascript"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('index')}");
@ -231,6 +271,12 @@ $(function(){
});
});
})
laydate.render({
elem: '#time_start'
});
laydate.render({
elem: '#time_end'
});
})

@ -78,6 +78,14 @@
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="game_type" class="select_gallery" >
<option value="">游戏类型</option>
<volist name=":get_game_type_all()" id="vo">
<option value="{$vo.id}" <if condition="isset($_GET['game_type']) && $vo.id eq I('game_type')">selected</if> >{$vo.type_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="relation_game_id" name="relation_game_id" class="select_gallery" >
<option value="">现包名</option>
@ -86,6 +94,23 @@
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="company_belong" name="company_belong" class="select_gallery" >
<option value="">内外团</option>
<volist name=":getCompanyBlong()" id="vo">
<option value="{$vo.id}" <if condition="isset($_GET['company_belong']) && $vo.company_belong eq I('company_belong')">selected</if> >下游{$vo.name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="settlement_type" name="settlement_type" class="select_gallery" >
<option value="">结算周期</option>
<volist name="SettlementType" id="vo">
<option value="{$key}" <if condition="isset($_GET['settlement_type']) && $vo eq I('settlement_type')">selected</if> >{$vo}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="status" name="status" class="select_gallery" >
@ -330,22 +355,25 @@ $(function(){
return;
}
if(flag){
layer.confirm(opname+"仅会对"+opst+"的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){
layer.confirm(opname+"仅会对"+opst+"的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){
layer.close(index);
_doAgreeApply();
layer.close(index);
});
}else{
_doAgreeApply();
}
function _doAgreeApply(){
layer.load(2);
//执行
$.ajax({
type: "POST",
url: opurl,
dataType: 'json',
async: false,
async: true,
data: {ids:text},
success:function(data){
layer.closeAll('loading');
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){

@ -368,14 +368,16 @@ $(function(){
_doAgreeApply();
}
function _doAgreeApply(){
layer.load(2);
//执行
$.ajax({
type: "POST",
url: opurl,
dataType: 'json',
async: false,
async: true,
data: {ids:text},
success:function(data){
layer.closeAll('loading');
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){

@ -482,15 +482,17 @@
if(flag){
layer.confirm(opname+"仅会对"+opst+"的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){
_doAgreeApply();
layer.close(index);
_doAgreeApply();
});
}else{
if(confirm){
layer.confirm('【警告】'+opname+'将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(){
}, function(index){
layer.close(index);
_doAgreeApply();
});
}else{
@ -500,13 +502,15 @@
}
function _doAgreeApply(){
//执行
layer.load(2);
$.ajax({
type: "POST",
url: opurl,
dataType: 'json',
async: false,
async: true,
data: {ids:text},
success:function(data){
layer.closeAll('loading');
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
@ -555,7 +559,7 @@
type: "POST",
url: "{:U('saveRemark')}",
dataType: 'json',
async: false,
async: true,
data: {id:id,remark:value},
success:function(data){
if(data.status==1){
@ -589,7 +593,7 @@
type: "POST",
url: "{:U('saveRemark')}",
dataType: 'json',
async: false,
async: true,
data: {id:id,remark:value},
success:function(data){
if(data.status==1){

@ -401,7 +401,11 @@
$(".cancelPool,.reCount").on("click",function(){
var id = $(this).data('id');
var url = "{:U('cancelPool')}";
cancelPoolAjax(url,{id:id});
layer.confirm("撤销汇总/重算都是不可逆操作,请慎重选择",{title:false}, function(index){
layer.close(index);
cancelPoolAjax(url,{id:id});
});
})
//线下打款
$(".setUlPayment").on("click",function(){
@ -437,13 +441,15 @@
function cancelPoolAjax(opurl,senddata){
//执行
layer.load(2);
$.ajax({
type: "POST",
url: opurl,
dataType: 'json',
async: false,
async: true,
data: senddata,
success:function(data){
layer.closeAll('loading');
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){

@ -42,23 +42,19 @@
<a class="ajax-post confirm " target-form="ids" url="{:U('company_del')}"><span class="button_icon button_icon2"></span>删除</a>
</div>
</div>
<!-- <div class="jssearch fl cf search_list" >-->
<!-- <div class="input-list search-title-box">-->
<!-- <label>搜索:</label>-->
<!-- </div>-->
<!-- <div class="input-list input-list-platform">-->
<!-- <select id="status" name="status" >-->
<!-- <option value="">显示状态</option>-->
<!-- <option value="1">已开启</option>-->
<!-- <option value="0">已关闭</option>-->
<!-- </select>-->
<!-- </div>-->
<!-- <div class="input-list">-->
<!-- <a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>-->
<!-- </div>-->
<!-- </div>-->
<div class="jssearch fl cf search_list" >
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list">
<input type="text" name="partner" class="" placeholder="公司名称" value="{:I('partner')}" />&nbsp;
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('company_info','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
</div>
</div>
</div>
<!-- 数据列表 -->

@ -366,11 +366,8 @@ class PaymentController extends BaseController
{
$mobile = $_REQUEST['mobile'];
$verify = $_REQUEST['verify'];
/* 检测验证码 TODO: */
if($verify !== 'txsb0601'){
if (!$this->checksafecode($this->admininfo['mobile'], $verify)) {
$this->error('验证码错误');
}
if (!$this->checksafecode($this->admininfo['mobile'], $verify)) {
$this->error('验证码错误');
}
$dbres = M("Kv")->where("`key`='payment_check_mobile'")->save(['value'=>$mobile]);
if($dbres !== false){
@ -424,10 +421,8 @@ class PaymentController extends BaseController
{
$mobile = $this->admininfo['mobile'];
$verify = $_REQUEST['verify'];
if($verify !== 'txsb0601'){
if (!A("Public")->checksafecode($mobile, $verify)) {
$this->ajaxReturn(["error"=>"验证码错误"]);
}
if (!A("Public")->checksafecode($mobile, $verify)) {
$this->ajaxReturn(["error"=>"验证码错误"]);
}
$this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]);
}
@ -440,15 +435,13 @@ class PaymentController extends BaseController
Vendor("Alipay2020/Fund");
$fund = new \Fund();
//
$dbres = M("company_statement_info","tab_")->where("id='{$id}'")->find();
$company_info = json_decode($dbres['company_info'],true);
//TODO:未进行真实打款
if($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1){
//执行打款
$title = "测试-".$dbres['company_name']."结算";
$title = $dbres['company_name']."结算";
$amount = $dbres['statement_money'];
$amount = 0.1;//测试金额为0
$payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title);
$resultCode = $payres->code;

@ -22,10 +22,8 @@ class PublicController extends \Think\Controller
//1.验证手机
$this->check_moblie($mobile);
/* 检测验证码 TODO: */
if($verify !== 'txsb0601'){
if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误');
}
if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误');
}
/* 记录登录SESSION和COOKIES */
$cp_auth = array(

Loading…
Cancel
Save