|
|
|
@ -22,6 +22,7 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
$mainName = I('main_name', '');
|
|
|
|
|
$adminId = I('admin_id', 0);
|
|
|
|
|
$channel = I('channel', 0);
|
|
|
|
|
$account = I('account', '');
|
|
|
|
|
$way = I('way', 0);
|
|
|
|
|
$status = I('status', -1);
|
|
|
|
|
$startedAt = I('started_at', '1970-01-01');
|
|
|
|
@ -34,6 +35,9 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
if ($mainName != '') {
|
|
|
|
|
$conditions['main_name'] = ['like', '%' . $mainName . '%'];
|
|
|
|
|
}
|
|
|
|
|
if ($account != '') {
|
|
|
|
|
$conditions['account'] = ['like', '%' . $account . '%'];
|
|
|
|
|
}
|
|
|
|
|
if ($adminId != 0) {
|
|
|
|
|
$conditions['admin_id'] = $adminId;
|
|
|
|
|
}
|
|
|
|
@ -99,7 +103,7 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
|
|
|
|
|
public function add()
|
|
|
|
|
{
|
|
|
|
|
$this->meta_title = '添加商户';
|
|
|
|
|
$this->meta_title = '添加收款商户';
|
|
|
|
|
$this->assign('channels', PaymentMerchantService::$channels);
|
|
|
|
|
$this->display('form');
|
|
|
|
|
}
|
|
|
|
@ -131,11 +135,11 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
|
|
|
|
|
public function edit()
|
|
|
|
|
{
|
|
|
|
|
$this->meta_title = '编辑商户';
|
|
|
|
|
$this->meta_title = '编辑收款商户';
|
|
|
|
|
$id = I('id', 0);
|
|
|
|
|
$merchant = M('payment_merchant', 'tab_')->where(['id' => $id])->find();
|
|
|
|
|
if ($merchant == null) {
|
|
|
|
|
$this->error('支付商户不存在');
|
|
|
|
|
$this->error('收款商户不存在');
|
|
|
|
|
}
|
|
|
|
|
$paymentMerchantService = new PaymentMerchantService();
|
|
|
|
|
$config = $merchant['config'] ? json_decode($merchant['config'], true) : null;
|
|
|
|
@ -162,7 +166,7 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
if ($name == '') {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
|
'status' => 0,
|
|
|
|
|
'message' => '请输入商户名称',
|
|
|
|
|
'message' => '请输入支付配置名称',
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
if ($mainName == '') {
|
|
|
|
|