Commit d38e5266 by 朱亚洁

1002803小程序支付

parent 2a93188e
......@@ -153,6 +153,7 @@ import com.pcloud.book.pcloudkeyword.entity.PcloudRobot;
import com.pcloud.book.push.enums.AltTypeEnum;
import com.pcloud.book.reading.dao.ReadingUserDao;
import com.pcloud.book.rightsSetting.biz.RightsSettingBiz;
import com.pcloud.book.rightsSetting.constants.RightsSettingConstant;
import com.pcloud.book.rightsSetting.dto.RightsSettingDto;
import com.pcloud.book.util.common.ThreadPoolUtils;
import com.pcloud.channelcenter.base.constants.ChannelConstants;
......@@ -227,6 +228,7 @@ import com.pcloud.wechatgroup.selfrobot.enums.SelfRobotTypeEnum;
import com.sdk.wxgroup.SendMessageTypeEnum;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -4710,11 +4712,29 @@ public class BookGroupBizImpl implements BookGroupBiz {
}
//填充资源信息
fillBookServe(serveDTOList);
//移除不能购买的应用或作品
removeCanNotBuy(serveDTOList);
PageBeanNew<BookServeDTO> pageBeanNew = new PageBeanNew<BookServeDTO>(0,serveDTOList.size(),serveDTOList.size(),serveDTOList);
pageBeanNew.setPageCount(1);
return pageBeanNew;
}
@ParamLog("移除不能购买的应用或作品")
private void removeCanNotBuy(List<BookServeDTO> list) {
if (ListUtils.isEmpty(list)) {
return;
}
List<BookServeDTO> toRemoveList = new ArrayList<>();
for (BookServeDTO item : list) {
if ((AppAndProductTypeEnum.APP.value.equals(item.getServeType()) && ArrayUtils.contains(RightsSettingConstant.APPLET_APP_NOT_SUPPORT, item.getFromType()))
|| (AppAndProductTypeEnum.PRODUCT.value.equals(item.getServeType()) && ArrayUtils.contains(RightsSettingConstant.APPLET_PRODUCT_NOT_SUPPORT, item.getFromType())) || StringUtil.isEmpty(item.getFromType())) {
toRemoveList.add(item);
}
}
if (!ListUtils.isEmpty(toRemoveList)) {
list.removeAll(toRemoveList);
}
}
public List<BookServeDTO> getBookAndBookGroupServeIds(Long adviserId, Long bookId, Long channelId){
List<BookServeDTO> serveDTOList = new ArrayList<>();
......
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