Merge remote-tracking branch 'origin/div' into div
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public void teamReceive(Long uid, BigDecimal money, BigDecimal subsidy, BigDecimal balance, Date receivedDate) {
|
| | | BigDecimal totalMoney = new BigDecimal(0);
|
| | | if (money != null) {
|
| | | totalMoney = totalMoney.add(money);
|
| | | } |
| | | if (subsidy != null) {
|
| | | totalMoney = totalMoney.add(subsidy); |
| | | }
|
| | | |
| | | if (totalMoney.compareTo(new BigDecimal(0)) <= 0) {
|
| | | return;
|
| | | }
|
| | | |
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, totalMoney, balance, receivedDate, "团队收益");
|
| | | public void teamReceive(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, money, balance, receivedDate, "团队收益");
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.entity.config.push.PushMsgFactory;
|
| | | import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.order.msg.MsgOrderDetailService;
|
| | | import com.yeshi.fanli.service.inter.order.msg.UserOrderMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.push.PushService;
|
| | |
| | |
|
| | | @Override
|
| | | public void orderInviteStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState, Date downTime) {
|
| | | // 是否通知
|
| | | boolean needNotify = (payMoney != null && payMoney.compareTo(new BigDecimal(0)) > 0) ? true : false;
|
| | | BigDecimal subsidy, int goodsCount, int orderState, Date downTime) {
|
| | | BigDecimal totalMoney = new BigDecimal(0);
|
| | | if (money != null) {
|
| | | totalMoney = totalMoney.add(money);
|
| | | } |
| | | if (subsidy != null) {
|
| | | totalMoney = totalMoney.add(subsidy); |
| | | }
|
| | | |
| | | if (totalMoney.compareTo(new BigDecimal(0)) <= 0) {
|
| | | return;
|
| | | }
|
| | | |
| | | // 保存消息明细消息
|
| | | addOrderStatistics(uid, orderId, orderType, Constant.TYPE_INVITE, goodsCount, payMoney, money, downTime, null, needNotify);
|
| | | addOrderStatistics(uid, orderId, orderType, Constant.TYPE_INVITE, goodsCount, payMoney, totalMoney, downTime, null, true);
|
| | |
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createInviteOrderStatisticed(orderType, orderId, money);
|
| | |
| | | * 团队收益消息
|
| | | * @param uid
|
| | | * @param money 本次到账金额
|
| | | * @param subsidy 补贴金额
|
| | | * @param balance 余额
|
| | | * @param receivedDate 结算月度
|
| | | */
|
| | | public void teamReceive(Long uid, BigDecimal money,BigDecimal subsidy, BigDecimal balance, Date receivedDate);
|
| | | public void teamReceive(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate);
|
| | |
|
| | | /**
|
| | | * 使用奖励券
|
| | |
| | | * @param orderId
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param subsidy 补贴
|
| | | * @param goodsCount
|
| | | * @param orderState
|
| | | */
|
| | | public void orderInviteStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState, Date downTime);
|
| | | BigDecimal subsidy, int goodsCount, int orderState, Date downTime);
|
| | |
|
| | |
|
| | |
|