| | |
| | | } |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | wrapper.eq("user_id", getUserId()); |
| | | if (getRole().getId()==1){ |
| | | wrapper.or().eq("host_id",1); |
| | | }else if (getRole().getId()==2){ |
| | | wrapper.eq("dept_id",getDeptId()); |
| | | }else { |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | } |
| | | if (signHostId){ |
| | | wrapper.or().eq("host_id",1); |
| | |
| | | } |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | wrapper.eq("user_id", getUserId()); |
| | | if (getRole().getId()==1){ |
| | | wrapper.or().eq("host_id",1); |
| | | }else if (getRole().getId()==2){ |
| | | wrapper.eq("dept_id",getDeptId()); |
| | | }else { |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | } |
| | | if (signHostId){ |
| | | wrapper.or().eq("host_id",1); |
| | |
| | | } |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | wrapper.eq("user_id", getUserId()); |
| | | if (getRole().getId()==1){ |
| | | wrapper.or().eq("host_id",1); |
| | | }else if (getRole().getId()==2){ |
| | | wrapper.eq("dept_id",getDeptId()); |
| | | }else { |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | } |
| | | if (signHostId){ |
| | | wrapper.or().eq("host_id",1); |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | if (deptId==null && userId == null){ |
| | | if (getRole().getId()==3){ |
| | | userId = getUserId(); |
| | | }else if (getRole().getId()==2){ |
| | | deptId = getDeptId(); |
| | | userId = null; |
| | | } |
| | | } |
| | | |
| | | return R.ok(cstmrService.getPage3(new Page<>(curr, limit) |
| | | , getHostId() |
| | | , deptId == null ? (userId == null? getDeptId().toString(): null) : String.valueOf(deptId) |
| | | , deptId == null ? null : String.valueOf(deptId) |
| | | , userId |
| | | , Cools.isEmpty(followerName) ? null : ids |
| | | , conditionName |
| | |
| | | |
| | | } |
| | | } |
| | | if (deptId==null && userId == null){ |
| | | if (getRole().getId()==3){ |
| | | userId = getUserId(); |
| | | }else if (getRole().getId()==2){ |
| | | deptId = getDeptId(); |
| | | userId = null; |
| | | } |
| | | } |
| | | |
| | | return R.ok(cstmrService.getPage33(new Page<>(curr, limit) |
| | | , getHostId() |
| | | , deptId == null ? null : String.valueOf(deptId) |
| | | , userId == null ? getUserId() : userId |
| | | , userId |
| | | , Cools.isEmpty(followerName) ? null : ids |
| | | , conditionName |
| | | , condition) |
| | |
| | | if (param.get("status") != null) { |
| | | status = Integer.parseInt(param.get("status").toString()); |
| | | } |
| | | |
| | | if (deptId==null && userId == null){ |
| | | if (getRole().getId()==3){ |
| | | userId = getUserId(); |
| | | }else if (getRole().getId()==2){ |
| | | deptId = getDeptId(); |
| | | userId = null; |
| | | } |
| | | } |
| | | |
| | | return R.ok(orderService.getPage(new Page<>(curr, limit) |
| | | , getHostId() |
| | | , deptId == null ? (userId == null? getDeptId().toString(): null) : String.valueOf(deptId) |
| | | , deptId == null ? null : String.valueOf(deptId) |
| | | , userId |
| | | , condition |
| | | , status) |
| | |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam(required = false, value = "dept_id") Long deptId, |
| | | @RequestParam(required = false, value = "user_id") Long userId) { |
| | | if (deptId==null && userId == null){ |
| | | if (getRole().getId()==3){ |
| | | userId = getUserId(); |
| | | }else if (getRole().getId()==2){ |
| | | deptId = getDeptId(); |
| | | userId = null; |
| | | } |
| | | } |
| | | |
| | | return R.ok(planService.getPage(new Page<>(curr, limit) |
| | | , getHostId() |
| | | , deptId == null ? (userId == null? getDeptId().toString(): null) : String.valueOf(deptId) |
| | | , deptId == null ? null : String.valueOf(deptId) |
| | | , userId |
| | | , condition) |
| | | ); |
| | |
| | | } |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | wrapper.eq("user_id", getUserId()); |
| | | if (getRole().getId()==1){ |
| | | wrapper.or().eq("host_id",1); |
| | | }else if (getRole().getId()==2){ |
| | | wrapper.eq("dept_id",getDeptId()); |
| | | }else { |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | } |
| | | if (signHostId){ |
| | | wrapper.or().eq("host_id",1); |
| | |
| | | } |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | wrapper.eq("user_id", getUserId()); |
| | | if (getRole().getId()==1){ |
| | | wrapper.or().eq("host_id",1); |
| | | }else if (getRole().getId()==2){ |
| | | wrapper.eq("dept_id",getDeptId()); |
| | | }else { |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | } |
| | | if (signHostId){ |
| | | wrapper.or().eq("host_id",1); |
| | |
| | | <otherwise> |
| | | and |
| | | ( |
| | | user_id = #{userId} |
| | | <if test="condition != null and condition != ''"> |
| | | user_id = #{userId} |
| | | </if> |
| | | <if test="condition == null or condition == ''"> |
| | | user_id is not null |
| | | </if> |
| | | or |
| | | mp.id in |
| | | ( |