Commit de5c79fd authored by “yiyousong”'s avatar “yiyousong”
parents a2c1a17f 4b2a761e
......@@ -2,6 +2,7 @@ package com.mortals.xhx.module.baseset.service.impl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.baseset.dao.BasesetDao;
......@@ -14,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
......@@ -36,7 +38,13 @@ public class BasesetServiceImpl extends AbstractCRUDServiceImpl<BasesetDao, Base
@Override
protected void findAfter(BasesetEntity params, PageInfo pageInfo, Context context, List<BasesetEntity> list) throws AppException {
list.forEach(item -> {
List<HotwordEntity> hotwordEntities = hotwordService.find(new HotwordQuery().siteId(item.getSiteId()));
HotwordQuery hotwordQuery = new HotwordQuery();
hotwordQuery.siteId(item.getSiteId());
List<OrderCol> orderColList = new ArrayList<>();
orderColList.add(new OrderCol("wordsSource", OrderCol.ASCENDING));
orderColList.add(new OrderCol("searchCount", OrderCol.DESCENDING));
hotwordQuery.setOrderColList(orderColList);
List<HotwordEntity> hotwordEntities = hotwordService.find(hotwordQuery);
item.setHotwordList(hotwordEntities);
});
super.findAfter(params, pageInfo, context, list);
......
......@@ -192,8 +192,8 @@ public class HomeController extends BaseJsonBodyController {
HotwordQuery hotwordQuery = new HotwordQuery();
hotwordQuery.siteId(homeQueryPdu.getSiteId());
List<OrderCol> orderColList = new ArrayList<>();
orderColList.add(new OrderCol("searchCount", OrderCol.DESCENDING));
orderColList.add(new OrderCol("wordsSource", OrderCol.ASCENDING));
orderColList.add(new OrderCol("searchCount", OrderCol.DESCENDING));
hotwordQuery.setOrderColList(orderColList);
PageInfo pageInfo = new PageInfo();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment