记录来源
This commit is contained in:
parent
ae384e80ff
commit
801df735c0
|
|
@ -102,25 +102,29 @@ public class NoticeController {
|
||||||
CacheUtils.put(request.getPhone(), code);
|
CacheUtils.put(request.getPhone(), code);
|
||||||
// 调用oppo的统计接口
|
// 调用oppo的统计接口
|
||||||
try {
|
try {
|
||||||
// 回调
|
if("oppo".equalsIgnoreCase(request.getFrom())){
|
||||||
OppoCheck model = new OppoCheck();
|
// 回调
|
||||||
model.setDataType(2);
|
OppoCheck model = new OppoCheck();
|
||||||
model.setTimestamp(System.currentTimeMillis());
|
model.setDataType(2);
|
||||||
if(StringUtils.isNotEmpty(request.getImei())){
|
model.setTimestamp(System.currentTimeMillis());
|
||||||
model.setImei(encode(request.getImei().getBytes()));
|
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){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
log.error("回调oppo报错:{}", e.getMessage());
|
log.error("回调oppo报错:{}", e.getMessage());
|
||||||
|
|
@ -134,6 +138,7 @@ public class NoticeController {
|
||||||
ClewPhone model = new ClewPhone();
|
ClewPhone model = new ClewPhone();
|
||||||
model.setPhone(request.getPhone());
|
model.setPhone(request.getPhone());
|
||||||
model.setCreateTime(new Date());
|
model.setCreateTime(new Date());
|
||||||
|
model.setRemark(request.getFrom());
|
||||||
clewPhoneService.insertClewPhone(model);
|
clewPhoneService.insertClewPhone(model);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="phone != null">#{phone},</if>
|
<if test="phone != null">#{phone},</if>
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark}</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark}</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue