| | |
| | | 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; |
| | |
| | | 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.*; |
| | |
| | | |
| | | @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); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 志邦客户信息提交接口 |
| | |
| | | .set(CustomerLog::getCrmDate,new Date() ));// 更新状态 |
| | | return status;// 默认失败 |
| | | } |
| | | |
| | | public void saveInterfaceLog(String url,String name,String param,Integer success,String respone){ |
| | | if(crmInterfaceLogMapper ==null){ |
| | | return; |