|
@@ -11,6 +11,8 @@ import com.charging.chargingparking.modules.common.dto.Sort;
|
|
|
import com.charging.chargingparking.service.ParkingInfoService;
|
|
|
import com.charging.chargingparking.service.ParkingMemberLogService;
|
|
|
import com.charging.chargingparking.service.ParkingMemberService;
|
|
|
+import com.charging.chargingparking.service.ParkingUserRelationService;
|
|
|
+import com.charging.chargingparking.sys.service.UserService;
|
|
|
import com.charging.chargingparking.utils.StringUtils;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -42,6 +44,12 @@ public class ParkingMemberInfoController {
|
|
|
@Autowired
|
|
|
private ParkingMemberLogService parkingMemberLogService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private UserService userService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ParkingUserRelationService parkingUserRelationService;
|
|
|
+
|
|
|
@ApiOperation(value = "创建空记录")
|
|
|
@GetMapping("create")
|
|
|
public MessageResult<ParkingMember> create() {
|
|
@@ -178,8 +186,6 @@ public class ParkingMemberInfoController {
|
|
|
@RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
|
@RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
|
|
|
@RequestAttribute String subject) {
|
|
|
-
|
|
|
-
|
|
|
//当前用户ID
|
|
|
System.out.println(subject);
|
|
|
|
|
@@ -222,6 +228,10 @@ public class ParkingMemberInfoController {
|
|
|
|
|
|
searchParams.put("userId", subject);
|
|
|
|
|
|
+ if(!userService.hasRole(subject,"SYSADMIN")) {
|
|
|
+ searchParams.put("filterParkingList", parkingUserRelationService.findByUserId(subject));
|
|
|
+ }
|
|
|
+
|
|
|
Page<ParkingMember> page = parkingMemberService.pageSearch(searchParams, pageIndex, pageSize, sortList);
|
|
|
|
|
|
for (ParkingMember parkingMember : page) {
|