jiangping
2024-07-12 de70d21d8dea3e8ae972722456e3e8223a798ae5
server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java
@@ -6,6 +6,7 @@
import com.doumee.biz.zbom.model.CrmCustomerInfoModel;
import com.doumee.biz.zbom.model.CrmCustomerSubmmitModel;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.HttpsUtil;
import com.doumee.dao.business.CrmInterfaceLogMapper;
import com.doumee.dao.business.CustomerLogMapper;
@@ -15,6 +16,7 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.*;
@@ -34,6 +36,30 @@
    @Autowired
    private RedisTemplate<String, Object> redisTemplate;
    @Override
    @Async
    public void dealCustomerLogData(CustomerLog customerLog){
        CrmCustomerSubmmitModel entity = new CrmCustomerSubmmitModel();
        List<CrmCustomerInfoModel> cusInfo = new ArrayList();
        CrmCustomerInfoModel crmCustomerInfoModel = new CrmCustomerInfoModel();
        crmCustomerInfoModel.setId(customerLog.getId());
        crmCustomerInfoModel.setName(customerLog.getName());
        crmCustomerInfoModel.setPhone(customerLog.getPhone());
        crmCustomerInfoModel.setAreaname(customerLog.getAreaName());
        crmCustomerInfoModel.setAreacode(customerLog.getAreaCode());
        crmCustomerInfoModel.setOpenid(customerLog.getOpenid());
        crmCustomerInfoModel.setSource(Constants.CrmSources.SOURCE_ZBJX);
        crmCustomerInfoModel.setChannel(crmCustomerInfoModel.getSource()+"00");
        crmCustomerInfoModel.setDate(DateUtil.dateToString(customerLog.getCreateDate(),"yyyy/MM/dd HH:mm"));
        cusInfo.add(crmCustomerInfoModel);
        entity.setCusInfo(cusInfo);
        this.postDataToCrm(entity);
    }
    /**
     * 志邦客户信息提交接口
@@ -98,6 +124,7 @@
                .set(CustomerLog::getCrmDate,new Date() ));// 更新状态
        return status;// 默认失败
    }
    public  void  saveInterfaceLog(String url,String name,String  param,Integer success,String respone){
            if(crmInterfaceLogMapper ==null){
                return;