feat(order): 添加face相关分享逻辑
All checks were successful
ZhenTu-BE/pipeline/head This commit looks good

- 在OrderBiz和PriceBiz中增加face相关分享逻辑判断
- 在IsBuyBatchRespVO和IsBuyRespVO中添加share字段用于表示是否可分享
This commit is contained in:
2025-09-03 16:45:00 +08:00
parent 7d2666128a
commit 657eb482bb
4 changed files with 11 additions and 0 deletions

View File

@@ -203,6 +203,11 @@ public class OrderBiz {
if (priceObj == null) {
return respVO;
}
FaceEntity face = faceRepository.getFace(priceObj.getFaceId());
respVO.setShare(true);
if (face != null && face.getMemberId().equals(userId)) {
respVO.setShare(false);
}
respVO.setFree(priceObj.isFree());
respVO.setGoodsType(goodsType);
respVO.setGoodsId(goodsId);

View File

@@ -138,6 +138,10 @@ public class PriceBiz {
respVO.setBuy(Integer.valueOf(1).equals(orderEntity.getStatus()));
}
}
respVO.setShare(false);
if (face != null && face.getMemberId().equals(userId)) {
respVO.setShare(true);
}
return respVO;
}
}

View File

@@ -9,6 +9,7 @@ import java.math.BigDecimal;
public class IsBuyBatchRespVO {
private boolean buy;
private boolean free;
private boolean share = false;
private Long orderId;
private Integer configId;
private int type;

View File

@@ -9,6 +9,7 @@ import java.math.BigDecimal;
public class IsBuyRespVO {
private boolean buy;
private boolean free;
private boolean share = false;
private Long orderId;
private int goodsType;
private Long goodsId;