34 lines
973 B
PHP
Executable File
34 lines
973 B
PHP
Executable File
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | 宏驰云科技开发团队 版权所有 拥有最终解释权
|
|
// +----------------------------------------------------------------------
|
|
|
|
// | Author: HcyShop-kiki
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace app\api\logic;
|
|
|
|
|
|
use app\common\model\NoticeSetting;
|
|
|
|
|
|
class SubscribeLogic
|
|
{
|
|
public static function lists($scene)
|
|
{
|
|
$where = [
|
|
['mnp_notice', '<>', ''],
|
|
['type', '=', 1]
|
|
];
|
|
$lists = NoticeSetting::where($where)->field('mnp_notice')->limit(3)->select()->toArray();
|
|
|
|
$template_id = [];
|
|
foreach ($lists as $item) {
|
|
if (isset($item['mnp_notice']['status']) && $item['mnp_notice']['status'] != 1) {
|
|
continue;
|
|
}
|
|
$template_id[] = $item['mnp_notice']['template_id'] ?? '';
|
|
}
|
|
return $template_id;
|
|
}
|
|
} |