| | |
| | | values.put("type",UserClubMember.TYPE_REGENERATION); |
| | | values.put("userId",inviteeUser.getId()); |
| | | values.put("newDate",new Date()); |
| | | sqlSentence.sqlSentence("SELECT * FROM user_club_member WHERE isDel = 0 AND type = #{m.type} AND userId = #{m.userId}" + |
| | | values.put("status",UserClubMember.STATUS_NORMAL); |
| | | sqlSentence.sqlSentence("SELECT * FROM user_club_member WHERE isDel = 0 AND status = #{m.status} AND type = #{m.type} AND userId = #{m.userId}" + |
| | | " AND (durationType = 0 OR (durationType = 1 AND startTime >= #{m.newDate} AND #{m.newDate} <= endTime)) ORDER BY durationType ASC,endTime DESC LIMIT 1",values); |
| | | UserClubMember userClubMember = commonService.selectOneByKey(UserClubMemberMapper.class,sqlSentence); |
| | | |
| | |
| | | //被邀请人获得比例% |
| | | Integer beInviterPercent = null; |
| | | if(userClubMember != null){ |
| | | //有俱乐部会员优先处理 |
| | | //---有俱乐部会员优先处理 |
| | | if(ordersTotal.getOrderInfo().getIsOldBringNew() !=null && ordersTotal.getOrderInfo().getIsOldBringNew().equals(BaseEntity.YES)){ |
| | | //----初复诊订单 |
| | | inviterPercent = 10; |
| | |
| | | |
| | | //统计订单现金总金额 |
| | | BigDecimal moneyPay=orderInfo.getSnapPayTotal(); |
| | | orderNodeBuilder.append("-老带新现金金额:¥").append(moneyPay); |
| | | orderNodeBuilder.append("-老带新订单现金金额:¥").append(moneyPay); |
| | | |
| | | BigDecimal beInviterMoney = BigDecimal.ZERO; |
| | | BigDecimal inviterMoney = BigDecimal.ZERO; |