Authored by ping

update

... ... @@ -19,9 +19,9 @@ public interface IUnionLogsDAO {
int updateByPrimaryKey(UnionLogs record);
UnionLogs selectIOS(@Param("appId") String appId,@Param("idfa") String idfa,@Param("clientType")String clientType, @Param("unionType") byte unionType);
UnionLogs selectIOS(@Param("appId") String appId,@Param("idfa") String idfa,@Param("clientType")String clientType, @Param("unionType") int unionType);
UnionLogs selectAndroid(@Param("appId")String appId,@Param("imei") String imei,@Param("clientType")String clientType, @Param("unionType") byte unionType);
UnionLogs selectAndroid(@Param("appId")String appId,@Param("imei") String imei,@Param("clientType")String clientType, @Param("unionType") int unionType);
UnionLogs selectUnionList(UnionLogs logs);
UnionLogs selectByClientType(@Param("clientType")String clientType, @Param("idfa")String idfa, @Param("imei")String imei, @Param("unionType")int unionType);
... ...
... ... @@ -41,7 +41,7 @@
values (#{id,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR},
#{udid,jdbcType=VARCHAR},
#{idfa,jdbcType=VARCHAR}, #{imei,jdbcType=VARCHAR}, #{isActivate,jdbcType=TINYINT},
#{unionType,jdbcType=TINYINT}, #{addParams,jdbcType=VARCHAR},
#{unionType,jdbcType=INTEGER}, #{addParams,jdbcType=VARCHAR},
#{activateParams,jdbcType=VARCHAR},
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{clientType}, #{td})
</insert>
... ... @@ -52,7 +52,7 @@
idfa = #{idfa,jdbcType=VARCHAR},
imei = #{imei,jdbcType=VARCHAR},
is_activate = #{isActivate,jdbcType=TINYINT},
union_type = #{unionType,jdbcType=TINYINT},
union_type = #{unionType,jdbcType=INTEGER},
add_params = #{addParams,jdbcType=VARCHAR},
activate_params = #{activateParams,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=INTEGER},
... ...
... ... @@ -88,13 +88,13 @@ public class GDTServiceImpl implements MainUnionService {
UnionLogs logs = new UnionLogs();
//去重,排除重复激活
if(ClientTypeEnum.IOS.getName().equalsIgnoreCase(request.getClient_type())){
logs = unionLogsDAO.selectIOS(String.valueOf(request.getAppid()), request.getIdfa(), request.getClient_type(), (byte)3);
logs = unionLogsDAO.selectIOS(String.valueOf(request.getAppid()), request.getIdfa(), request.getClient_type(), 3);
if(null !=logs &&logs.getIsActivate()==1){
log.info("GDT activeUnion exists with request={}", request);
return response;
}
}else{
logs = unionLogsDAO.selectAndroid(String.valueOf(request.getAppid()), request.getImei(), request.getClient_type(), (byte)3);
logs = unionLogsDAO.selectAndroid(String.valueOf(request.getAppid()), request.getImei(), request.getClient_type(), 3);
if(null !=logs && logs.getIsActivate()==1){
log.info("GDT activeUnion exists with request={}", request);
return response;
... ...
... ... @@ -82,26 +82,21 @@
queryString = getQueryString();
if (isInJump(queryString.union_type) && agent.indexOf("like mac os x") > 0) {
//IOS的,需要跳转的推广联盟,特殊处理
this.location.href = "/union/ClickUnionRest/addUnion4Special";
} else {
$.ajax({
method: 'POST',
url: '/union/ClickUnionRest/addUnion',
data: {
union_type: queryString.union_type,
identify_id: queryString.identify_id,
callbackurl: queryString.callbackurl,
client_type: type,
td: td,
appid: appid
},
complete: function() {
window.location.href = downUrl;
}
});
}
$.ajax({
method: 'POST',
url: '/union/ClickUnionRest/addUnion',
data: {
union_type: queryString.union_type,
identify_id: queryString.identify_id,
callbackurl: queryString.callbackurl,
client_type: type,
td: td,
appid: appid
},
complete: function() {
window.location.href = downUrl;
}
});
</script>
... ...