Authored by mingdan.ge

no message

package com.yoho.unions.dal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.yoho.unions.dal.model.UnionShareBigDataClick;
public interface UnionShareBigDataClickMapper {
UnionShareBigDataClick selectByUnionTypeAndDate(@Param("unionType") String unionType, @Param("startDate") Integer startDate, @Param("endDate") Integer endDate);
List<UnionShareBigDataClick> selectByUnionTypeAndDate(@Param("unionType") String unionType, @Param("startDate") Integer startDate, @Param("endDate") Integer endDate);
}
\ No newline at end of file
... ...
... ... @@ -1912,12 +1912,17 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
return 0;
}
String unionType = unionShareUser.getUnionType();
UnionShareBigDataClick clickInfo = unionShareBigDataClickMapper.selectByUnionTypeAndDate(unionType, startDate, endDate);
if(null == clickInfo) {
List<UnionShareBigDataClick> clickInfoList = unionShareBigDataClickMapper.selectByUnionTypeAndDate(unionType, startDate, endDate);
if(CollectionUtils.isEmpty(clickInfoList)) {
return 0;
}
return clickInfo.getClickVisit();
int clickNum = 0;
for(UnionShareBigDataClick click : clickInfoList) {
clickNum += click.getClickVisit();
}
return clickNum;
}
... ...