Commit df3ccacb by songyinghui

feature: 客户触达日志切换数据源

parent 731b359b
package com.gic.haoban.manage.service.entity.content;
import com.alibaba.fastjson.annotation.JSONField;
import java.util.Date;
import java.io.Serializable;
......@@ -56,10 +58,12 @@ public class TabHaobanTriggerCustomerDetail implements Serializable {
/**
* 创建时间
*/
@JSONField(format = "yyyy-MM-dd HH:dd:ss")
private Date createTime;
/**
* 修改时间
*/
@JSONField(format = "yyyy-MM-dd HH:dd:ss")
private Date updateTime;
/**
* 0正常; 1删除
......
......@@ -9,6 +9,7 @@ import com.alibaba.hologres.client.Put;
import com.alibaba.hologres.client.model.TableSchema;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import com.gic.haoban.common.utils.DateUtil;
import com.gic.haoban.manage.service.dao.mapper.content.TabHaobanTriggerCustomerDetailMapper;
import com.gic.haoban.manage.service.dao.mapper.content.holo.HoloDataSource;
import com.gic.haoban.manage.service.entity.content.TabHaobanTriggerCustomerDetail;
......@@ -23,6 +24,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -92,6 +94,9 @@ public class TriggerCustomerDetailServiceImpl implements TriggerCustomerDetailSe
for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
temp.setObject(entry.getKey(), entry.getValue());
}
// 时间戳格式不行
temp.setObject("create_time", DateUtil.dateToStr(item.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
temp.setObject("update_time", DateUtil.dateToStr(item.getUpdateTime(), "yyyy-MM-dd HH:mm:ss"));
return temp;
})
.collect(Collectors.toList());
......
......@@ -74,7 +74,7 @@ public class PotentialCustomerServiceTest {
triggerCustomerDetailBO.setCustomerId("dadadada");
triggerCustomerDetailBO.setEnterpriseId(eid);
triggerCustomerDetailBO.setWxEnterpriseId(wxEid);
triggerCustomerDetailBO.setBizId("musidanxieru091203flush");
triggerCustomerDetailBO.setBizId("musidanxieru091210");
triggerCustomerDetailBO.setBizType(1);
triggerCustomerDetailBO.setClerkId(clerkId);
triggerCustomerDetailBO.setStaffId(staffId);
......@@ -87,8 +87,11 @@ public class PotentialCustomerServiceTest {
triggerCustomerDetailBO.setId(UniqueIdUtils.uniqueLong());
triggerCustomerDetailService.batchSave(Collections.singletonList(triggerCustomerDetailBO));
triggerCustomerDetailBO.setId(UniqueIdUtils.uniqueLong());
triggerCustomerDetailBO.setBizId("musidanxieru091204");
triggerCustomerDetailBO.setBizId("musidanxieru091211");
triggerCustomerDetailService.batchSave(Collections.singletonList(triggerCustomerDetailBO));
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