Authored by bblu

联盟增加APP类型

... ... @@ -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") int unionType);
UnionLogs selectIOS(@Param("appId") String appId,@Param("idfa") String idfa,@Param("clientType")String clientType, @Param("unionType") int unionType, @Param("appKey")String appKey);
UnionLogs selectAndroid(@Param("appId")String appId,@Param("imei") String imei,@Param("clientType")String clientType, @Param("unionType") int unionType);
UnionLogs selectAndroid(@Param("appId")String appId,@Param("imei") String imei,@Param("clientType")String clientType, @Param("unionType") int unionType, @Param("appKey")String appKey);
UnionLogs selectUnionList(UnionLogs logs);
UnionLogs selectByClientType(@Param("clientType")String clientType, @Param("idfa")String idfa, @Param("imei")String imei, @Param("appKey")String appKey);
... ...
... ... @@ -57,7 +57,8 @@
add_params = #{addParams,jdbcType=VARCHAR},
activate_params = #{activateParams,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=INTEGER},
client_type=#{clientType}
client_type=#{clientType},
app_key=#{appKey}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateUnionLogs">
... ... @@ -96,6 +97,9 @@
where app_id = #{appId,jdbcType=VARCHAR} and
idfa = #{idfa,jdbcType=VARCHAR} and
client_type=#{clientType}
<if test="appKey!=null">
and app_key=#{appKey}
</if>
and union_type=#{unionType} limit 1
</select>
<select id="selectAndroid" resultMap="BaseResultMap" parameterType="com.yoho.unions.dal.model.UnionLogs">
... ... @@ -104,6 +108,10 @@
from union_logs
where app_id = #{appId,jdbcType=VARCHAR} and
imei = #{imei,jdbcType=VARCHAR} and
client_type=#{clientType} and union_type=#{unionType} limit 1
client_type=#{clientType} and union_type=#{unionType}
<if test="appKey!=null">
and app_key=#{appKey}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -173,6 +173,7 @@ public class GDTServiceImpl implements MainUnionService {
unionLogs.setAppId(String.valueOf(request.getAppid()));
unionLogs.setUdid("");
unionLogs.setClientType(request.getClient_type());
unionLogs.setAppKey(request.getApp_key());
if (ClientTypeEnum.IOS.getName().equalsIgnoreCase(request.getClient_type())) {
unionLogs.setIdfa(request.getIdfa());
} else {
... ...