作者 lyh

gx

... ... @@ -13,12 +13,11 @@ use App\Models\Mail\Mail as MailModel;
*/
class MailController extends BaseController
{
public function lists(){
public function lists(MailLogic $mailLogic){
if(isset($this->map['title']) && !empty($this->map['title'])){
$this->map['title'] = ['like','%'.$this->map['title'].'%'];
}
$mailModel = new MailModel();
$lists = $mailModel->lists($this->map,$this->page,$this->row,$this->order);
$lists = $mailLogic->mail_lists($this->map,$this->page,$this->row,$this->order);
$this->response('列表',Code::SUCCESS,$lists);
}
... ...
... ... @@ -15,6 +15,23 @@ class MailLogic extends BaseLogic
}
/**
* @remark :列表
* @name :mail_lists
* @author :lyh
* @method :post
* @time :2023/6/21 16:38
*/
public function mail_lists($map,$page,$row,$order = 'created_at',$filed = ['*']){
$lists = $this->model->lists($map,$page,$row,$order,$filed);
if(!empty($lists)){
foreach ($lists['list'] as $k => $v){
$lists['list'][$k]['user_list_name'] = $this->model->getUserListName($v['user_list']);
}
}
return $this->success($lists);
}
/**
* @name :获取详情
* @return void
* @author :liyuhang
... ...