修复问题文件:appplication\admin\model\special
修改方法:getLecturerList
public static function getLecturerList($where)
{
$data = self::setMerWhere($where, 'l')->page((int)$where['page'], (int)$where['limit'])->select();
$data = count($data) ? $data->toArray() : [];
foreach ($data as $key => &$item) {
$item['recommend'] = RecommendRelation::where('a.link_id', $item['id'])->where('a.type', 6)->alias('a')
->join('__RECOMMEND__ r', 'a.recommend_id=r.id')->column('a.id,r.title');
$item['web_recommend'] = WebRecommendRelation::where('a.link_id', $item['id'])->where('a.type', 2)->alias('a')
->join('__WEB_RECOMMEND__ r', 'a.recommend_id=r.id')->column('a.id,r.title');
$curriculum = Special::PreWhere()->where(['lecturer_id' => $item['id'], 'mer_id' => $item['mer_id']])->count();
if ($item['curriculum'] != $curriculum) {
self::where('id', $item['id'])->update(['curriculum' => $curriculum]);
$item['curriculum'] = $curriculum;
}
}
$count = self::setMerWhere($where, 'l')->count();
return compact('data', 'count');
}