|
@@ -59,7 +59,6 @@ public class InviteReceiptsService {
|
|
|
InviteReceiptsRoleFeignService inviteReceiptsRoleFeignService;
|
|
|
|
|
|
|
|
|
- //todo bug:取消逻辑里,上月成功返利后取消,取消消息再第二个月通知我
|
|
|
public void receipts(VipUserRecord vipUserRecord){
|
|
|
//查询邀请关系
|
|
|
InviteRecord inviteRecord = inviteRecordDao.findTopByUserIdOrderByCreateTime(vipUserRecord.getCpId());
|
|
@@ -81,7 +80,6 @@ public class InviteReceiptsService {
|
|
|
sucToReceipts(ruler, vipUserRecord, inviteRecord.getInviteUserId());
|
|
|
vipUserRecord.setFirst(true);
|
|
|
}else if (isSucLastMonth(vipUserRecord.getCpId())){
|
|
|
- //TODO 覆盖本月已有返利订单(手动取消)
|
|
|
sucToReceipts(ruler, vipUserRecord, inviteRecord.getInviteUserId());
|
|
|
vipUserRecord.setFirst(false);
|
|
|
}
|
|
@@ -91,7 +89,6 @@ public class InviteReceiptsService {
|
|
|
if (isFirstCancel(vipUserRecord.getCpId())){
|
|
|
firstCancel(vipUserRecord, ruler);
|
|
|
}else {
|
|
|
- //todo 下两行不对
|
|
|
VipUserRecord currentRecord = vipUserRecordDao.findTop1ByCpIdOrderByOperateTime(vipUserRecord.getCpId());
|
|
|
WalletReceipts currentWalletReceipts = walletReceiptsDao.findTop1ByVipUserRecord_Id(currentRecord.getId());
|
|
|
if (ObjectUtils.isNotEmpty(currentWalletReceipts) && Math.abs(vipUserRecord.getOperateTime() - currentRecord.getOperateTime()) < 24L *60*60*1000*currentWalletReceipts.getRuler().getFirstPurchaseDay()){
|
|
@@ -239,11 +236,6 @@ public class InviteReceiptsService {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- List<WalletReceipts> byEstimatedTime = walletReceiptsDao.findByEstimatedTime(new Date().getTime());
|
|
|
- if (null != byEstimatedTime && !byEstimatedTime.isEmpty()){
|
|
|
- list.addAll(byEstimatedTime);
|
|
|
- }
|
|
|
-
|
|
|
//首次订购
|
|
|
list.forEach(this::addAmount);
|
|
|
|