|
|
|
@ -29,24 +29,24 @@ public class ActChairtyController {
|
|
|
|
|
@Resource
|
|
|
|
|
private ActChairtyService actChairtyService;
|
|
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/clients", method = RequestMethod.GET, role = { ManagerRole.ADMIN })
|
|
|
|
|
@ManagerMapping(value = "/clients", method = RequestMethod.GET, role = { ManagerRole.ADMIN,ManagerRole.OPERATOR,ManagerRole.SITE_MANAGER })
|
|
|
|
|
public JSONObject listAttendingClients(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int limit) {
|
|
|
|
|
// todo params
|
|
|
|
|
return actChairtyService.listChairClients(page, limit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/clients/{clientMoniker}", method = RequestMethod.PUT, role = { ManagerRole.ADMIN })
|
|
|
|
|
@ManagerMapping(value = "/clients/{clientMoniker}", method = RequestMethod.PUT, role = { ManagerRole.ADMIN,ManagerRole.OPERATOR,ManagerRole.SITE_MANAGER })
|
|
|
|
|
public void configClient(@PathVariable String clientMoniker, @RequestBody @Valid ActChairtyBean config, Errors errors,
|
|
|
|
|
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
|
HttpUtils.handleValidErrors(errors);
|
|
|
|
|
actChairtyService.configClient(clientMoniker, config, manager);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/traAnalysis", method = RequestMethod.GET, role = { ManagerRole.ADMIN })
|
|
|
|
|
@ManagerMapping(value = "/traAnalysis", method = RequestMethod.GET, role = { ManagerRole.ADMIN,ManagerRole.OPERATOR,ManagerRole.SITE_MANAGER })
|
|
|
|
|
public List<JSONObject> traAnalysis(ActChairtyQuery params) {
|
|
|
|
|
return actChairtyService.getWeekendAnalysis(params.params());
|
|
|
|
|
}
|
|
|
|
|
@ManagerMapping(value = "/ranking", method = RequestMethod.GET, role = { ManagerRole.ADMIN })
|
|
|
|
|
@ManagerMapping(value = "/ranking", method = RequestMethod.GET, role = { ManagerRole.ADMIN,ManagerRole.OPERATOR,ManagerRole.SITE_MANAGER })
|
|
|
|
|
public JSONObject getRanking(ActChairtyQuery params) {
|
|
|
|
|
PageList<JSONObject> clientRank = actChairtyService.getClientRank(params.params());
|
|
|
|
|
if(clientRank==null){
|
|
|
|
@ -55,7 +55,7 @@ public class ActChairtyController {
|
|
|
|
|
return PageListUtils.buildPageListResult(clientRank);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/total", method = RequestMethod.GET, role = {ManagerRole.ADMIN})
|
|
|
|
|
@ManagerMapping(value = "/total", method = RequestMethod.GET, role = { ManagerRole.ADMIN,ManagerRole.OPERATOR,ManagerRole.SITE_MANAGER })
|
|
|
|
|
public JSONObject getTotal() {
|
|
|
|
|
return actChairtyService.gettotal();
|
|
|
|
|
}
|
|
|
|
|