@Query("select c from CustomerListMapping c where c.customerId in (:p_ids) and c.customerListId =:p_customer_list_id and c.companySiteId=:p_company_site_id")
@Query("delete from CustomerListMapping c where c.customerId=:p_customer_id and c.customerListId=:p_customer_list_id and c.companySiteId=:p_company_site_id")
@Query("delete from CustomerListMapping c where c.customerId=:p_customer_id and c.customerListId=:p_customer_list_id and c.companySiteId=:p_company_site_id")
"select * from column_name_temp where columnName not in (select column_name from campaign_customerlist_column where column_name is not null)\n"+
sb.append(" select * from column_name_temp where columnName not in (select column_name from campaign_customerlist_column where campaign_id = :p_campaign_id and column_name is not null)");
"union all\n"+
sb.append(" union all");
"select title columnName, customize_field_id customizeFieldId, 0 isFix from customize_fields, dual\n"+
sb.append(" select title columnName, customize_field_id customizeFieldId, 0 isFix from customize_fields, dual");
"where function_code = 'CUSTOMER'\n"+
sb.append(" where function_code = 'CUSTOMER'");
" and site_id = :p_company_site_id\n"+
sb.append(" and site_id = :p_company_site_id");
" and customize_field_id not in (select customize_field_id from campaign_customerlist_column where campaign_customerlist_column.campaign_id = :p_campaign_id)\n";
sb.append(" and customize_field_id not in (select customize_field_id from campaign_customerlist_column where campaign_customerlist_column.campaign_id = :p_campaign_id)");
@@ -624,7 +627,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
...
@@ -624,7 +627,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
"),\n"+
"),\n"+
"customer_interactive_table as (\n"+
"customer_interactive_table as (\n"+
" select count(a.customer_id) campaignCustomerCalled, a.customer_list_id customerListId, a.campaign_id from campaign_customer a\n"+
" select count(a.customer_id) campaignCustomerCalled, a.customer_list_id customerListId, a.campaign_id from campaign_customer a\n"+
" where a.status <> 0 and a.campaign_id = :p_campaign_id and in_campaign_status = 1\n"+
" where a.status <> 0 and a.campaign_id = :p_campaign_id\n"+
" group by a.customer_list_id, a.campaign_id\n"+
" group by a.customer_list_id, a.campaign_id\n"+
"),\n"+
"),\n"+
"customer_not_interactive_table as (\n"+
"customer_not_interactive_table as (\n"+
...
@@ -655,7 +658,8 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
...
@@ -655,7 +658,8 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
"select count(*) totalRow from data\n"+
"select count(*) totalRow from data\n"+
")\n"+
")\n"+
"select a.customerListId, a.customerListCode, a.customerListName, a.totalCusList, a.totalCusCampaign, a.totalCusCalled, a.totalCusNotInteract, totalRow from data a, count_data\n"+
"select a.customerListId, a.customerListCode, a.customerListName, a.totalCusList, a.totalCusCampaign, a.totalCusCalled, a.totalCusNotInteract, totalRow from data a, count_data\n"+
"left join customer_table b on a.customer_list_id = b.customerListId\n"+
sb.append(" left join customer_table b on a.customer_list_id = b.customerListId");
"left join customer_active_table c on a.customer_list_id = c.customerListId\n"+
sb.append(" left join customer_active_table c on a.customer_list_id = c.customerListId");
"left join customer_lock_table d on a.customer_list_id = d.customerListId\n"+
sb.append(" left join customer_lock_table d on a.customer_list_id = d.customerListId");
"left join customer_dnc_table e on a.customer_list_id = e.customerListId\n"+
sb.append(" left join customer_dnc_table e on a.customer_list_id = e.customerListId");
"left join customer_filter_table f on a.customer_list_id = f.customerListId\n"+
sb.append(" left join customer_filter_table f on a.customer_list_id = f.customerListId");
"where a.customer_list_id in (select CUSTOMER_LIST_ID from campaign_customer_id)\n"+
sb.append(" where a.customer_list_id in (select CUSTOMER_LIST_ID from campaign_customer_id)");
"),\n"+
sb.append(" ),");
"data as (\n"+
sb.append(" data as (");
"select a.*, rownum row_ from data_temp a\n"+
sb.append(" select a.*, rownum row_ from data_temp a");
"),\n"+
sb.append(" ),");
"count_data as (\n"+
sb.append(" count_data as (");
"select count(*) totalRow from data_temp\n"+
sb.append(" select count(*) totalRow from data_temp");
")\n"+
sb.append(" )");
"select a.customerListId, a.customerListCode, a.customerListName, a.totalCusList, a.totalCusActive, a.totalCusLock, a.totalCusDnc, a.totalCusAddRemove, a.totalCusFilter, totalRow from data a, count_data\n"+
sb.append(" select a.customerListId, a.customerListCode, a.customerListName, a.totalCusList, a.totalCusActive, a.totalCusLock, a.totalCusDnc, a.totalCusAddRemove, a.totalCusFilter, totalRow from data a, count_data");
sb.append(" inner join customer_list_mapping clm on c.customer_id = clm.customer_id");
sb.append(" where clm.customer_list_id in (select distinct cc.customer_list_id from campaign_customerlist cc where cc.campaign_id = :p_campaign_id and cc.company_site_id = :p_company_site_id)");
customer.nameRequired=Họ và tên không được để trống;
customer.nameRequired=Họ và tên không được để trống;
customer.emailMax50=Email không được quá 50 kí tự;
customer.emailMax100=Email không được quá 100 kí tự;
customer.mainPhoneRequired=Số điện thoại chính không được để trống
customer.invalidRecord=Bắt buộc nhập 1 trong 3 thông tin liên lạc(Số điện thoại chính, Số điện thoại phụ, Email);
customer.secondPhoneRequired=Số điện thoại phụ không được để trống
customer.onlyNumber=Số điện thoại chỉ được nhập số;
customer.emailRequired=Số điện thoại email không được để trống
customer.importSuccess=Import dữ liệu thành công
customer.importSuccess=Import dữ liệu thành công
customer.importFailed=Import dữ liệu thất bại
customer.importFailed=Import dữ liệu thất bại
customer.errorValidate=Validate dữ liệu lỗi
customer.errorValidate=Validate dữ liệu lỗi
...
@@ -107,6 +106,7 @@ customer.importCustomer = IMPORT KHÁCH HÀNG
...
@@ -107,6 +106,7 @@ customer.importCustomer = IMPORT KHÁCH HÀNG
customer.notice=Chú ý: 1 bản ghi được coi là hợp lệ bắt buộc phải có thông tin Họ và Tên và 1 trong 3 thông tin liên lạc (số điện thoại chính, số điện thoại phụ hoặc email)
customer.notice=Chú ý: 1 bản ghi được coi là hợp lệ bắt buộc phải có thông tin Họ và Tên và 1 trong 3 thông tin liên lạc (số điện thoại chính, số điện thoại phụ hoặc email)
customer.emailInvalid=Email không đúng định dạng;
customer.emailInvalid=Email không đúng định dạng;
customer.emailExists=Email đã tồn tại;
customer.emailExists=Email đã tồn tại;
customer.cusTypeInvalid=Loại khách hàng không hợp lệ;