| | |
| | | import com.ruoyi.other.api.vo.GetGoodsBargainPrice; |
| | | import com.ruoyi.other.api.vo.GetGoodsShopByGoodsIds; |
| | | import com.ruoyi.other.api.vo.GetSeckillActivityInfo; |
| | | import lombok.Data; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import java.math.RoundingMode; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | GetGoodsBargainPrice goodsBargainPrice = new GetGoodsBargainPrice(); |
| | | goodsBargainPrice.setGoodsId(goodsId); |
| | | goodsBargainPrice.setVip(appUser.getVipId()); |
| | | GoodsBargainPriceDetail bargainPriceDetail = null; |
| | | if (shopId != null){ |
| | | goodsBargainPrice.setShopId(shopId); |
| | | GoodsBargainPriceDetail bargainPriceDetail = goodsBargainPriceClient.getGoodsBargainPrice(goodsBargainPrice).getData(); |
| | | bargainPriceDetail = goodsBargainPriceClient.getGoodsBargainPrice(goodsBargainPrice).getData(); |
| | | } |
| | | if(null == bargainPriceDetail){ |
| | | //没有门店特价,判断地区价格配置 |
| | | GoodsArea area = new GoodsArea(); |
| | |
| | | }else{ |
| | | price.setCash(goodsVip.getSellingPrice()); |
| | | price.setPoint(goodsVip.getIntegral()); |
| | | price.setCashPayment(goodsVip.getCashPayment() == 1 ? true : false); |
| | | price.setPointPayment(goodsVip.getPointPayment() == 1 ? true : false); |
| | | price.setCashPayment(goodsVip.getCashPayment() == 1); |
| | | price.setPointPayment(goodsVip.getPointPayment() == 1); |
| | | price.setEarnSpendingPoints(goodsVip.getEarnSpendingPoints()); |
| | | price.setSuperiorSubcommission(goodsVip.getSuperiorSubcommission()); |
| | | price.setSuperiorRebatePoints(goodsVip.getSuperiorRebatePoints()); |
| | |
| | | }else{ |
| | | price.setCash(goodsArea.getSellingPrice()); |
| | | price.setPoint(goodsArea.getIntegral()); |
| | | price.setCashPayment(goodsArea.getCashPayment() == 1 ? true : false); |
| | | price.setPointPayment(goodsArea.getPointPayment() == 1 ? true : false); |
| | | price.setCashPayment(goodsArea.getCashPayment() == 1); |
| | | price.setPointPayment(goodsArea.getPointPayment() == 1); |
| | | price.setEarnSpendingPoints(goodsArea.getEarnSpendingPoints()); |
| | | price.setSuperiorSubcommission(goodsArea.getSuperiorSubcommission()); |
| | | price.setSuperiorRebatePoints(goodsArea.getSuperiorRebatePoints()); |
| | |
| | | }else{ |
| | | price.setCash(bargainPriceDetail.getSellingPrice()); |
| | | price.setPoint(bargainPriceDetail.getIntegral()); |
| | | price.setCashPayment(bargainPriceDetail.getSellingPrice() != null ? true : false); |
| | | price.setPointPayment(bargainPriceDetail.getIntegral() != null ? true : false); |
| | | price.setCashPayment(bargainPriceDetail.getSellingPrice() != null); |
| | | price.setPointPayment(bargainPriceDetail.getIntegral() != null); |
| | | //门店特价,消费积分使用会员等级的消费积分 |
| | | GoodsArea area = new GoodsArea(); |
| | | area.setDistrictsCode(appUser.getDistrictCode()); |
| | |
| | | if(goodsSeckill.getCashPayment() == 0 && goodsSeckill.getPointPayment() == 1){ |
| | | price.setPoint(goodsSeckill.getIntegral()); |
| | | } |
| | | price.setCashPayment(goodsSeckill.getCashPayment() == 1 ? true : false); |
| | | price.setPointPayment(goodsSeckill.getPointPayment() == 1 ? true : false); |
| | | price.setCashPayment(goodsSeckill.getCashPayment() == 1); |
| | | price.setPointPayment(goodsSeckill.getPointPayment() == 1); |
| | | price.setEndTime(goodsSeckill.getEndTime()); |
| | | price.setEarnSpendingPoints(goodsSeckill.getEarnSpendingPoints()); |
| | | price.setSuperiorSubcommission(goodsSeckill.getSuperiorSubcommission()); |
| | |
| | | } |
| | | |
| | | |
| | | @Data |
| | | class Price { |
| | | /** |
| | | * 现金 |
| | | */ |
| | | private BigDecimal cash; |
| | | /** |
| | | * 积分 |
| | | */ |
| | | private Integer point; |
| | | /** |
| | | * 获取结束时间 |
| | | */ |
| | | private Long endTime; |
| | | /** |
| | | * 现金支付 |
| | | */ |
| | | private Boolean cashPayment; |
| | | /** |
| | | * 积分支付 |
| | | */ |
| | | private Boolean pointPayment; |
| | | /** |
| | | * 可获得消费积分 |
| | | */ |
| | | private Integer earnSpendingPoints; |
| | | /** |
| | | * 上级获得分佣金额 |
| | | */ |
| | | private BigDecimal superiorSubcommission; |
| | | /** |
| | | * 上级获得返佣积分 |
| | | */ |
| | | private Integer superiorRebatePoints; |
| | | /** |
| | | * 获取返佣积分上级类型(1=直推上级,2=直帮上级) |
| | | */ |
| | | private Integer superiorType; |
| | | /** |
| | | * 核销门店可获得服务费 |
| | | */ |
| | | private BigDecimal servuceShopCharges; |
| | | /** |
| | | * 核销门店可获得服务积分 |
| | | */ |
| | | private Integer servuceShopPoints; |
| | | /** |
| | | * 技师可获得服务积分 |
| | | */ |
| | | private Integer technicianPoints; |
| | | /** |
| | | * 绑定门店可获得分佣金额 |
| | | */ |
| | | private BigDecimal boundShopCharges; |
| | | /** |
| | | * 绑定门店可获得返佣积分 |
| | | */ |
| | | private Integer boundShopPoints; |
| | | /** |
| | | * 绑定门店上级门店可获得分佣金额 |
| | | */ |
| | | private BigDecimal boundShopSuperiorsCharges; |
| | | /** |
| | | * 绑定门店上级门店可获得返佣积分 |
| | | */ |
| | | private Integer boundShopSuperiorsPoints; |
| | | } |
| | | |
| | | |
| | | @Override |