触客宝 内容管理提交
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace app\chukebao\controller;
|
||||
|
||||
use library\ResponseHelper;
|
||||
use think\Db;
|
||||
|
||||
class WechatGroupController extends BaseController
|
||||
{
|
||||
|
||||
public function getList(){
|
||||
|
||||
$accountId = $this->getUserInfo('s2_accountId');
|
||||
$userId = $this->getUserInfo('id');
|
||||
$companyId = $this->getUserInfo('companyId');
|
||||
|
||||
$query = Db::table('s2_wechat_group')->where(['accountId' => $accountId])->whereIn('groupType',[1,2])->order('sortIndex desc,id desc');
|
||||
$list = $query->select();
|
||||
$total = $query->count();
|
||||
|
||||
|
||||
// 处理每个好友的数据
|
||||
foreach ($list as $k => &$v) {
|
||||
$v['createTime'] = !empty($v['createTime']) ? date('Y-m-d H:i:s', $v['createTime']) : '';
|
||||
}
|
||||
unset($v);
|
||||
|
||||
return ResponseHelper::success(['list'=>$list,'total'=>$total]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user