|
|
@ -34,9 +34,9 @@ public class WlyyUserRoleService extends BaseJpaService<WlyyUserRole, WlyyUserRo
|
|
|
public PageEnvelop<List<Map<String,Object>>> getAdminList(String name,String idcard,String mobile,Integer page,Integer size){
|
|
|
page = page>0?page-1:0;
|
|
|
String sql = " select ur.id,doc.name,doc.idcard,doc.id doctorCode,doc.mobile,ur.role,wr.code,wr.name roleName,wr.level from base_doctor doc " +
|
|
|
" INNER JOIN wlyy_user_role ur on doc.id = ur.`user` INNER JOIN wlyy_role wr on ur.role = wr.`code` where 1=1 " ;
|
|
|
" INNER JOIN wlyy_user_role ur on doc.id = ur.user_code INNER JOIN wlyy_role wr on ur.role = wr.code where 1=1 " ;
|
|
|
String sqlCount = " select count(ur.id) from base_doctor doc " +
|
|
|
" INNER JOIN wlyy_user_role ur on doc.id = ur.`user` INNER JOIN wlyy_role wr on ur.role = wr.`code` where 1=1 ";
|
|
|
" INNER JOIN wlyy_user_role ur on doc.id = ur.user_code INNER JOIN wlyy_role wr on ur.role = wr.code where 1=1 ";
|
|
|
String filter = " ";
|
|
|
if (StringUtils.isNotBlank(name)){
|
|
|
filter += " and doc.`name`like '%"+name+"%' ";
|
|
|
@ -108,8 +108,8 @@ public class WlyyUserRoleService extends BaseJpaService<WlyyUserRole, WlyyUserRo
|
|
|
*根据id获取权限详情
|
|
|
*/
|
|
|
public Map<String,Object> getUserRoleById(String id){
|
|
|
String sql = " select ur.id,doc.name,doc.idcard,doc.id doctorCode,doc.mobile,ur.role,wr.code,wr.name roleName,wr.level from base_doctor doc " +
|
|
|
" INNER JOIN wlyy_user_role ur on doc.id = ur.`user` INNER JOIN wlyy_role wr on ur.role = wr.`code` where ur.id='"+id+"' " ;
|
|
|
String sql = " select ur.id,doc.name,doc.idcard,doc.id doctorCode,doc.mobile,ur.role,wr.code,wr.name roleName,wr.level_code from base_doctor doc " +
|
|
|
" INNER JOIN wlyy_user_role ur on doc.id = ur.user_code INNER JOIN wlyy_role wr on ur.role = wr.code where ur.id='"+id+"' " ;
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
if (list.size()>0){
|
|
|
return list.get(0);
|