Commit f9d28f0c authored by Phạm Duy Phi's avatar Phạm Duy Phi

commit

parent 9e99b655
package com.viettel.campaign.repository; package com.viettel.campaign.repository;
import com.viettel.campaign.model.CustomerList; import com.viettel.campaign.model.CustomerList;
import com.viettel.campaign.web.dto.ResultDTO;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
...@@ -23,6 +22,6 @@ public interface CustomerListRepository extends JpaRepository<CustomerList, Long ...@@ -23,6 +22,6 @@ public interface CustomerListRepository extends JpaRepository<CustomerList, Long
@Query("update CustomerList c set c.status = 0 where c.customerListId in (:p_ids) and c.companySiteId=:p_company_site_id") @Query("update CustomerList c set c.status = 0 where c.customerListId in (:p_ids) and c.companySiteId=:p_company_site_id")
int deleteCustomerListIds(@Param("p_ids") List<Long> p_ids, @Param("p_company_site_id") Long p_company_site_id); int deleteCustomerListIds(@Param("p_ids") List<Long> p_ids, @Param("p_company_site_id") Long p_company_site_id);
@Query(value = "SELECT * FROM (SELECT *, MAX(CREATE_AT) OVER() AS LATEST_CREATED FROM CUSTOMER_LIST) WHERE CREATE_AT = LATEST_CREATED", nativeQuery = true) @Query(value = "SELECT * FROM (SELECT c.*, MAX(c.CREATE_AT) OVER() AS LATEST_CREATED FROM CUSTOMER_LIST c) WHERE CREATE_AT = LATEST_CREATED", nativeQuery = true)
CustomerList latestCreated(); CustomerList latestCreated();
} }
package com.viettel.campaign.service; package com.viettel.campaign.service;
<<<<<<< HEAD
import com.viettel.campaign.model.CustomerList; import com.viettel.campaign.model.CustomerList;
=======
import com.viettel.campaign.web.dto.CustomerContactDTO; import com.viettel.campaign.web.dto.CustomerContactDTO;
>>>>>>> 9df5481c5a6e1402937df9086e0a110b21458e93
import com.viettel.campaign.web.dto.CustomerDTO; import com.viettel.campaign.web.dto.CustomerDTO;
import com.viettel.campaign.web.dto.CustomerListDTO; import com.viettel.campaign.web.dto.CustomerListDTO;
import com.viettel.campaign.web.dto.ResultDTO; import com.viettel.campaign.web.dto.ResultDTO;
...@@ -43,8 +40,6 @@ public interface CustomerService { ...@@ -43,8 +40,6 @@ public interface CustomerService {
// ------------ customer contact ------------ // // ------------ customer contact ------------ //
ResultDTO getCustomerContact(Long customerId, Short contactType, String contact);
// danh sach khach hang cua chien dich // // danh sach khach hang cua chien dich //
ResultDTO searchCustomerListInfoFromCustomerList(int page, int pageSize, String sort, Long campaignId, Long companySiteId); ResultDTO searchCustomerListInfoFromCustomerList(int page, int pageSize, String sort, Long campaignId, Long companySiteId);
......
...@@ -602,16 +602,12 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -602,16 +602,12 @@ public class CustomerServiceImpl implements CustomerService {
} }
@Override @Override
<<<<<<< HEAD
public CustomerList getLatestCreated() { public CustomerList getLatestCreated() {
return customerListRepository.latestCreated(); return customerListRepository.latestCreated();
} }
@Override @Override
public ResultDTO getCustomerContact(Long customerId, Short contactType, String contact) {
=======
public ResultDTO getCustomerContact(CustomerContactDTO customer) { public ResultDTO getCustomerContact(CustomerContactDTO customer) {
>>>>>>> 9df5481c5a6e1402937df9086e0a110b21458e93
ResultDTO result = new ResultDTO(); ResultDTO result = new ResultDTO();
try { try {
......
...@@ -9,11 +9,8 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; ...@@ -9,11 +9,8 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
<<<<<<< HEAD
import org.springframework.cloud.sleuth.instrument.reactor.ReactorSleuth; import org.springframework.cloud.sleuth.instrument.reactor.ReactorSleuth;
=======
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
>>>>>>> 55a6b806b604aa92fca10c101776df185d0d67af
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
...@@ -37,14 +34,10 @@ public class CampaignController { ...@@ -37,14 +34,10 @@ public class CampaignController {
@Autowired @Autowired
CampaignService campaignService; CampaignService campaignService;
<<<<<<< HEAD
@PostMapping("/searchCampaignExecute")
=======
@Autowired @Autowired
CampaignExecuteService campaignExecuteService; CampaignExecuteService campaignExecuteService;
@RequestMapping("/searchCampaignExecute") @PostMapping("/searchCampaignExecute")
>>>>>>> 55a6b806b604aa92fca10c101776df185d0d67af
@ResponseBody @ResponseBody
public ResponseEntity<ResultDTO> searchCampaignExecute(@RequestBody CampaignRequestDTO requestDto) { public ResponseEntity<ResultDTO> searchCampaignExecute(@RequestBody CampaignRequestDTO requestDto) {
ResultDTO result = campaignService.searchCampaignExecute(requestDto); ResultDTO result = campaignService.searchCampaignExecute(requestDto);
...@@ -74,14 +67,13 @@ public class CampaignController { ...@@ -74,14 +67,13 @@ public class CampaignController {
return new ResponseEntity<>(result, HttpStatus.OK); return new ResponseEntity<>(result, HttpStatus.OK);
} }
<<<<<<< HEAD
@GetMapping("/findByCampaignId") @GetMapping("/findByCampaignId")
@ResponseBody @ResponseBody
public ResponseEntity findByCampaignId(@RequestParam("campaignId") Long campaignId) { public ResponseEntity findByCampaignId(@RequestParam("campaignId") Long campaignId) {
ResultDTO result = campaignService.findByCampaignId(campaignId); ResultDTO result = campaignService.findByCampaignId(campaignId);
return new ResponseEntity<>(result, HttpStatus.OK); return new ResponseEntity<>(result, HttpStatus.OK);
} }
=======
@PostMapping("/searchInteractiveResult") @PostMapping("/searchInteractiveResult")
@ResponseBody @ResponseBody
public ResponseEntity<ResultDTO> searchInteractiveResult(@RequestBody CampaignRequestDTO dto) throws Exception { public ResponseEntity<ResultDTO> searchInteractiveResult(@RequestBody CampaignRequestDTO dto) throws Exception {
...@@ -126,5 +118,4 @@ public class CampaignController { ...@@ -126,5 +118,4 @@ public class CampaignController {
dto.setSessionId(request.getSession().getId()); dto.setSessionId(request.getSession().getId());
return campaignService.changeCampaignStatus(dto); return campaignService.changeCampaignStatus(dto);
} }
>>>>>>> 55a6b806b604aa92fca10c101776df185d0d67af
} }
...@@ -164,7 +164,6 @@ public class CustomerController { ...@@ -164,7 +164,6 @@ public class CustomerController {
return new ResponseEntity<>(result, HttpStatus.OK); return new ResponseEntity<>(result, HttpStatus.OK);
} }
<<<<<<< HEAD
@GetMapping("/latestCreated") @GetMapping("/latestCreated")
@ResponseBody @ResponseBody
public ResponseEntity getLatestCreated() { public ResponseEntity getLatestCreated() {
...@@ -173,10 +172,7 @@ public class CustomerController { ...@@ -173,10 +172,7 @@ public class CustomerController {
return new ResponseEntity<>(result, HttpStatus.OK); return new ResponseEntity<>(result, HttpStatus.OK);
} }
@GetMapping("/findCustomerContact")
=======
@PostMapping("/findCustomerContact") @PostMapping("/findCustomerContact")
>>>>>>> 9df5481c5a6e1402937df9086e0a110b21458e93
@ResponseBody @ResponseBody
public ResponseEntity<ResultDTO> findAllCustomerContact(@RequestBody CustomerContactDTO customerContactDTO) { public ResponseEntity<ResultDTO> findAllCustomerContact(@RequestBody CustomerContactDTO customerContactDTO) {
ResultDTO result = customerService.getCustomerContact(customerContactDTO); ResultDTO result = customerService.getCustomerContact(customerContactDTO);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment