| Line 8... |
Line 8... |
| 8 |
import com.spice.profitmandi.dao.entity.fofo.UpsellRazorpayPaymentStatus;
|
8 |
import com.spice.profitmandi.dao.entity.fofo.UpsellRazorpayPaymentStatus;
|
| 9 |
import com.spice.profitmandi.dao.repository.cs.AgentRecordingRepository;
|
9 |
import com.spice.profitmandi.dao.repository.cs.AgentRecordingRepository;
|
| 10 |
import com.spice.profitmandi.dao.repository.fofo.CustomerRepository;
|
10 |
import com.spice.profitmandi.dao.repository.fofo.CustomerRepository;
|
| 11 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
11 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
| 12 |
import com.spice.profitmandi.dao.repository.fofo.UpsellRazorpayPaymentStatusRepository;
|
12 |
import com.spice.profitmandi.dao.repository.fofo.UpsellRazorpayPaymentStatusRepository;
|
| 13 |
import com.spice.profitmandi.service.integrations.kommuno.KommunoService;
|
13 |
import com.spice.profitmandi.service.integrations.kommuno.RecordingService;
|
| 14 |
import com.spice.profitmandi.service.integrations.smartping.SmartPingService;
|
14 |
import com.spice.profitmandi.service.integrations.smartping.SmartPingService;
|
| 15 |
import com.spice.profitmandi.service.integrations.smartping.model.CallDetailModel;
|
15 |
import com.spice.profitmandi.service.integrations.smartping.model.CallDetailModel;
|
| - |
|
16 |
import com.spice.profitmandi.service.integrations.smartping.model.PushCallLogModel;
|
| 16 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
17 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
| 17 |
import org.apache.logging.log4j.LogManager;
|
18 |
import org.apache.logging.log4j.LogManager;
|
| 18 |
import org.apache.logging.log4j.Logger;
|
19 |
import org.apache.logging.log4j.Logger;
|
| 19 |
import org.json.JSONObject;
|
20 |
import org.json.JSONObject;
|
| 20 |
import org.springframework.beans.factory.annotation.Autowired;
|
21 |
import org.springframework.beans.factory.annotation.Autowired;
|
| Line 51... |
Line 52... |
| 51 |
|
52 |
|
| 52 |
@Autowired
|
53 |
@Autowired
|
| 53 |
SmartPingService smartPingService;
|
54 |
SmartPingService smartPingService;
|
| 54 |
|
55 |
|
| 55 |
@Autowired
|
56 |
@Autowired
|
| 56 |
KommunoService kommunoService;
|
57 |
RecordingService recordingService;
|
| 57 |
|
58 |
|
| 58 |
@Autowired
|
59 |
@Autowired
|
| 59 |
AgentRecordingRepository agentRecordingRepository;
|
60 |
AgentRecordingRepository agentRecordingRepository;
|
| 60 |
|
61 |
|
| 61 |
@RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
62 |
@RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
| 62 |
public ResponseEntity<?> click2callReportHandlerPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
63 |
public ResponseEntity<?> click2callReportHandlerPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
| 63 |
LOGGER.info("first event call detail {}", callDetail);
|
64 |
LOGGER.info("first event call detail {}", callDetail);
|
| 64 |
kommunoService.updateAgentRecording(callDetail);
|
65 |
recordingService.updateAgentRecording(callDetail);
|
| 65 |
|
66 |
|
| 66 |
return responseSender.ok(true);
|
67 |
return responseSender.ok(true);
|
| 67 |
}
|
68 |
}
|
| 68 |
|
69 |
|
| 69 |
|
70 |
|
| 70 |
@RequestMapping(value = "/click2call/report-handler/recording-url", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
71 |
@RequestMapping(value = "/click2call/report-handler/recording-url", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
| 71 |
public ResponseEntity<?> click2callReportHandlerUpdateRecordingUrlPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
72 |
public ResponseEntity<?> click2callReportHandlerUpdateRecordingUrlPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
| 72 |
LOGGER.info("update call detail {}", callDetail);
|
73 |
LOGGER.info("update call detail {}", callDetail);
|
| 73 |
kommunoService.updateAgentRecordingUrl(callDetail);
|
74 |
recordingService.updateAgentRecordingUrl(callDetail);
|
| - |
|
75 |
return responseSender.ok(true);
|
| - |
|
76 |
}
|
| - |
|
77 |
|
| - |
|
78 |
@RequestMapping(value = "/click2call/push-call-log-handler", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
| - |
|
79 |
public ResponseEntity<?> click2callPushLogHandler(HttpServletRequest request, Model model, @ModelAttribute PushCallLogModel pushCallLogModel) throws Exception {
|
| - |
|
80 |
LOGGER.info("update call detail {}", pushCallLogModel);
|
| - |
|
81 |
recordingService.updateAgentCallLog(pushCallLogModel);
|
| 74 |
return responseSender.ok(true);
|
82 |
return responseSender.ok(true);
|
| 75 |
}
|
83 |
}
|
| 76 |
|
84 |
|
| 77 |
|
85 |
|
| 78 |
@Value("${razorpay.account.keySecret}")
|
86 |
@Value("${razorpay.account.keySecret}")
|