Compare commits

...

2 Commits

5 changed files with 56 additions and 48 deletions

View File

@ -97,7 +97,7 @@ public class BonusSettleFirstPurchaseHandle extends BonusSettleHandle {
// 死点 停算收益 顾客 没有奖金
if (ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
return null;
}
@ -349,7 +349,7 @@ public class BonusSettleFirstPurchaseHandle extends BonusSettleHandle {
if (null == targetMemberSettleExt
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}
@ -378,7 +378,7 @@ public class BonusSettleFirstPurchaseHandle extends BonusSettleHandle {
if (targetMemberSettleExt == null
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}
@ -438,7 +438,7 @@ public class BonusSettleFirstPurchaseHandle extends BonusSettleHandle {
if (null == targetMemberSettleExt
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}
@ -603,7 +603,7 @@ public class BonusSettleFirstPurchaseHandle extends BonusSettleHandle {
pkMember = targetMemberSettleExt.getPkParent();
if (ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员状态不正常 或者 停算收益 顾客等级 直接跳过
continue;
}
@ -811,7 +811,7 @@ public class BonusSettleFirstPurchaseHandle extends BonusSettleHandle {
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| ERegistrationAuthority.SERVICE.getValue() != targetMemberSettleExt.getRegisterAuthority()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 非正常会员停算收益不是服务中心都不进行处理
return null;
}

View File

@ -121,7 +121,7 @@ public class BonusSettleNewExpandHandle extends BonusSettleHandle {
if (null == targetMemberSettleExt
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}
@ -151,7 +151,7 @@ public class BonusSettleNewExpandHandle extends BonusSettleHandle {
if (targetMemberSettleExt == null
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}
@ -189,7 +189,7 @@ public class BonusSettleNewExpandHandle extends BonusSettleHandle {
if (targetMemberSettleExt == null
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}

View File

@ -60,7 +60,7 @@ public class BonusSettlePurchaseHandle extends BonusSettleHandle {
// 死点 停算 顾客 没有奖金
if (ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
pkParent = targetMemberSettleExt.getPkParent();
continue;
@ -235,7 +235,7 @@ public class BonusSettlePurchaseHandle extends BonusSettleHandle {
if (null == targetMemberSettleExt
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}
@ -265,7 +265,7 @@ public class BonusSettlePurchaseHandle extends BonusSettleHandle {
if (null == targetMemberSettleExt
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}
@ -301,7 +301,7 @@ public class BonusSettlePurchaseHandle extends BonusSettleHandle {
if (null == targetMemberSettleExt
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}
@ -928,7 +928,7 @@ public class BonusSettlePurchaseHandle extends BonusSettleHandle {
BigDecimal beforeBonusCal) {
if (ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 死点 停算 顾客 没有奖金跳过
return null;
} else {

View File

@ -206,7 +206,7 @@ public class BonusSettleServiceImpl implements IBonusSettleService {
if (null == targetMemberSettleExt
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算条件跳过
continue;
}
@ -315,7 +315,7 @@ public class BonusSettleServiceImpl implements IBonusSettleService {
if (null == targetMemberSettleExt
|| ECategory.NORMAL.getValue() != targetMemberSettleExt.getCategory()
|| EAccountStatus.STOP_INCOME.getValue() == targetMemberSettleExt.getAccountStatus()
|| !SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
|| SysConstants.NOT_BONUS_GRADE.contains(targetMemberSettleExt.getGradeValue())) {
// 会员不满足计算奖金条件跳过
continue;
}

View File

@ -9,38 +9,42 @@
from (select count(1) member_total
from cu_member cm
where cm.del_flag = 0
and cm.pay_status = 1
and cm.category = 0
and (cm.pay_status = 1 or
(cm.pay_status = 0 and cm.pk_settle_grade = 1))
and cm.customer_type != 1) a
left join (
select count(1) member_today
left join (select count(1) member_today
from cu_member cm
where cm.del_flag = 0
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate, 'yyyy-mm-dd')
and cm.customer_type != 1
) b on 1 = 1
and ((to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate, 'yyyy-mm-dd') and cm.pay_status = 1) or
(to_char(cm.creation_time, 'yyyy-mm-dd') =
to_char(sysdate, 'yyyy-mm-dd') and cm.pay_status = 0))
and cm.customer_type != 1) b
on 1 = 1
left join (select count(1) member_yesterday
from cu_member cm
where cm.del_flag = 0
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate - 1, 'yyyy-mm-dd')
and cm.customer_type != 1
) c
and ((to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate - 1, 'yyyy-mm-dd') and
cm.pay_status = 1) or
(to_char(cm.creation_time, 'yyyy-mm-dd') =
to_char(sysdate - 1, 'yyyy-mm-dd') and
cm.pay_status = 0))
and cm.customer_type != 1) c
on 1 = 1
left join (select count(1) member_month
from cu_member cm
where cm.del_flag = 0
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm') =
to_char(sysdate, 'yyyy-mm')
and cm.customer_type != 1
) d on 1 = 1
and ((to_char(cm.pay_time, 'yyyy-mm') =
to_char(sysdate, 'yyyy-mm') and cm.pay_status = 1) or
(to_char(cm.creation_time, 'yyyy-mm') =
to_char(sysdate, 'yyyy-mm') and cm.pay_status = 0))
and cm.customer_type != 1) d
on 1 = 1
</select>
<!-- 会员各等级数据 -->
@ -52,10 +56,11 @@
from (select cm.PK_REGISTER_GRADE, count(1) member_total
from cu_member cm
where cm.del_flag = 0
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate, 'yyyy-mm-dd')
and ((to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate, 'yyyy-mm-dd') and cm.pay_status = 1) or
(to_char(cm.creation_time, 'yyyy-mm-dd') =
to_char(sysdate, 'yyyy-mm-dd') and cm.pay_status = 0))
and cm.customer_type != 1
group by cm.PK_REGISTER_GRADE
order by cm.PK_REGISTER_GRADE) a
@ -70,10 +75,11 @@
from (select cm.PK_REGISTER_GRADE, count(1) member_total
from cu_member cm
where cm.del_flag = 0
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate - 1, 'yyyy-mm-dd')
and ((to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate - 1, 'yyyy-mm-dd') and cm.pay_status = 1) or
(to_char(cm.creation_time, 'yyyy-mm-dd') =
to_char(sysdate - 1, 'yyyy-mm-dd') and cm.pay_status = 0))
and cm.customer_type != 1
group by cm.PK_REGISTER_GRADE
order by cm.PK_REGISTER_GRADE) a
@ -88,9 +94,11 @@
from (select cm.PK_REGISTER_GRADE, count(1) member_total
from cu_member cm
where cm.del_flag = 0
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm') = to_char(sysdate, 'yyyy-mm')
and ((to_char(cm.pay_time, 'yyyy-mm') =
to_char(sysdate, 'yyyy-mm') and cm.pay_status = 1) or
(to_char(cm.creation_time, 'yyyy-mm') =
to_char(sysdate, 'yyyy-mm') and cm.pay_status = 0))
and cm.customer_type != 1
group by cm.PK_REGISTER_GRADE
order by cm.PK_REGISTER_GRADE) a