Commit fe9856dd by xiongjiangtao

触达

parent b0abe9c4
......@@ -24,7 +24,8 @@ public interface TriggerCustomerDetailService {
* 批量保存
* @param triggerCustomerDetailBos
*/
void batchSave(List<TriggerCustomerDetailBO> triggerCustomerDetailBos);
void batchSave(List<TriggerCustomerDetailBO> triggerCustomerDetailBos, String tableName);
/**
* 查询客户触达日志
......
......@@ -351,7 +351,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
List<TriggerCustomerDetailBO> customerDetailBos = userIds.stream()
.map(item -> this.convertCustomerDetailLog(clerkShareLogBo, item))
.collect(Collectors.toList());
triggerCustomerDetailService.batchSave(customerDetailBos);
triggerCustomerDetailService.batchSave(customerDetailBos,"tab_haoban_trigger_customer_detail");
}
}
}
......@@ -562,7 +562,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
.stream()
.map(item -> this.convertCustomerDetailLog(clerkShareLogBO, item.getExternalUserId()))
.collect(Collectors.toList());
triggerCustomerDetailService.batchSave(customerDetailBos);
triggerCustomerDetailService.batchSave(customerDetailBos,"tab_haoban_trigger_customer_detail");
}
}
......@@ -583,7 +583,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
.stream()
.map(item -> this.convertCustomerDetailLog(clerkShareLogBO, item.getUserId()))
.collect(Collectors.toList());
triggerCustomerDetailService.batchSave(customerDetailBos);
triggerCustomerDetailService.batchSave(customerDetailBos,"tab_haoban_trigger_customer_detail");
}
}
......
......@@ -57,7 +57,7 @@ public class TriggerCustomerDetailServiceImpl implements TriggerCustomerDetailSe
* @param triggerCustomerDetailBos
*/
@Override
public void batchSave(List<TriggerCustomerDetailBO> triggerCustomerDetailBos) {
public void batchSave(List<TriggerCustomerDetailBO> triggerCustomerDetailBos, String tableName) {
if (CollectionUtils.isEmpty(triggerCustomerDetailBos)) {
log.info("无客户触达日志 >>>> ");
return;
......@@ -82,7 +82,7 @@ public class TriggerCustomerDetailServiceImpl implements TriggerCustomerDetailSe
log.error("数仓数据源链接异常, 请检查!!!!{}", JSON.toJSONString(triggerCustomerDetailBos));
return;
}
TableSchema tableSchema = client.getTableSchema("tab_haoban_trigger_customer_detail");
TableSchema tableSchema = client.getTableSchema(tableName);
SerializeConfig serializeConfig = new SerializeConfig();
serializeConfig.setPropertyNamingStrategy(PropertyNamingStrategy.SnakeCase);
......@@ -103,7 +103,7 @@ public class TriggerCustomerDetailServiceImpl implements TriggerCustomerDetailSe
.collect(Collectors.toList());
client.put(puts);
log.info("客户触达写数据组完成 >>>>>");
}catch (Exception ex) {
} catch (Exception ex) {
log.info("数据组写入异常 {}", JSON.toJSONString(triggerCustomerDetailBos), ex);
}
}
......
......@@ -65,7 +65,7 @@ public class MaterialShareLogApiServiceImpl implements MaterialShareLogApiServic
temp.setCreateTime(new Date());
temp.setUpdateTime(new Date());
temp.setDeleteFlag(0);
triggerCustomerDetailService.batchSave(Collections.singletonList(temp));
triggerCustomerDetailService.batchSave(Collections.singletonList(temp),"tab_haoban_trigger_customer_detail");
return ServiceResponse.success(temp.getId());
}
......
......@@ -87,10 +87,10 @@ public class PotentialCustomerServiceTest {
triggerCustomerDetailBO.setUpdateTime(new Date());
triggerCustomerDetailBO.setDeleteFlag(1);
triggerCustomerDetailBO.setId(UniqueIdUtils.uniqueLong());
triggerCustomerDetailService.batchSave(Collections.singletonList(triggerCustomerDetailBO));
triggerCustomerDetailService.batchSave(Collections.singletonList(triggerCustomerDetailBO),"tab_haoban_trigger_customer_detail");
triggerCustomerDetailBO.setId(UniqueIdUtils.uniqueLong());
triggerCustomerDetailBO.setBizId("musidanxieru091211");
triggerCustomerDetailService.batchSave(Collections.singletonList(triggerCustomerDetailBO));
triggerCustomerDetailService.batchSave(Collections.singletonList(triggerCustomerDetailBO),"tab_haoban_trigger_customer_detail");
long time = new Date().getTime();
System.out.println((int)time);
......
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