提交修改

This commit is contained in:
quyixiao 2020-11-02 12:09:53 +08:00
parent 2a73677ea1
commit 8b6ec86a1a
5 changed files with 21 additions and 4 deletions

View File

@ -210,5 +210,10 @@ public class StaffRoleController {
return staffRoleService.selectRoleInfoBy(roleModel);
}
// http://localhost:8080/lz_management/user/lzstaffrole/role/detail
@RequestMapping("/role/detail")
public R roleDetail(RoleModel roleModel) {
return staffRoleService.selectRoleDetail(roleModel);
}
}

View File

@ -15,5 +15,5 @@ public class StaffRoleInfo {
//@ApiModelProperty(value = "0表示全部部门1 所在部门及以下部门2表示特定部门", name = "departmentId")
private int canSee = 1;
private List<String> menuNames;
private String departmentLevel;
private Long id ;
}

View File

@ -4,7 +4,8 @@ import lombok.Data;
@Data
public class RoleModel {
private int currPage =1;
private int currPage = 1;
private int pageSize = 10;
private Long id;
}

View File

@ -55,4 +55,6 @@ public interface StaffRoleService extends IService<StaffRole> {
List<StaffRole> selectStaffRolesByStaffId(List<Long> mIds);
R selectRoleInfoBy(RoleModel roleModel);
R selectRoleDetail(RoleModel roleModel);
}

View File

@ -6,6 +6,7 @@ import com.google.common.collect.Maps;
import com.lz.common.utils.NumberUtil;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.app.dao.DepartmentsDao;
import com.lz.modules.app.dao.StaffDao;
import com.lz.modules.app.dto.StaffRoleInfo;
@ -292,8 +293,8 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
StaffRoleInfo staffRoleInfo = new StaffRoleInfo();
StaffEntity staffEntity = staffDao.selectStaffById(staffRole.getStaffId());
staffRoleInfo.setName(staffEntity.getName());
staffRoleInfo.setDepartmentLevel(staffRole.getDepartmentLevel());
staffRoleInfo.setHeaderUrl(staffEntity.getAvatar());
staffRoleInfo.setId(staffRole.getId());
masterPM.add(staffRoleInfo);
}
@ -321,7 +322,7 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
List<StaffRoleInfo> boss = new ArrayList<>();
for (StaffRole staffRole : bossList) {
StaffRoleInfo staffRoleInfo = new StaffRoleInfo();
staffRoleInfo.setDepartmentLevel(staffRole.getDepartmentLevel());
staffRoleInfo.setId(staffRole.getId());
StaffEntity staffEntity = staffDao.selectStaffById(staffRole.getStaffId());
staffRoleInfo.setName(staffEntity.getName());
staffRoleInfo.setHeaderUrl(staffEntity.getAvatar());
@ -334,4 +335,12 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
return R.ok().put("data", map);
}
@Override
public R selectRoleDetail(RoleModel roleModel) {
if(roleModel.getId() == null){
return R.error("必需传入id");
}
return null;
}
}