You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Admin\Model;
|
|
|
|
|
|
|
|
use Think\Model;
|
|
|
|
|
|
|
|
class TransferMerchantModel extends Model
|
|
|
|
{
|
|
|
|
protected $tablePrefix = 'tab_';
|
|
|
|
const WAY_STR =[
|
|
|
|
"0"=>"未启用",
|
|
|
|
"1"=>"线上对账打款",
|
|
|
|
"2"=>"线下打款",
|
|
|
|
"3"=>"通用一个账号"
|
|
|
|
];
|
|
|
|
const IS_FREE_STR = [
|
|
|
|
"1"=>"官方直营接口(提现免手续费)",
|
|
|
|
"2"=>"官方支付宝接口"
|
|
|
|
];
|
|
|
|
const StatementPaymentWhere ="ways = 1 or ways = 3";
|
|
|
|
const UnderPaymentWhere ="ways = 2 or ways = 3";
|
|
|
|
public function getStatementPaymentInfo()
|
|
|
|
{
|
|
|
|
$res = $this->where(self::StatementPaymentWhere)->find();
|
|
|
|
if($res){
|
|
|
|
return $this->setInfoStr($res);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
public function getUnderPaymentInfo()
|
|
|
|
{
|
|
|
|
$res = $this->where(self::UnderPaymentWhere)->find();
|
|
|
|
if($res){
|
|
|
|
return $this->setInfoStr($res);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
public function setInfoStr($item)
|
|
|
|
{
|
|
|
|
$item["is_free_str"] = self::IS_FREE_STR[$item["is_free"]];
|
|
|
|
return $item;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getStatementPaymentConfig()
|
|
|
|
{
|
|
|
|
$res = $this->where(self::StatementPaymentWhere)->field("config")->find();
|
|
|
|
if($res){
|
|
|
|
return json_decode($res['config'],true);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getUnderPaymentConfig()
|
|
|
|
{
|
|
|
|
$res = $this->where(self::UnderPaymentWhere)->field("config")->find();
|
|
|
|
if($res){
|
|
|
|
return json_decode($res['config'],true);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|