...
|
...
|
@@ -77,7 +77,7 @@ public class UnionServiceImpl implements IUnionService { |
|
|
RedisValueCache redisValueCache;
|
|
|
|
|
|
@Resource
|
|
|
IUnionDepartmentUrlDAO unionDepartmentUrlDAO;
|
|
|
IMktMarketingUrlDAO mktMarketingUrlDAO;
|
|
|
|
|
|
@Resource
|
|
|
IUnionClickLogsDAO unionClickLogsDAO;
|
...
|
...
|
@@ -118,9 +118,9 @@ public class UnionServiceImpl implements IUnionService { |
|
|
return new UnionResponse(201, "union_type is error");
|
|
|
}
|
|
|
// UnionTypeModel m = UnionConstant.unionTypeMap.get(Integer.parseInt(request.getUnion_type()));
|
|
|
UnionDepartmentUrl type = redisValueCache.get("yh:union:newuniontype:"+request.getUnion_type(),UnionDepartmentUrl.class);
|
|
|
MktMarketingUrl type = redisValueCache.get("yh:union:uniontype:"+request.getUnion_type(),MktMarketingUrl.class);
|
|
|
if(type==null){
|
|
|
type = unionDepartmentUrlDAO.selectByUnionType(request.getUnion_type());
|
|
|
type = mktMarketingUrlDAO.selectByPrimaryKey(Long.valueOf(request.getUnion_type()));
|
|
|
redisValueCache.set("yh:union:uniontype:"+request.getUnion_type(),type,1, TimeUnit.HOURS);
|
|
|
}
|
|
|
if (type == null) {
|
...
|
...
|
@@ -360,15 +360,15 @@ public class UnionServiceImpl implements IUnionService { |
|
|
return new UnionResponse(203, "have activite in 90 days");
|
|
|
}
|
|
|
// UnionTypeModel u = UnionConstant.unionTypeMap.get(Integer.parseInt(click.getUnion_type()));
|
|
|
String unionTypekey = "yh:union:newuniontype:"+click.getUnion_type();
|
|
|
UnionDepartmentUrl unionDepartmentUrl = redisValueCache.get(unionTypekey,UnionDepartmentUrl.class);
|
|
|
if(unionDepartmentUrl==null){
|
|
|
unionDepartmentUrl = unionDepartmentUrlDAO.selectByUnionType(click.getUnion_type());
|
|
|
redisValueCache.set(unionTypekey,unionDepartmentUrl,1, TimeUnit.HOURS);
|
|
|
String unionTypekey = "yh:union:uniontype:"+click.getUnion_type();
|
|
|
MktMarketingUrl mktMarketingUrl = redisValueCache.get(unionTypekey,MktMarketingUrl.class);
|
|
|
if(mktMarketingUrl==null){
|
|
|
mktMarketingUrl = mktMarketingUrlDAO.selectByPrimaryKey(Long.valueOf(click.getUnion_type()));
|
|
|
redisValueCache.set(unionTypekey,mktMarketingUrl,1, TimeUnit.HOURS);
|
|
|
}
|
|
|
UnionTypeModel u = new UnionTypeModel();
|
|
|
u.setName(unionDepartmentUrl.getName());
|
|
|
u.setValue(unionDepartmentUrl.getUnionType());
|
|
|
u.setName(mktMarketingUrl.getName());
|
|
|
u.setValue(String.valueOf(mktMarketingUrl.getUnionType()));
|
|
|
//如果是ios系统,还要到大数据表里面判断这个用户是否90天内的活跃用户,如果是的话,这次激活就不成功
|
|
|
String yesterday = DateUtil.dateAdd(DateUtil.getToday("yyyyMMdd"), "d", -1, "yyyyMMdd");
|
|
|
if (ClientTypeEnum.IOS.getName().equals(request.getClient_type())) {
|
...
|
...
|
|