Commit df8807fb by 王世昌

fix

parent 1ef5a019
......@@ -6,17 +6,12 @@ import cn.freemud.demo.entities.dto.goods.add.MCoffeeAddGoodsVO;
import cn.freemud.demo.entities.dto.goods.add.PlatformAddGoodsVO;
import cn.freemud.demo.enums.BizTypeEnum;
import cn.freemud.utils.BeanUtil;
import ma.glasnost.orika.MapperFacade;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component
public class AddGoodsVOAdapter {
@Resource
private MapperFacade mapperFacade;
public BaseAddGoodsVO convert2AddGoodsVO(String bizType, ShoppingCartGoodsBO baseAddGoodsBO) {
BaseAddGoodsVO baseAddGoodsVO;
if (BizTypeEnum.MCOFFEE.getCode().equals(bizType)) {
......
......@@ -108,16 +108,15 @@ public class KgdCouponServiceImpl implements CouponService {
if (couponDetail == null || !couponDetail.getResult().equals(ResponseCodeConstant.RESPONSE_SUCCESS_1) || CollectionUtils.isEmpty(couponDetail.getDetails())) {
return null;
}
if (CollectionUtils.isEmpty(couponDetail.getDetails())) {
return null;
}
Integer couponType = 0;
CouponDetailBO.Details couponActivityDetail = null;
// 多规格券
if (StringUtils.isNotBlank(getCheckSpqBo.getSkuId())){
for (CouponDetailBO.Details detail : couponDetail.getDetails()) {
if (Objects.nonNull(couponActivityDetail)) break;
if (!CouponStatus.STATUS_0.getCode().equals(detail.getStatus()) || !CouponStatus.STATUS_2.getCode().equals(detail.getStatus())){
if (Objects.nonNull(couponActivityDetail)){
break;
}
if (!CouponStatus.STATUS_0.getCode().equals(detail.getStatus()) && !CouponStatus.STATUS_2.getCode().equals(detail.getStatus())){
continue;
}
for (CouponDetailBO.ActiveProduct activeProduct : detail.getActiveProduct()) {
......
......@@ -222,9 +222,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
if (CollectionUtils.isEmpty(allCartGoodsList)) {
allCartGoodsList = new ArrayList<>();
}
List<CartGoods> oldCartGoodsList = BeanUtil.convertBeans(allCartGoodsList, CartGoods::new);
bo.setCartGoods(oldCartGoodsList);
bo.setCartGoods(allCartGoodsList);
// 转换商品券购物车添加的商品
if (Objects.nonNull(spqBO)) {
......
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