查询用户相关信息
							parent
							
								
									6bacdb06bc
								
							
						
					
					
						commit
						0f63fe8e24
					
				| 
						 | 
				
			
			@ -28,15 +28,39 @@ public class IndexDataController {
 | 
			
		|||
    private IndexService indexService;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 待办工单列表
 | 
			
		||||
     * @param pager
 | 
			
		||||
     * @param requestContext
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/doneWorkOrder")
 | 
			
		||||
    @Operation(summary = "待办工单列表")
 | 
			
		||||
    public GeneralResult doneWorkOrder(Pager pager, @Value(Common.REQ_CONTEXT) RequestContext requestContext) {
 | 
			
		||||
        return indexService.doneWorkOrder(pager, requestContext);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 工单统计
 | 
			
		||||
     * @param pager
 | 
			
		||||
     * @param requestContext
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/workOrder/stattic")
 | 
			
		||||
    @Operation(summary = "待办工单列表")
 | 
			
		||||
    @Operation(summary = "工单统计")
 | 
			
		||||
    public GeneralResult workOrderStatic(Pager pager, @Value(Common.REQ_CONTEXT) RequestContext requestContext) {
 | 
			
		||||
        return indexService.workOrderStatic(requestContext);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 当前用户首页数据展示模块的数据查询
 | 
			
		||||
     * @param pager
 | 
			
		||||
     * @param requestContext
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/userData/stattic")
 | 
			
		||||
    @Operation(summary = "当前用户首页数据展示模块的数据查询")
 | 
			
		||||
    public GeneralResult userStatic(Pager pager, @Value(Common.REQ_CONTEXT) RequestContext requestContext) {
 | 
			
		||||
        return indexService.userDataStatic(requestContext);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,4 +11,6 @@ public interface IndexService {
 | 
			
		|||
    GeneralResult doneWorkOrder(Pager pager, RequestContext requestContext);
 | 
			
		||||
 | 
			
		||||
    GeneralResult workOrderStatic(RequestContext requestContext);
 | 
			
		||||
 | 
			
		||||
    GeneralResult userDataStatic(RequestContext requestContext);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,4 +80,26 @@ public class IndexServiceImpl implements IndexService {
 | 
			
		|||
            return new GeneralResult(false, "查询失败");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public GeneralResult userDataStatic(RequestContext requestContext) {
 | 
			
		||||
        try {
 | 
			
		||||
            //查询当前用户授权应用
 | 
			
		||||
            JSONObject param = new JSONObject();
 | 
			
		||||
            param.put("userId", "1111");
 | 
			
		||||
            param.put("type", "user");
 | 
			
		||||
            String result = ykUtil.call(YkInfo.getUserAppList, param, JSONArray.class);
 | 
			
		||||
 | 
			
		||||
            //获取用户信息
 | 
			
		||||
            JSONObject userParam = new JSONObject();
 | 
			
		||||
            param.put("userParam", "1111");
 | 
			
		||||
            String userRolesStr = ykUtil.call(YkInfo.getUserRoles, param, JSONArray.class);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            return new GeneralResult(true, "查询成功");
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
            log.info("查询失败", e);
 | 
			
		||||
            return new GeneralResult(false, "查询失败");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue