Commit d8f95f40 authored by lixiaolei's avatar lixiaolei

submit

parent 086ec855
...@@ -22,9 +22,9 @@ public class BusinessListDto { ...@@ -22,9 +22,9 @@ public class BusinessListDto {
private Integer userId; private Integer userId;
/** /**
* 部门id * 用户查看全部他人可见项目标示
*/ */
private Integer deptId; private Integer others;
/** /**
* 省id * 省id
......
...@@ -80,13 +80,21 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -80,13 +80,21 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
*/ */
@Override @Override
public List<BusinessListVo> selectBusinessInfoList(BusinessListDto dto) { public List<BusinessListVo> selectBusinessInfoList(BusinessListDto dto) {
//userId不传值,就查询全部门项目 List<BusinessListVo> othersList = null;
// if (dto.getUserId() == null) { //userId不传值,就查询全部他人可见项目+自己的
// Long deptId = SecurityUtils.getLoginUser().getDeptId(); if (dto.getUserId() == null) {
// if (deptId == null) throw new BaseException("请登录"); Long userId = SecurityUtils.getLoginUser().getUserId();
// dto.setDeptId(deptId.intValue()); if (userId == null) throw new BaseException("请登录");
// } dto.setOthers(userId.intValue());
return businessInfoMapper.selectBusinessInfoList(dto); //查询他人可见项目
othersList = businessInfoMapper.selectBusinessInfoList(dto);
}
dto.setOthers(null);
//查询自己参与的项目
List<BusinessListVo> businessList = businessInfoMapper.selectBusinessInfoList(dto);
businessList.addAll(othersList);
return businessList;
} }
@Override @Override
......
...@@ -131,8 +131,8 @@ ...@@ -131,8 +131,8 @@
<if test="userId != null"> <if test="userId != null">
and bu.user_id = #{userId} and bu.user_id = #{userId}
</if> </if>
<if test="userId == null"> <if test="others != null">
and i.is_private = 1 and bu.user_id != #{others} and i.is_private = 1
</if> </if>
<if test="provinceId != null and provinceId.size > 0 and cityId == null and districtId == null"> <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