You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Override
public Long getMostCollectUser() {
String querySql = "SELECT c.user_id ,COUNT(1) AS counts FROM collect c WHERE type='PUBLIC' AND is_delete='NO' GROUP BY c.user_id ORDER BY counts DESC LIMIT 1";
List<Object[]> objecArraytList = sqlArrayList(querySql);
Object[] obj = objecArraytList.get(0);
return Long.valueOf(obj[0].toString());
}
其他的基本存在同样的问题。
2.解决方案:可以初始化一些数据,或是进行判断后再返回,那么需要默认一个用户或者收藏之类的。
The text was updated successfully, but these errors were encountered:
出现的问题由于CollectorRepositoryImpl这个实现类,没有经过判断,直接就返回了list里面的对象,如果为空,那么还取里面的对象。举一个例子:
其他的基本存在同样的问题。
2.解决方案:可以初始化一些数据,或是进行判断后再返回,那么需要默认一个用户或者收藏之类的。
The text was updated successfully, but these errors were encountered: