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

commit

parent 9e99b655
package com.viettel.campaign.repository;
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.Modifying;
import org.springframework.data.jpa.repository.Query;
......@@ -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")
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();
}
package com.viettel.campaign.service;
<<<<<<< HEAD
import com.viettel.campaign.model.CustomerList;
=======
import com.viettel.campaign.web.dto.CustomerContactDTO;
>>>>>>> 9df5481c5a6e1402937df9086e0a110b21458e93
import com.viettel.campaign.web.dto.CustomerDTO;
import com.viettel.campaign.web.dto.CustomerListDTO;
import com.viettel.campaign.web.dto.ResultDTO;
......@@ -43,8 +40,6 @@ public interface CustomerService {
// ------------ customer contact ------------ //
ResultDTO getCustomerContact(Long customerId, Short contactType, String contact);
// danh sach khach hang cua chien dich //
ResultDTO searchCustomerListInfoFromCustomerList(int page, int pageSize, String sort, Long campaignId, Long companySiteId);
......
......@@ -602,16 +602,12 @@ public class CustomerServiceImpl implements CustomerService {
}
@Override
<<<<<<< HEAD
public CustomerList getLatestCreated() {
return customerListRepository.latestCreated();
}
@Override
public ResultDTO getCustomerContact(Long customerId, Short contactType, String contact) {
=======
public ResultDTO getCustomerContact(CustomerContactDTO customer) {
>>>>>>> 9df5481c5a6e1402937df9086e0a110b21458e93
ResultDTO result = new ResultDTO();
try {
......
......@@ -9,11 +9,8 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
<<<<<<< HEAD
import org.springframework.cloud.sleuth.instrument.reactor.ReactorSleuth;
=======
import org.springframework.http.HttpHeaders;
>>>>>>> 55a6b806b604aa92fca10c101776df185d0d67af
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
......@@ -37,14 +34,10 @@ public class CampaignController {
@Autowired
CampaignService campaignService;
<<<<<<< HEAD
@PostMapping("/searchCampaignExecute")
=======
@Autowired
CampaignExecuteService campaignExecuteService;
@RequestMapping("/searchCampaignExecute")
>>>>>>> 55a6b806b604aa92fca10c101776df185d0d67af
@PostMapping("/searchCampaignExecute")
@ResponseBody
public ResponseEntity<ResultDTO> searchCampaignExecute(@RequestBody CampaignRequestDTO requestDto) {
ResultDTO result = campaignService.searchCampaignExecute(requestDto);
......@@ -74,14 +67,13 @@ public class CampaignController {
return new ResponseEntity<>(result, HttpStatus.OK);
}
<<<<<<< HEAD
@GetMapping("/findByCampaignId")
@ResponseBody
public ResponseEntity findByCampaignId(@RequestParam("campaignId") Long campaignId) {
ResultDTO result = campaignService.findByCampaignId(campaignId);
return new ResponseEntity<>(result, HttpStatus.OK);
}
=======
@PostMapping("/searchInteractiveResult")
@ResponseBody
public ResponseEntity<ResultDTO> searchInteractiveResult(@RequestBody CampaignRequestDTO dto) throws Exception {
......@@ -126,5 +118,4 @@ public class CampaignController {
dto.setSessionId(request.getSession().getId());
return campaignService.changeCampaignStatus(dto);
}
>>>>>>> 55a6b806b604aa92fca10c101776df185d0d67af
}
......@@ -164,7 +164,6 @@ public class CustomerController {
return new ResponseEntity<>(result, HttpStatus.OK);
}
<<<<<<< HEAD
@GetMapping("/latestCreated")
@ResponseBody
public ResponseEntity getLatestCreated() {
......@@ -173,10 +172,7 @@ public class CustomerController {
return new ResponseEntity<>(result, HttpStatus.OK);
}
@GetMapping("/findCustomerContact")
=======
@PostMapping("/findCustomerContact")
>>>>>>> 9df5481c5a6e1402937df9086e0a110b21458e93
@ResponseBody
public ResponseEntity<ResultDTO> findAllCustomerContact(@RequestBody CustomerContactDTO 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