Search in sources :

Example 11 with AuthChecker

use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.

the class TodayChargeAction method showTodayTwoLevelChargeList.

@AuthChecker
// 二级代理充值记录
@RequestMapping("/dlevel2Charges")
public AgentResponse showTodayTwoLevelChargeList(String start, String end) {
    ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
    HttpServletRequest request = attributes.getRequest();
    long agentId = AgentUtil.getAgentByRequest(request);
    Date startDate = DateUtil.convert2Date(start);
    Date endDate = DateUtil.convert2Date(end);
    TwoLevelVo twoLevelVo = todayChargeService.twoLevelCharges(startDate, endDate, agentId);
    Map<String, Object> result = new HashMap<>();
    result.put("result", twoLevelVo);
    AgentResponse agentResponse = new AgentResponse(200, result);
    return agentResponse;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) ServletRequestAttributes(org.springframework.web.context.request.ServletRequestAttributes) AuthChecker(com.code.server.login.anotation.AuthChecker) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 12 with AuthChecker

use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.

the class TodayChargeAction method showTodayOneLevelChargeList.

@AuthChecker
@RequestMapping("/dlevel1Charges")
public AgentResponse showTodayOneLevelChargeList(String start, String end) {
    ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
    HttpServletRequest request = attributes.getRequest();
    long agentId = AgentUtil.getAgentByRequest(request);
    Date startDate = DateUtil.convert2Date(start);
    Date endDate = DateUtil.convert2Date(end);
    OneLevelVo oneLevelVo = todayChargeService.oneLevelCharges(startDate, endDate, agentId);
    Map<String, Object> result = new HashMap<>();
    result.put("result", oneLevelVo);
    AgentResponse agentResponse = new AgentResponse(200, result);
    return agentResponse;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) ServletRequestAttributes(org.springframework.web.context.request.ServletRequestAttributes) AuthChecker(com.code.server.login.anotation.AuthChecker) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 13 with AuthChecker

use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.

the class TodayChargeAction method homeCharge.

@AuthChecker
@RequestMapping("/dhomeCharge")
public AgentResponse homeCharge(String start, String end) {
    ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
    HttpServletRequest request = attributes.getRequest();
    long agentId = AgentUtil.getAgentByRequest(request);
    Date startDate = DateUtil.convertDay2Date(start);
    Date endDate = DateUtil.convertDay2Date(end);
    HomeChargeVo homeChargeVo = todayChargeService.showCharge(startDate, endDate, agentId);
    Map<String, Object> result = new HashMap<>();
    result.put("result", homeChargeVo);
    AgentResponse agentResponse = new AgentResponse(200, result);
    return agentResponse;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) ServletRequestAttributes(org.springframework.web.context.request.ServletRequestAttributes) AuthChecker(com.code.server.login.anotation.AuthChecker) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 14 with AuthChecker

use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.

the class TodayChargeAction method showTodayThreeLevelChargeList.

@AuthChecker
// 二级代理充值记录
@RequestMapping("/level3Charges")
public AgentResponse showTodayThreeLevelChargeList() {
    ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
    HttpServletRequest request = attributes.getRequest();
    long agentId = AgentUtil.getAgentByRequest(request);
    ThreeLevelVo threeLevelVo = todayChargeService.threeLevelCharges(agentId);
    Map<String, Object> result = new HashMap<>();
    result.put("result", threeLevelVo);
    AgentResponse agentResponse = new AgentResponse(200, result);
    return agentResponse;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) ServletRequestAttributes(org.springframework.web.context.request.ServletRequestAttributes) AuthChecker(com.code.server.login.anotation.AuthChecker) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 15 with AuthChecker

use of com.code.server.login.anotation.AuthChecker in project summer by foxsugar.

the class TodayChargeAction method showTodayTwoLevelChargeList.

@AuthChecker
// 二级代理充值记录
@RequestMapping("/level2Charges")
public AgentResponse showTodayTwoLevelChargeList() {
    ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
    HttpServletRequest request = attributes.getRequest();
    long agentId = AgentUtil.getAgentByRequest(request);
    Map<String, Object> result = new HashMap<>();
    TwoLevelVo twoLevelVo = todayChargeService.twoLevelCharges(agentId);
    result.put("result", twoLevelVo);
    AgentResponse agentResponse = new AgentResponse(200, result);
    return agentResponse;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) ServletRequestAttributes(org.springframework.web.context.request.ServletRequestAttributes) AuthChecker(com.code.server.login.anotation.AuthChecker) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

AuthChecker (com.code.server.login.anotation.AuthChecker)17 HttpServletRequest (javax.servlet.http.HttpServletRequest)17 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)17 ServletRequestAttributes (org.springframework.web.context.request.ServletRequestAttributes)17 HashMap (java.util.HashMap)6 AgentInfo (com.code.server.constant.db.AgentInfo)1 ChildCost (com.code.server.constant.db.ChildCost)1 AgentBean (com.code.server.constant.game.AgentBean)1 HomePageVo (com.code.server.login.vo.HomePageVo)1 OneLevelInfoVo (com.code.server.login.vo.OneLevelInfoVo)1 RecommandUserVo (com.code.server.login.vo.RecommandUserVo)1 TwoLevelInfoVo (com.code.server.login.vo.TwoLevelInfoVo)1 UserInfoVo (com.code.server.login.vo.UserInfoVo)1