Commit 097e3c60 by 裴大威

Merge branch 'zyj-youhua' into 'master'

'接口优化'listUser4ReadingActivity

See merge request rays/pcloud-book!547
parents 0023ae1a 97130fae
...@@ -41,6 +41,7 @@ import com.pcloud.common.enums.AppTypeEnum; ...@@ -41,6 +41,7 @@ import com.pcloud.common.enums.AppTypeEnum;
import com.pcloud.common.utils.DateUtils; import com.pcloud.common.utils.DateUtils;
import com.pcloud.common.utils.ListUtils; import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.ResponseHandleUtil; import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import com.pcloud.common.utils.string.StringUtil; import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.facade.tradecenter.dto.GroupIncomeSearchDto; import com.pcloud.facade.tradecenter.dto.GroupIncomeSearchDto;
import com.pcloud.facade.tradecenter.dto.GroupMoneyDto; import com.pcloud.facade.tradecenter.dto.GroupMoneyDto;
...@@ -749,7 +750,14 @@ public class GroupSet { ...@@ -749,7 +750,14 @@ public class GroupSet {
userBookInfoVO.setRobotBaseInfoVOS(robotBaseInfoVOS); userBookInfoVO.setRobotBaseInfoVOS(robotBaseInfoVOS);
} }
//扫码书刊 //扫码书刊
List<UserBookInfoItemVO> bookList = bookGroupCipherUserDao.getScanBookInfoByUserNew(userBookInfoVO.getWxUserId(), userBookInfoVO.getAltId()); String key = "BOOK:READING_ACTIVITY:USER_SCAN_BOOK";
String field = userBookInfoVO.getWxUserId()+"-"+userBookInfoVO.getAltId();
List<UserBookInfoItemVO> bookList = JedisClusterUtils.hgetJson2List(key,field,UserBookInfoItemVO.class);
if (ListUtils.isEmpty(bookList)){
bookList = bookGroupCipherUserDao.getScanBookInfoByUserNew(userBookInfoVO.getWxUserId(), userBookInfoVO.getAltId());
JedisClusterUtils.hset2Json(key, field, bookList);
JedisClusterUtils.expire(key, 2*3600);
}
userBookInfoVO.setBookInfoItemVOS(bookList); userBookInfoVO.setBookInfoItemVOS(bookList);
List<Long> graLabelIds = bookList.stream().filter(s -> s.getGraLabelId() != null).map(UserBookInfoItemVO::getGraLabelId).distinct().collect(Collectors.toList()); List<Long> graLabelIds = bookList.stream().filter(s -> s.getGraLabelId() != null).map(UserBookInfoItemVO::getGraLabelId).distinct().collect(Collectors.toList());
List<Long> subLabelIds = bookList.stream().filter(s -> s.getSubLabelId() != null).map(UserBookInfoItemVO::getSubLabelId).distinct().collect(Collectors.toList()); List<Long> subLabelIds = bookList.stream().filter(s -> s.getSubLabelId() != null).map(UserBookInfoItemVO::getSubLabelId).distinct().collect(Collectors.toList());
......
...@@ -598,7 +598,7 @@ ...@@ -598,7 +598,7 @@
MAX(u.id) uid MAX(u.id) uid
FROM FROM
book_group_cipher_user u book_group_cipher_user u
LEFT JOIN book_group g ON u.book_group_id = g.id INNER JOIN book_group g ON u.book_group_id = g.id
WHERE WHERE
g.join_group_type = 3 g.join_group_type = 3
<if test="bookIds != null and bookIds.size>0"> <if test="bookIds != null and bookIds.size>0">
......
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