| | |
| | | package com.doumee.biz.zbom.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.zbom.ZbomCRMService; |
| | | import com.doumee.biz.zbom.ZbomSMSService; |
| | | 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.HttpsUtil; |
| | | import com.doumee.dao.business.CrmInterfaceLogMapper; |
| | | import com.doumee.dao.business.CustomerLogMapper; |
| | | import com.doumee.dao.business.model.CrmInterfaceLog; |
| | | import com.doumee.dao.business.model.CustomerLog; |
| | | import org.apache.commons.codec.digest.DigestUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 志邦CRM客户信息提交接口 |
| | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | public static void main(String[] args) { |
| | | ZbomSMSServiceImpl obj = new ZbomSMSServiceImpl(); |
| | | obj.sendMessage("您的验证码是765412,此验证码用于重置密码。3分钟内有效。","18156091665"); |
| | | } |
| | | /** |
| | | * 志邦客户信息提交接口 |
| | | * @return |
| | |
| | | if(StringUtils.isBlank(content)){ |
| | | return false; |
| | | } |
| | | // String appkey ="581ba98d70ae2b85c4ecb9c785"; |
| | | // String urlStr = "http://wx.zhibang.com/api/QR/Face_UserSms?TenantId=2&smstype=6&" ; |
| | | String appkey = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_SMS_API_KEY); |
| | | String urlStr = (String)redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_SMS_API_URL) ; |
| | | try { |
| | |
| | | saveInterfaceLog(urlStr,"志邦短信发送接口", sb.toString(), 0,inputline); |
| | | return true;// |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | public void saveInterfaceLog(String url,String name,String param,Integer success,String respone){ |
| | | if(crmInterfaceLogMapper ==null){ |
| | | return; |
| | | } |
| | | CrmInterfaceLog log = new CrmInterfaceLog(); |
| | | log.setCreateDate(new Date()); |
| | | log.setUrl(url); |
| | | log.setEditDate(log.getCreateDate()); |
| | | log.setPlat(Constants.ZERO); |
| | | log.setPlat(Constants.ONE); |
| | | log.setName(name); |
| | | log.setIsdeleted(Constants.ZERO); |
| | | log.setRequest(param); |