You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
698 B

<?php
namespace app\mall\model;
use think\model\concern\SoftDelete;
class MallSpikeConfig extends Base
{
use SoftDelete;
/**
* 获取秒杀商城配置
* @param string $field
* @date 2021-03-01
*/
public function getConfig($field = '*')
{
$where = [
['uid', '=', $this->mid]
];
$array = explode(',', $field);
if ($field != '*') {
if (count($array) <= 1) {
return $this->where($where)->value($field);
} else {
return $this->field($field)->where($where)->find();
}
} else {
return $this->where($where)->find();
}
}
}