| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.controller;
|
1 |
package com.spice.profitmandi.web.controller;
|
| 2 |
|
2 |
|
| 3 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
3 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| 4 |
import com.spice.profitmandi.dao.repository.cs.AgentRecordingRepository;
|
4 |
import com.spice.profitmandi.dao.repository.cs.AgentRecordingRepository;
|
| - |
|
5 |
import com.spice.profitmandi.service.integrations.kommuno.KommunoService;
|
| 5 |
import com.spice.profitmandi.service.integrations.smartping.SmartPingService;
|
6 |
import com.spice.profitmandi.service.integrations.smartping.SmartPingService;
|
| 6 |
import com.spice.profitmandi.service.integrations.smartping.model.CallDetailModel;
|
7 |
import com.spice.profitmandi.service.integrations.smartping.model.CallDetailModel;
|
| 7 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
8 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
| 8 |
import org.apache.logging.log4j.LogManager;
|
9 |
import org.apache.logging.log4j.LogManager;
|
| 9 |
import org.apache.logging.log4j.Logger;
|
10 |
import org.apache.logging.log4j.Logger;
|
| Line 33... |
Line 34... |
| 33 |
|
34 |
|
| 34 |
@Autowired
|
35 |
@Autowired
|
| 35 |
SmartPingService smartPingService;
|
36 |
SmartPingService smartPingService;
|
| 36 |
|
37 |
|
| 37 |
@Autowired
|
38 |
@Autowired
|
| 38 |
AgentRecordingRepository agentRecordingRepository;
|
39 |
KommunoService kommunoService;
|
| 39 |
|
40 |
|
| 40 |
// @RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST)
|
- |
|
| 41 |
// public String click2callReportHandlerPost(HttpServletRequest request, Model model, @RequestParam(name = "push_report") String callDetailString) throws Exception {
|
- |
|
| 42 |
//
|
41 |
@Autowired
|
| 43 |
// smartPingService.createAgentRecording(callDetailString);
|
42 |
AgentRecordingRepository agentRecordingRepository;
|
| 44 |
// model.addAttribute("response1", mvcResponseSender.createResponseString("GODBLESSYOU"));
|
- |
|
| 45 |
// return "response";
|
- |
|
| 46 |
// }
|
- |
|
| 47 |
|
43 |
|
| 48 |
@RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
44 |
@RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
| 49 |
public ResponseEntity<?> click2callReportHandlerPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
45 |
public ResponseEntity<?> click2callReportHandlerPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
| 50 |
LOGGER.info("first event call detail {}", callDetail);
|
46 |
LOGGER.info("first event call detail {}", callDetail);
|
| 51 |
smartPingService.updateAgentRecording(callDetail);
|
47 |
kommunoService.updateAgentRecording(callDetail);
|
| 52 |
|
48 |
|
| 53 |
return responseSender.ok(true);
|
49 |
return responseSender.ok(true);
|
| 54 |
}
|
50 |
}
|
| 55 |
|
51 |
|
| 56 |
|
52 |
|
| 57 |
@RequestMapping(value = "/click2call/report-handler/recording-url", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
53 |
@RequestMapping(value = "/click2call/report-handler/recording-url", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
| 58 |
public ResponseEntity<?> click2callReportHandlerUpdateRecordingUrlPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
54 |
public ResponseEntity<?> click2callReportHandlerUpdateRecordingUrlPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
| 59 |
LOGGER.info("update call detail {}", callDetail);
|
55 |
LOGGER.info("update call detail {}", callDetail);
|
| 60 |
smartPingService.updateAgentRecordingUrl(callDetail);
|
56 |
kommunoService.updateAgentRecordingUrl(callDetail);
|
| 61 |
return responseSender.ok(true);
|
57 |
return responseSender.ok(true);
|
| 62 |
}
|
58 |
}
|
| 63 |
}
|
59 |
}
|