作者 sgj
1 个管道 的构建 失败 耗费 12 秒

增加排行信息

... ... @@ -30,7 +30,7 @@ class TeamModel extends Model
* @throws \think\exception\DbException
*/
public function getTeamList($order,$field){
$map['status']=1;
$map['status']=2;
$info=$this->where($map)->order($order)->select()->toArray();
return $info;
}
... ...
... ... @@ -62,6 +62,7 @@ class SecondController extends RestBaseController
$list=$userModel->getListByLevel($star);
$return=[];
foreach ($list as $k=>$v){
$return[$k]['user_id']=$v['user_id'];
$return[$k]['name']=$v['name'];
$return[$k]['province']=$v['province'];
$return[$k]['work_time']=$v['work_time'];
... ... @@ -71,6 +72,7 @@ class SecondController extends RestBaseController
$list=$teamModel->getTeamList('work_total_time desc','');
if(!empty($list)){
foreach ($list as $k=>$v){
$return[$k]['team_id']=$v['id'];
$return[$k]['name']=$v['name'];
$return[$k]['work_time']=$v['work_total_time'];
}
... ...
... ... @@ -298,7 +298,7 @@ class ActivityController extends AdminBaseController
$teamId=$this->getAdminTeamId();
if($this->request->isPost()){
$param=$this->request->param();
$param['item_id']=$this->getAdminTeamId();
$param['team_id']=$this->getAdminTeamId();
$param['create_time']=time();
$param['update_time']=time();
$param['team_id']=$teamId;
... ...