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.

42 lines
964 B
PHP

<?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"=>"官方接口"
];
public function getStatementPaymentInfo()
{
$res = $this->where("ways = 1 or ways = 3")->find();
if($res){
return $this->setInfoStr($res);
}
return false;
}
public function getUnderPaymentInfo()
{
$res = $this->where("ways = 2 or ways = 3")->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;
}
}