Authored by ping

update

@@ -24,7 +24,7 @@ public interface IUnionLogsDAO { @@ -24,7 +24,7 @@ public interface IUnionLogsDAO {
24 UnionLogs selectAndroid(@Param("appId")String appId,@Param("imei") String imei,@Param("clientType")String clientType, @Param("unionType") byte unionType); 24 UnionLogs selectAndroid(@Param("appId")String appId,@Param("imei") String imei,@Param("clientType")String clientType, @Param("unionType") byte unionType);
25 25
26 UnionLogs selectUnionList(UnionLogs logs); 26 UnionLogs selectUnionList(UnionLogs logs);
27 - UnionLogs selectByClientType(@Param("clientType")String clientType, @Param("idfa")String idfa, @Param("imei")String imei); 27 + UnionLogs selectByClientType(@Param("clientType")String clientType, @Param("idfa")String idfa, @Param("imei")String imei, @Param("unionType")byte unionType);
28 int updateUnionLogs(UnionLogs logs); 28 int updateUnionLogs(UnionLogs logs);
29 29
30 30
@@ -71,6 +71,7 @@ @@ -71,6 +71,7 @@
71 <if test="clientType=='android'"> 71 <if test="clientType=='android'">
72 and imei=#{imei} 72 and imei=#{imei}
73 </if> 73 </if>
  74 + and union_type=#{unionType}
74 limit 1 75 limit 1
75 </select> 76 </select>
76 <select id="selectUnionList" resultMap="BaseResultMap"> 77 <select id="selectUnionList" resultMap="BaseResultMap">
@@ -165,9 +165,10 @@ public class UnionServiceImpl implements IUnionService { @@ -165,9 +165,10 @@ public class UnionServiceImpl implements IUnionService {
165 return new UnionResponse(204, "user not click"); 165 return new UnionResponse(204, "user not click");
166 } 166 }
167 167
168 - 168 + //把存储的字符串变为对象
  169 + ClickUnionRequestBO click = JSON.parseObject(value, ClickUnionRequestBO.class);
169 //查询该td在90天内是否已经激活过 170 //查询该td在90天内是否已经激活过
170 - UnionLogs union = unionLogsDAO.selectByClientType(request.getClient_type(), request.getIdfa(), request.getImei()); 171 + UnionLogs union = unionLogsDAO.selectByClientType(request.getClient_type(), request.getIdfa(), request.getImei(), Byte.valueOf(click.getUnion_type()));
171 log.info("activateUnion in selectByClientType result is {}", union); 172 log.info("activateUnion in selectByClientType result is {}", union);
172 //没有点击记录,则退出 173 //没有点击记录,则退出
173 // if (union == null) { 174 // if (union == null) {
@@ -181,8 +182,7 @@ public class UnionServiceImpl implements IUnionService { @@ -181,8 +182,7 @@ public class UnionServiceImpl implements IUnionService {
181 return new UnionResponse(203, "have activite in 90 days"); 182 return new UnionResponse(203, "have activite in 90 days");
182 } 183 }
183 184
184 - //把存储的字符串变为对象  
185 - ClickUnionRequestBO click = JSON.parseObject(value, ClickUnionRequestBO.class); 185 +
186 //UnionTypeModel type = UnionConstant.unionTypeMap.get(Integer.parseInt(click.getUnion_type())); 186 //UnionTypeModel type = UnionConstant.unionTypeMap.get(Integer.parseInt(click.getUnion_type()));
187 187
188 String url = click.getCallbackurl(); 188 String url = click.getCallbackurl();