$play_lists=$spPlaylistModel->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")->field("A.id,A.`name`,A.sp_id,group_concat(B.media_id) media_ids")->group("A.id")->select();
$play_lists=$spPlaylistModel->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")->field("A.id,A.`name`,A.sp_id,group_concat(B.media_id) media_ids")->group("A.id")->select();
$region_lists=$regionModel->where("`level` < 4 and pid < 999999")->select();
$play_lists=$spPlaylistModel->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")->field("A.id,A.`name`,A.sp_id,group_concat(B.media_id) media_ids")->group("A.id")->select();
$region_lists=$regionModel->where("`level` < 4 and pid < 999999")->select();
@@ -25,6 +24,7 @@ class UserAction extends CommonAction{
$user=$userModel->getUserInfo($id);
$user=$user[0];
$sp_lists=$spModel->field("A.id,A.`name`,if(B.`status`=0,'true',null) as selected")->join("A left join sh_sp_user_map B on A.id = B.sp_id and B.user_id = $id")->where("A.`status`=0")->select();
foreach($roleas$key=>$value){
if($role[$key]['id']==$user['role_id'])
$role[$key]['selected']='selected';
...
...
@@ -44,6 +44,7 @@ class UserAction extends CommonAction{
@@ -12,7 +12,8 @@ class UserModel extends RelationModel{
)
);
publicfunctiongetUserInfo($id){
$sql="select vru.*,vrru.role_id from rbac_user vru,rbac_role_user vrru where vru.id=".$id." and vrru.user_id=vru.id";
// $sql="select vru.*,vrru.role_id from rbac_user vru,rbac_role_user vrru where vru.id=".$id." and vrru.user_id=vru.id"; //WJZ 20190729 注释
$sql="select A.*,GROUP_CONCAT(ssum.sp_id) sp_ids from (select vru.*,vrru.role_id from rbac_user vru,rbac_role_user vrru where vru.id=".$id." and vrru.user_id=vru.id)A left join sh_sp_user_map ssum on A.id = ssum.user_id";