记录来源
This commit is contained in:
parent
ae384e80ff
commit
801df735c0
|
|
@ -102,25 +102,29 @@ public class NoticeController {
|
|||
CacheUtils.put(request.getPhone(), code);
|
||||
// 调用oppo的统计接口
|
||||
try {
|
||||
// 回调
|
||||
OppoCheck model = new OppoCheck();
|
||||
model.setDataType(2);
|
||||
model.setTimestamp(System.currentTimeMillis());
|
||||
if(StringUtils.isNotEmpty(request.getImei())){
|
||||
model.setImei(encode(request.getImei().getBytes()));
|
||||
if("oppo".equalsIgnoreCase(request.getFrom())){
|
||||
// 回调
|
||||
OppoCheck model = new OppoCheck();
|
||||
model.setDataType(2);
|
||||
model.setTimestamp(System.currentTimeMillis());
|
||||
if(StringUtils.isNotEmpty(request.getImei())){
|
||||
model.setImei(encode(request.getImei().getBytes()));
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getOaid())){
|
||||
model.setOuId(encode(request.getOaid().getBytes()));
|
||||
}
|
||||
String content = JSONObject.toJSONString(model) + model.getTimestamp() + "e0u6fnlag06lc3pl";
|
||||
log.info("请求的content加密前属性{}", content);
|
||||
Map<String, String> headerMap = new HashMap<>();
|
||||
headerMap.put("signature", Md5Utils.hash(content));
|
||||
headerMap.put("timestamp", String.valueOf(model.getTimestamp()));
|
||||
headerMap.put("Content-Type", "application/json");
|
||||
log.info("请求https://api.ads.heytapmobi.com/api/uploadActiveData的属性{}", JSONObject.toJSONString(model));
|
||||
String s = HttpUtils.sendPost("https://api.ads.heytapmobi.com/api/uploadActiveData", JSONObject.toJSONString(model), headerMap);
|
||||
log.info("请求https://api.ads.heytapmobi.com/api/uploadActiveData的响应{}", s);
|
||||
}else {
|
||||
log.info("短信请求接口入参:{}", request);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getOaid())){
|
||||
model.setOuId(encode(request.getOaid().getBytes()));
|
||||
}
|
||||
String content = JSONObject.toJSONString(model) + model.getTimestamp() + "e0u6fnlag06lc3pl";
|
||||
log.info("请求的content加密前属性{}", content);
|
||||
Map<String, String> headerMap = new HashMap<>();
|
||||
headerMap.put("signature", Md5Utils.hash(content));
|
||||
headerMap.put("timestamp", String.valueOf(model.getTimestamp()));
|
||||
headerMap.put("Content-Type", "application/json");
|
||||
log.info("请求https://api.ads.heytapmobi.com/api/uploadActiveData的属性{}", JSONObject.toJSONString(model));
|
||||
String s = HttpUtils.sendPost("https://api.ads.heytapmobi.com/api/uploadActiveData", JSONObject.toJSONString(model), headerMap);
|
||||
log.info("请求https://api.ads.heytapmobi.com/api/uploadActiveData的响应{}", s);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
log.error("回调oppo报错:{}", e.getMessage());
|
||||
|
|
@ -134,6 +138,7 @@ public class NoticeController {
|
|||
ClewPhone model = new ClewPhone();
|
||||
model.setPhone(request.getPhone());
|
||||
model.setCreateTime(new Date());
|
||||
model.setRemark(request.getFrom());
|
||||
clewPhoneService.insertClewPhone(model);
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="remark != null">remark</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="phone != null">#{phone},</if>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="remark != null">#{remark}</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="remark != null">remark = #{remark}</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
|||
Loading…
Reference in New Issue