...
|
...
|
@@ -16,14 +16,8 @@ import com.yoho.unions.common.redis.RedisValueCache; |
|
|
import com.yoho.unions.common.utils.DateUtil;
|
|
|
import com.yoho.unions.common.utils.HttpUtils;
|
|
|
import com.yoho.unions.common.utils.RandomUtil;
|
|
|
import com.yoho.unions.dal.IMktMarketingUrlDAO;
|
|
|
import com.yoho.unions.dal.IUnionActivityLogsDAO;
|
|
|
import com.yoho.unions.dal.IUnionClickLogsDAO;
|
|
|
import com.yoho.unions.dal.IUnionsActiveRecordDAO;
|
|
|
import com.yoho.unions.dal.model.MktMarketingUrl;
|
|
|
import com.yoho.unions.dal.model.UnionActivityLogs;
|
|
|
import com.yoho.unions.dal.model.UnionClickLogs;
|
|
|
import com.yoho.unions.dal.model.UnionsActiveRecord;
|
|
|
import com.yoho.unions.dal.*;
|
|
|
import com.yoho.unions.dal.model.*;
|
|
|
import com.yoho.unions.server.service.DingdangService;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.apache.commons.lang3.tuple.Pair;
|
...
|
...
|
@@ -64,6 +58,12 @@ public class DingdangServiceImpl implements DingdangService { |
|
|
|
|
|
@Resource
|
|
|
IMktMarketingUrlDAO mktMarketingUrlDAO;
|
|
|
|
|
|
@Resource
|
|
|
IUnionLogsDAO unionLogsDAO;
|
|
|
|
|
|
@Resource
|
|
|
BaseUserActiveDayMapper baseUserActiveDayMapper;
|
|
|
|
|
|
private static final String unions_KEY = "yh:unions:dingdang_";
|
|
|
|
...
|
...
|
@@ -352,6 +352,39 @@ public class DingdangServiceImpl implements DingdangService { |
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public UnionResponseBO cleanBigData(int beginTime,int endTime){
|
|
|
try{
|
|
|
//查出那段时间内的激活
|
|
|
List<UnionLogs> unionLogsList = unionLogsDAO.selectByBeginAndEnd(beginTime, endTime);
|
|
|
for(UnionLogs unionLogs:unionLogsList){
|
|
|
//取出udid
|
|
|
String udid = unionLogs.getUdid();
|
|
|
String client_type = unionLogs.getClientType();
|
|
|
String app_key = "yohobuy_ios";
|
|
|
int id = unionLogs.getId();
|
|
|
String endDate = DateUtil.long2DateStr(Long.valueOf(beginTime)*Long.valueOf(1000),"yyyyMMdd");
|
|
|
|
|
|
if(client_type.equals("ios")){
|
|
|
app_key = "yohobuy_ios";
|
|
|
}else{
|
|
|
app_key = "yohobuy_android";
|
|
|
}
|
|
|
BaseUserActiveDay baseUserActiveDay = baseUserActiveDayMapper.selectByUdidAndAppKeyDate(udid, app_key,Integer.valueOf(endDate));
|
|
|
if(null!=baseUserActiveDay){
|
|
|
log.info("deleteUnionLogs udid is {}",udid);
|
|
|
unionLogsDAO.deleteByPrimaryKey(id);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}catch (Exception e){
|
|
|
log.warn("cleanBigData exception is {}",e);
|
|
|
}
|
|
|
UnionResponseBO response = new UnionResponseBO();
|
|
|
response.setIsSuccess(true);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public UnionResponse addYas(ClickUnionRequestBO request){
|
|
|
|
|
|
String unionType = request.getUnion_type();
|
...
|
...
|
|