use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.
the class DelegateRelataionAction method fetchPlayers.
@AuthChecker
@RequestMapping("/fetchPlayers")
public AgentResponse fetchPlayers() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
long agentId = AgentUtil.getAgentByRequest(request);
List<OneLevelInfoVo> levelInfoVoList = delegateRelataionService.fetchSelfPlayerList(agentId);
Map<String, Object> result = new HashMap<>();
result.put("result", levelInfoVoList);
AgentResponse agentResponse = new AgentResponse(200, result);
return agentResponse;
}
use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.
the class DelegateRelataionAction method fetchOneLevelDelegate.
@AuthChecker
@RequestMapping("/fetch2Delegate")
public AgentResponse fetchOneLevelDelegate() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
long agentId = AgentUtil.getAgentByRequest(request);
List<TwoLevelInfoVo> list = delegateRelataionService.fetchTwoLevelDelegateList(agentId);
Map<String, Object> result = new HashMap<>();
result.put("result", list);
AgentResponse agentResponse = new AgentResponse(200, result);
return agentResponse;
}
use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.
the class RecommendDelegateAction method bindDelegate.
@AuthChecker
@RequestMapping("/bindDelegate")
public AgentResponse bindDelegate(long userId) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
long agentId = AgentUtil.getAgentByRequest(request);
boolean ret = recommendDelegateService.bindDelegate(userId, agentId);
Map<String, Object> result = new HashMap<>();
AgentResponse agentResponse = null;
if (ret) {
result.put("msg", "绑定失败");
agentResponse = new AgentResponse(500, result);
} else {
result.put("msg", "绑定成功");
agentResponse = new AgentResponse(200, result);
}
return agentResponse;
}
use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.
the class RecommendDelegateAction method findUser.
@AuthChecker
@RequestMapping("/findUser")
public AgentResponse findUser(long userId) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
long agentId = AgentUtil.getAgentByRequest(request);
RecommandUserVo vo = recommendDelegateService.findRecommandUser(userId, agentId);
Map<String, Object> result = new HashMap<>();
result.put("result", vo);
AgentResponse agentResponse = new AgentResponse(200, result);
return agentResponse;
}
use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.
the class TodayChargeAction method waterRecord.
@AuthChecker
// 流水记录
@RequestMapping("/waterRecord")
public AgentResponse waterRecord() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
long agentId = AgentUtil.getAgentByRequest(request);
List<WaterRecordVo> waterRecordVoList = todayChargeService.waterRecords(agentId);
AgentResponse agentResponse = new AgentResponse(200, waterRecordVoList);
return agentResponse;
}
Aggregations