You've already forked FrameTour-BE
Compare commits
4 Commits
7ca59a1b0b
...
0432b99524
Author | SHA1 | Date | |
---|---|---|---|
0432b99524 | |||
da71e6d16f | |||
f29217ac1f | |||
638da8cd3d |
@@ -1,8 +1,6 @@
|
|||||||
package com.ycwl.basic.biz;
|
package com.ycwl.basic.biz;
|
||||||
|
|
||||||
import com.ycwl.basic.model.mobile.order.IsBuyBatchRespVO;
|
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.coupon.entity.CouponEntity;
|
||||||
import com.ycwl.basic.model.pc.couponRecord.resp.CouponRecordQueryResp;
|
import com.ycwl.basic.model.pc.couponRecord.resp.CouponRecordQueryResp;
|
||||||
import com.ycwl.basic.model.pc.face.entity.FaceEntity;
|
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.PriceRepository;
|
||||||
import com.ycwl.basic.repository.ScenicRepository;
|
import com.ycwl.basic.repository.ScenicRepository;
|
||||||
import com.ycwl.basic.repository.TemplateRepository;
|
import com.ycwl.basic.repository.TemplateRepository;
|
||||||
import com.ycwl.basic.service.pc.FaceService;
|
|
||||||
import org.apache.commons.lang3.Strings;
|
import org.apache.commons.lang3.Strings;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@@ -43,9 +38,6 @@ public class PriceBiz {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private FaceRepository faceRepository;
|
private FaceRepository faceRepository;
|
||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
|
||||||
private FaceService faceService;
|
|
||||||
@Autowired
|
|
||||||
private CouponBiz couponBiz;
|
private CouponBiz couponBiz;
|
||||||
|
|
||||||
public List<GoodsListRespVO> listGoodsByScenic(Long scenicId) {
|
public List<GoodsListRespVO> listGoodsByScenic(Long scenicId) {
|
||||||
@@ -56,16 +48,15 @@ public class PriceBiz {
|
|||||||
GoodsListRespVO goods = new GoodsListRespVO();
|
GoodsListRespVO goods = new GoodsListRespVO();
|
||||||
goods.setGoodsId(template.getId());
|
goods.setGoodsId(template.getId());
|
||||||
goods.setGoodsName(template.getName());
|
goods.setGoodsName(template.getName());
|
||||||
goods.setGoodsType(0);
|
|
||||||
return goods;
|
return goods;
|
||||||
}).forEach(goodsList::add);
|
}).forEach(goodsList::add);
|
||||||
ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(scenicId);
|
ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(scenicId);
|
||||||
if (scenicConfig != null) {
|
if (scenicConfig != null) {
|
||||||
if (!Boolean.TRUE.equals(scenicConfig.getDisableSourceVideo())) {
|
if (!Boolean.TRUE.equals(scenicConfig.getDisableSourceVideo())) {
|
||||||
goodsList.add(new GoodsListRespVO(1L, "录像集", 1));
|
goodsList.add(new GoodsListRespVO(1L, "录像集"));
|
||||||
}
|
}
|
||||||
if (!Boolean.TRUE.equals(scenicConfig.getDisableSourceImage())) {
|
if (!Boolean.TRUE.equals(scenicConfig.getDisableSourceImage())) {
|
||||||
goodsList.add(new GoodsListRespVO(2L, "照片集", 2));
|
goodsList.add(new GoodsListRespVO(2L, "照片集"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return goodsList;
|
return goodsList;
|
||||||
@@ -149,14 +140,6 @@ public class PriceBiz {
|
|||||||
respVO.setBuy(Integer.valueOf(1).equals(orderEntity.getStatus()));
|
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);
|
respVO.setShare(false);
|
||||||
if (face == null || !face.getMemberId().equals(userId)) {
|
if (face == null || !face.getMemberId().equals(userId)) {
|
||||||
respVO.setShare(true);
|
respVO.setShare(true);
|
||||||
|
@@ -169,7 +169,7 @@ public class TemplateBiz {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("filterTaskParams: templateId:{}, original keys:{}, filtered keys:{}, placeholder counts:{}",
|
log.debug("filterTaskParams: templateId:{}, original keys:{}, filtered keys:{}, placeholder counts:{}",
|
||||||
templateId, allTaskParams.keySet().size(), filteredParams.keySet().size(), placeholderCounts);
|
templateId, allTaskParams.keySet().size(), filteredParams.keySet().size(), placeholderCounts);
|
||||||
|
|
||||||
return filteredParams;
|
return filteredParams;
|
||||||
|
@@ -25,7 +25,7 @@ public class CouponController {
|
|||||||
@GetMapping("/{scenicId}/goodsList")
|
@GetMapping("/{scenicId}/goodsList")
|
||||||
public ApiResponse<List<GoodsListRespVO>> scenicGoodsList(@PathVariable Long scenicId) {
|
public ApiResponse<List<GoodsListRespVO>> scenicGoodsList(@PathVariable Long scenicId) {
|
||||||
List<GoodsListRespVO> data = priceBiz.listGoodsByScenic(scenicId);
|
List<GoodsListRespVO> data = priceBiz.listGoodsByScenic(scenicId);
|
||||||
data.add(new GoodsListRespVO(-1L, "一口价", -1));
|
data.add(new GoodsListRespVO(-1L, "一口价"));
|
||||||
return ApiResponse.success(data);
|
return ApiResponse.success(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,5 +10,4 @@ import lombok.NoArgsConstructor;
|
|||||||
public class GoodsListRespVO {
|
public class GoodsListRespVO {
|
||||||
private Long goodsId;
|
private Long goodsId;
|
||||||
private String goodsName;
|
private String goodsName;
|
||||||
private Integer goodsType;
|
|
||||||
}
|
}
|
||||||
|
@@ -46,7 +46,7 @@ public class BundleDiscountServiceImpl implements IBundleDiscountService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("检测到 {} 个可用的打包优惠", bundleDiscounts.size());
|
log.debug("检测到 {} 个可用的打包优惠", bundleDiscounts.size());
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("检测打包优惠失败", e);
|
log.error("检测打包优惠失败", e);
|
||||||
|
@@ -768,6 +768,9 @@ public class FaceServiceImpl implements FaceService {
|
|||||||
sourceImageContent.setSourceType(2);
|
sourceImageContent.setSourceType(2);
|
||||||
sourceImageContent.setLockType(-1);
|
sourceImageContent.setLockType(-1);
|
||||||
sourceImageContent.setTemplateCoverUrl(list.getFirst().getUrl());
|
sourceImageContent.setTemplateCoverUrl(list.getFirst().getUrl());
|
||||||
|
if (Strings.isBlank(sourceVideoContent.getTemplateCoverUrl())) {
|
||||||
|
sourceVideoContent.setTemplateCoverUrl(list.getFirst().getUrl());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -489,6 +489,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="queryTypeOrder" resultType="com.ycwl.basic.model.pc.order.entity.OrderEntity">
|
<select id="queryTypeOrder" resultType="com.ycwl.basic.model.pc.order.entity.OrderEntity">
|
||||||
select * from `order` where member_id = #{userId} and face_id = #{faceId} and type = #{orderType} and price_config_id = #{priceConfigId}
|
select * from `order` where member_id = #{userId} and face_id = #{faceId} and type = #{orderType} and price_config_id = #{priceConfigId}
|
||||||
|
order by pay_at desc
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="getUserOrderItem" resultType="com.ycwl.basic.model.pc.order.entity.OrderEntity">
|
<select id="getUserOrderItem" resultType="com.ycwl.basic.model.pc.order.entity.OrderEntity">
|
||||||
|
Reference in New Issue
Block a user