| | |
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.HongBaoV2Mapper;
|
| | | import com.yeshi.fanli.dao.mybatis.order.CommonOrderGoodsMapper;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.service.manger.user.UserLevelManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import org.yeshi.utils.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import org.yeshi.utils.TimeUtil;
|
| | | import com.yeshi.fanli.util.user.UserLevelUtil;
|
| | |
|
| | | @Component
|
| | |
| | | throw new HongBaoException(201, "用户等级为空");
|
| | |
|
| | | // 已经失效,已经领取,新老状态一致的红包不做处理
|
| | | if (oldHongBao.getState() == HongBaoV2.STATE_SHIXIAO || oldHongBao.getState() == HongBaoV2.STATE_YILINGQU)
|
| | | if (oldHongBao.getState() == HongBaoV2.STATE_SHIXIAO || oldHongBao.getState() == HongBaoV2.STATE_YILINGQU|| oldHongBao.getState() == HongBaoV2.STATE_LINGQUING)
|
| | | return false;
|
| | |
|
| | | if (type == HongBaoV2.TYPE_ZIGOU) {// 获取自购的返利比例
|
| | |
| | | HongBaoV2 hongBao = createFanLiUpdateHongBao(commonOrder, money, hongBaoOrder.getHongBaoV2().getId(),
|
| | | mianDan);
|
| | |
|
| | | // 新老红包状态一致不处理
|
| | | if (oldHongBao.getState().intValue() == hongBao.getState())
|
| | | // 新老红包状态一致且佣金金额不变则不处理
|
| | | if (oldHongBao.getState().intValue() == hongBao.getState()&&oldHongBao.getMoney().compareTo(hongBao.getMoney())==0)
|
| | | return false;
|
| | |
|
| | | if (hongBao.getState() == HongBaoV2.STATE_SHIXIAO) {
|
| | |
| | | List<UserTeamLevel> bossList = getBossList(children);
|
| | |
|
| | | for (HongBaoV2 child : children) {
|
| | | if (child.getState() == HongBaoV2.STATE_YILINGQU)
|
| | | if (child.getState() == HongBaoV2.STATE_YILINGQU||child.getState() == HongBaoV2.STATE_LINGQUING)
|
| | | continue;
|
| | |
|
| | | if (child.getType() == HongBaoV2.TYPE_YIJI) {
|
| | |
| | | if (children != null && children.size() > 0) {
|
| | | List<UserTeamLevel> bossList = getBossList(children);
|
| | | for (HongBaoV2 child : children) {
|
| | | if (child.getState() == HongBaoV2.STATE_YILINGQU)
|
| | | if (child.getState() == HongBaoV2.STATE_YILINGQU||child.getState() == HongBaoV2.STATE_LINGQUING)
|
| | | continue;
|
| | |
|
| | | if (child.getType() == HongBaoV2.TYPE_SHARE_YIJI) {
|