| | |
| | | |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.util.ResponseUtil; |
| | | import com.sandu.ximon.admin.context.CustomerInspectContextHolder; |
| | | import com.sandu.ximon.admin.param.ClientPrarm; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.service.ClientService; |
| | |
| | | |
| | | @GetMapping("/list") |
| | | public ResponseVO<Object> listClient(){ |
| | | SecurityUtils.getUserId(); |
| | | clientService.list(); |
| | | Integer administratorIdentity = SecurityUtils.getAdministratorIdentity(); |
| | | if(administratorIdentity==0){//判断 如果是管理员 就判断下CustomerInspectContextHolder.getCustomerId() 有没有值 |
| | | return ResponseUtil.success(clientService.list()); |
| | | }else { |
| | | return ResponseUtil.success(clientService.clientList(SecurityUtils.getUserId())); |
| | | } |
| | | /* |
| | | Long customerId = CustomerInspectContextHolder.getCustomerId(); |
| | | if (customerId!=null){ |
| | | return ResponseUtil.success(clientService.list()); |
| | | }else { |
| | | //return ResponseUtil.success(clientService.list()); |
| | | return ResponseUtil.success(clientService.clientList(SecurityUtils.getUserId())); |
| | | }*/ |
| | | |
| | | } |
| | | |
| | | |
| | | } |