|
|
|
@ -110,9 +110,15 @@ class PaymentTemplate extends BaseModel |
|
|
|
|
* @throws \think\db\exception\DbException |
|
|
|
|
* @throws \think\db\exception\ModelNotFoundException |
|
|
|
|
*/ |
|
|
|
|
public function getAll() |
|
|
|
|
public function getAll($merchantId = 0) |
|
|
|
|
{ |
|
|
|
|
return $this->where('is_delete', '=', 0) |
|
|
|
|
$where = [ |
|
|
|
|
['is_delete', '=', 0], |
|
|
|
|
]; |
|
|
|
|
if (isset($merchantId) && $merchantId) { |
|
|
|
|
$where[] = ['merchant_id', '=', $merchantId]; |
|
|
|
|
} |
|
|
|
|
return $this->where($where) |
|
|
|
|
->order(['sort' => 'asc', $this->getPk()]) |
|
|
|
|
->select(); |
|
|
|
|
} |
|
|
|
|