| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.entity.SystemPIDInfo; |
| | | import com.yeshi.fanli.service.inter.user.UserInfoService; |
| | | import com.yeshi.fanli.service.manger.PIDManager; |
| | | import org.springframework.core.task.TaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | return userTaoLiJinRecordMapper.selectByPrimaryKey(id); |
| | | } |
| | | |
| | | @Resource |
| | | private PIDManager pidManager; |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public UserTaoLiJinRecord createSelfBuyTaoLiJin(Long uid, BigDecimal couplePrice, TaoBaoGoodsBrief goods) |
| | |
| | | throw new UserTaoLiJinRecordException(101, "渠道未备案"); |
| | | } |
| | | UserTaoLiJinRecord record = createUserTaoLiJin(1, uid, goods.getAuctionId(), couplePrice, 1, name, |
| | | sendStartTime, sendEndTime, null, useEndTime, TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID); |
| | | sendStartTime, sendEndTime, null, useEndTime, pidManager.getPidCache(SystemEnum.blks, Constant.SOURCE_TYPE_TAOBAO, SystemPIDInfo.PidType.fanliChannel)); |
| | | record.setSendUrl(record.getSendUrl() + "&relationId=" + relationId); |
| | | UserTaoLiJinRecord updateRecoed = new UserTaoLiJinRecord(); |
| | | updateRecoed.setId(record.getId()); |
| | |
| | | return record; |
| | | } else {// 返利库商品 |
| | | return createUserTaoLiJin(1, uid, goods.getAuctionId(), couplePrice, 1, name, sendStartTime, sendEndTime, null, |
| | | useEndTime, TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT); |
| | | useEndTime, pidManager.getPidCache(SystemEnum.blks, Constant.SOURCE_TYPE_TAOBAO, SystemPIDInfo.PidType.fanli)); |
| | | } |
| | | |
| | | } |
| | |
| | | BigDecimal shareMoney = new BigDecimal(0); |
| | | BigDecimal commission = userTaoLiJinRecordVO.getCommission(); |
| | | if (commission != null && commission.compareTo(shareMoney) > 0) { |
| | | BigDecimal shareRate = hongBaoManageService.getShareRate(UserLevelEnum.daRen,system); |
| | | BigDecimal shareRate = hongBaoManageService.getShareRate(UserLevelEnum.daRen, system); |
| | | shareMoney = MoneyBigDecimalUtil.mul(commission, |
| | | MoneyBigDecimalUtil.div(shareRate, new BigDecimal(100))); |
| | | shareMoney = BigDecimalUtil.getWithNoZera(shareMoney); |