REAPI/app/merchant/service/MobileService.php

41 lines
755 B
PHP
Raw Permalink Normal View History

2024-09-29 15:43:18 +08:00
<?php
namespace app\merchant\service;
use app\core\Service;
use think\admin\extend\CodeExtend;
/**
* 商户使用卡密
* Class CardService
* @package app\merchant\service
*/
class MobileService extends Service
{
/**
* 设置默认操作表
* @var string
*/
public $table = 'merchant_card_mobile';
# 提交订单
public function up($card, $mobile)
{
$info = $this->get($card);
if (!$info) {
$data['card'] = $card;
$data['mobile'] = $mobile;
$this->db()->insert($data);
}
return true;
}
public function get($card)
{
$where['card'] = $card;
$data = $this->db()->where($where)->find();
return $data;
}
}