| | |
| | | import com.ruoyi.system.api.feignClient.GoodsSkuClient; |
| | | import com.ruoyi.system.api.feignClient.MemberClient; |
| | | import com.ruoyi.system.api.feignClient.PromotionClient; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import org.apache.commons.beanutils.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private PaylogServiceImpl paylogService; |
| | | |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | |
| | | |
| | | @Override |
| | |
| | | order.setOrderTime(LocalDateTime.now()); |
| | | order.setGoodsQuantity(memberOrderDTO.getGoodsQuantity()); |
| | | order.setTotalAmount(pice.multiply(new BigDecimal(memberOrderDTO.getGoodsQuantity()))); |
| | | CustomConfig memberPointsMoney = sysUserClient.getconfig("MEMBER_POINTS_MONEY").getData(); |
| | | CustomConfig memberPointsPoints = sysUserClient.getconfig("MEMBER_POINTS_POINTS").getData(); |
| | | |
| | | BigDecimal pic=pice.multiply(new BigDecimal(memberOrderDTO.getGoodsQuantity())); |
| | | Double aDouble= Double.valueOf(memberPointsMoney.getConfigValue()) * Double.valueOf(memberPointsPoints.getConfigValue()); |
| | | BigDecimal pi=pic.multiply(new BigDecimal(aDouble)); |
| | | order.setPoints(pi.intValue()); |
| | | order.setOrderStatus(OrderStatusEnum.TO_PLAY); |
| | | |
| | | if (memberOrderDTO.getOrderFrom()==3){ |
| | |
| | | promotionClient.updCouponMember(couponMemberDTO2, SecurityConstants.INNER); |
| | | |
| | | order.setTotalAmount(pice); |
| | | |
| | | CustomConfig memberPointsMoney = sysUserClient.getconfig("MEMBER_POINTS_MONEY").getData(); |
| | | CustomConfig memberPointsPoints = sysUserClient.getconfig("MEMBER_POINTS_POINTS").getData(); |
| | | |
| | | BigDecimal pic=pice.multiply(new BigDecimal(memberOrderDTO.getGoodsQuantity())); |
| | | Double aDouble= Double.valueOf(memberPointsMoney.getConfigValue()) * Double.valueOf(memberPointsPoints.getConfigValue()); |
| | | BigDecimal pi=pic.multiply(new BigDecimal(aDouble)); |
| | | order.setPoints(pi.intValue()); |
| | | |
| | | } |
| | | |
| | | baseMapper.updateById(order); |