Commit ff264eb5 authored by Tu Bach's avatar Tu Bach

tubn2 campaign execute list combo box complete code

parent 5e96376d
......@@ -43,6 +43,6 @@ public interface CampaignCompleteCodeRepository extends JpaRepository<CampaignCo
@Query(value = "FROM CampaignCompleteCode WHERE status = 1 AND completeValue = :completeValue AND completeType = :completeType AND companySiteId = :companySiteId")
List<CampaignCompleteCode> getCustomerStatus(@Param("completeValue") String completeValue, @Param("completeType") Short completeType, @Param("companySiteId") Long companySiteId);
@Query(value = "FROM CampaignCompleteCode WHERE status = 1 AND completeValue = :completeValue AND completeType <> :completeType AND companySiteId = :companySiteId")
List<CampaignCompleteCode> getCustomerStatusWithoutType(@Param("completeValue") String completeValue, @Param("completeType") Short completeType, @Param("companySiteId") Long companySiteId);
@Query(value = "FROM CampaignCompleteCode WHERE status = 1 AND completeValue <> :completeValue AND completeType = :completeType AND companySiteId = :companySiteId")
List<CampaignCompleteCode> getCustomerStatusWithoutValue(@Param("completeValue") String completeValue, @Param("completeType") Short completeType, @Param("companySiteId") Long companySiteId);
}
......@@ -26,6 +26,6 @@ public interface CampaignCompleteCodeService {
ResultDTO getListStatus(String completeValue, Short completeType, Long companySiteId);
ResultDTO getListStatusWithoutType(String completeValue, Short completeType, Long companySiteId);
ResultDTO getListStatusWithoutValue(String completeValue, Short completeType, Long companySiteId);
}
......@@ -268,10 +268,10 @@ public class CampaignCompleteCodeServiceImpl implements CampaignCompleteCodeServ
}
@Override
public ResultDTO getListStatusWithoutType(String completeValue, Short completeType, Long companySiteId) {
public ResultDTO getListStatusWithoutValue(String completeValue, Short completeType, Long companySiteId) {
ResultDTO resultDTO = new ResultDTO();
try {
List<CampaignCompleteCode> list = completeCodeRepository.getCustomerStatusWithoutType(completeValue, completeType, companySiteId);
List<CampaignCompleteCode> list = completeCodeRepository.getCustomerStatusWithoutValue(completeValue, completeType, companySiteId);
resultDTO.setListData(list);
resultDTO.setErrorCode(Constants.ApiErrorCode.SUCCESS);
resultDTO.setDescription(Constants.ApiErrorDesc.SUCCESS);
......
......@@ -108,7 +108,7 @@ public class CampaignCompleteCodeController {
@GetMapping("/getListStatusWithoutType")
@ResponseBody
public ResponseEntity<ResultDTO> getListStatusWithoutType(@RequestParam("completeValue") String completeValue, @RequestParam("completeType") Short completeType, @RequestParam("companySiteId") Long companySiteId) {
ResultDTO result = completeCodeService.getListStatusWithoutType(completeValue, completeType, companySiteId);
ResultDTO result = completeCodeService.getListStatusWithoutValue(completeValue, completeType, companySiteId);
return new ResponseEntity(result, HttpStatus.OK);
}
......
......@@ -179,7 +179,7 @@ public class CustomerController {
return new ResponseEntity(result, HttpStatus.OK);
}
@GetMapping("/getCustomerRecall")
@PostMapping("/getCustomerRecall")
@ResponseBody
public ResponseEntity<ResultDTO> getCustomerRecall(@RequestParam("campaignId") Long campaignId, @RequestParam("customerId") Long customerId) {
ResultDTO result = customerService.getCustomerRecall(campaignId, customerId);
......
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