You've already forked FrameTour-BE
Revert "feat(PriceBiz): 新增商品类型字段并完善商品列表逻辑"
This reverts commit 7ca59a1b0b
.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package com.ycwl.basic.biz;
|
||||
|
||||
import com.ycwl.basic.model.mobile.order.IsBuyBatchRespVO;
|
||||
import com.ycwl.basic.model.mobile.order.IsBuyRespVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.content.ContentPageVO;
|
||||
import com.ycwl.basic.model.pc.coupon.entity.CouponEntity;
|
||||
import com.ycwl.basic.model.pc.couponRecord.resp.CouponRecordQueryResp;
|
||||
import com.ycwl.basic.model.pc.face.entity.FaceEntity;
|
||||
@@ -17,17 +15,14 @@ import com.ycwl.basic.repository.FaceRepository;
|
||||
import com.ycwl.basic.repository.PriceRepository;
|
||||
import com.ycwl.basic.repository.ScenicRepository;
|
||||
import com.ycwl.basic.repository.TemplateRepository;
|
||||
import com.ycwl.basic.service.pc.FaceService;
|
||||
import org.apache.commons.lang3.Strings;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
@@ -43,9 +38,6 @@ public class PriceBiz {
|
||||
@Autowired
|
||||
private FaceRepository faceRepository;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private FaceService faceService;
|
||||
@Autowired
|
||||
private CouponBiz couponBiz;
|
||||
|
||||
public List<GoodsListRespVO> listGoodsByScenic(Long scenicId) {
|
||||
@@ -56,16 +48,15 @@ public class PriceBiz {
|
||||
GoodsListRespVO goods = new GoodsListRespVO();
|
||||
goods.setGoodsId(template.getId());
|
||||
goods.setGoodsName(template.getName());
|
||||
goods.setGoodsType(0);
|
||||
return goods;
|
||||
}).forEach(goodsList::add);
|
||||
ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(scenicId);
|
||||
if (scenicConfig != null) {
|
||||
if (!Boolean.TRUE.equals(scenicConfig.getDisableSourceVideo())) {
|
||||
goodsList.add(new GoodsListRespVO(1L, "录像集", 1));
|
||||
goodsList.add(new GoodsListRespVO(1L, "录像集"));
|
||||
}
|
||||
if (!Boolean.TRUE.equals(scenicConfig.getDisableSourceImage())) {
|
||||
goodsList.add(new GoodsListRespVO(2L, "照片集", 2));
|
||||
goodsList.add(new GoodsListRespVO(2L, "照片集"));
|
||||
}
|
||||
}
|
||||
return goodsList;
|
||||
@@ -149,14 +140,6 @@ public class PriceBiz {
|
||||
respVO.setBuy(Integer.valueOf(1).equals(orderEntity.getStatus()));
|
||||
}
|
||||
}
|
||||
if (type == -1 && !respVO.isBuy()) {
|
||||
// 查找所有内容是否购买。
|
||||
List<ContentPageVO> list = faceService.faceContentList(faceId);
|
||||
boolean notBuy = list.stream().anyMatch(item -> Integer.valueOf(0).equals(item.getIsBuy()));
|
||||
if (!notBuy) {
|
||||
respVO.setBuy(true);
|
||||
}
|
||||
}
|
||||
respVO.setShare(false);
|
||||
if (face == null || !face.getMemberId().equals(userId)) {
|
||||
respVO.setShare(true);
|
||||
|
Reference in New Issue
Block a user