@ -34,10 +34,13 @@ class PaymentTemplate extends PaymentTemplateModel
*/
public function getList($merchantId = 0): \think\Paginator
{
$where = [];
$where = [
['is_delete', '=', 0],
];
if (isset($merchantId) && $merchantId) {
$where = ['merchant_id', '=', $merchantId];
$where[] = ['merchant_id', '=', $merchantId];
}
return $this->where($where)->where('is_delete', '=', 0)
->order(['sort' => 'asc', $this->getPk()])
->paginate(15);