| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | private HongBaoSaveResult saveHongBao(CommonOrder commonOrder, int type, Map<Integer, HongBaoOrder> notificationMap,
|
| | | UserLevelEnum buyerLevel, Date placeOrderDate) throws HongBaoException, UserAccountException {
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(commonOrder.getUserInfo().getId());
|
| | | if (type == HongBaoV2.TYPE_ZIGOU) {
|
| | | // 查询是否有免单计划
|
| | | BigDecimal mianDanMoney = null;
|
| | |
| | | if (commonOrder.getSourceType() == Constant.SOURCE_TYPE_TAOBAO
|
| | | && commonOrder.getSourcePosition().equalsIgnoreCase(TaoBaoConstant.TAOBAO_TLJ_RELATION_PID_DEFAULT))// 来自于淘礼金的分享
|
| | | {
|
| | | BigDecimal shareRate = hongBaoManageService.getTLJShareRate(commonOrder.getCreateTime().getTime());
|
| | | BigDecimal shareRate = hongBaoManageService.getTLJShareRate(commonOrder.getCreateTime().getTime(), system);
|
| | | if (commonOrder.getState() == CommonOrder.STATE_JS || commonOrder.getState() == CommonOrder.STATE_WQ)
|
| | | money = MoneyBigDecimalUtil.mul(commonOrder.geteIncome(),
|
| | | MoneyBigDecimalUtil.div(shareRate, new BigDecimal(100)));
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * @param commonOrder
|
| | | * - 订单信息
|
| | | * @param fanliRate
|
| | | * -返利比例
|
| | | * @param money
|
| | | * @param mianDanMoney
|
| | | * 免单金额
|
| | | * @param isVIP-是否为VIP订单
|
| | | * @param userLevel
|
| | | * @return
|
| | | * @throws HongBaoException
|
| | | * @throws UserAccountException
|
| | |
| | | * 分享赚更新
|
| | | *
|
| | | * @param commonOrder
|
| | | * @param fanliRate
|
| | | * @param hongBaoId
|
| | | * @param mianDan
|
| | | * @return
|
| | | * @throws HongBaoException
|
| | | * @throws UserAccountException
|