Commit d8f95f40 authored by lixiaolei's avatar lixiaolei

submit

parent 086ec855
......@@ -22,9 +22,9 @@ public class BusinessListDto {
private Integer userId;
/**
* 部门id
* 用户查看全部他人可见项目标示
*/
private Integer deptId;
private Integer others;
/**
* 省id
......
......@@ -80,13 +80,21 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
*/
@Override
public List<BusinessListVo> selectBusinessInfoList(BusinessListDto dto) {
//userId不传值,就查询全部门项目
// if (dto.getUserId() == null) {
// Long deptId = SecurityUtils.getLoginUser().getDeptId();
// if (deptId == null) throw new BaseException("请登录");
// dto.setDeptId(deptId.intValue());
// }
return businessInfoMapper.selectBusinessInfoList(dto);
List<BusinessListVo> othersList = null;
//userId不传值,就查询全部他人可见项目+自己的
if (dto.getUserId() == null) {
Long userId = SecurityUtils.getLoginUser().getUserId();
if (userId == null) throw new BaseException("请登录");
dto.setOthers(userId.intValue());
//查询他人可见项目
othersList = businessInfoMapper.selectBusinessInfoList(dto);
}
dto.setOthers(null);
//查询自己参与的项目
List<BusinessListVo> businessList = businessInfoMapper.selectBusinessInfoList(dto);
businessList.addAll(othersList);
return businessList;
}
@Override
......
......@@ -131,8 +131,8 @@
<if test="userId != null">
and bu.user_id = #{userId}
</if>
<if test="userId == null">
and i.is_private = 1
<if test="others != null">
and bu.user_id != #{others} and i.is_private = 1
</if>
<if test="provinceId != null and provinceId.size > 0 and cityId == null and districtId == null">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment