Compare commits
No commits in common. "0e865005eb843280a3a10e6d6672d4e63fed1e51" and "2a68f7eeab6ac1653cb8f9d5f1106459293ec187" have entirely different histories.
0e865005eb
...
2a68f7eeab
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,42 +9,38 @@
|
|||
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
|
||||
from cu_member cm
|
||||
where cm.del_flag = 0
|
||||
and cm.category = 0
|
||||
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_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
|
||||
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.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
|
||||
and to_char(cm.pay_time, 'yyyy-mm-dd') =
|
||||
to_char(sysdate - 1, 'yyyy-mm-dd')
|
||||
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.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
|
||||
and to_char(cm.pay_time, 'yyyy-mm') =
|
||||
to_char(sysdate, 'yyyy-mm')
|
||||
and cm.customer_type != 1
|
||||
) d on 1 = 1
|
||||
</select>
|
||||
|
||||
<!-- 会员各等级数据 -->
|
||||
|
|
@ -52,15 +48,14 @@
|
|||
select bg.grade_name,
|
||||
bg.grade_value,
|
||||
nvl(a.member_total, 0) member_total,
|
||||
0 sort
|
||||
0 sort
|
||||
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 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 to_char(cm.pay_time, 'yyyy-mm-dd') =
|
||||
to_char(sysdate, 'yyyy-mm-dd')
|
||||
and cm.customer_type != 1
|
||||
group by cm.PK_REGISTER_GRADE
|
||||
order by cm.PK_REGISTER_GRADE) a
|
||||
|
|
@ -71,15 +66,14 @@
|
|||
select bg.grade_name,
|
||||
bg.grade_value,
|
||||
nvl(a.member_total, 0) member_total,
|
||||
1 sort
|
||||
1 sort
|
||||
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 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 to_char(cm.pay_time, 'yyyy-mm-dd') =
|
||||
to_char(sysdate - 1, 'yyyy-mm-dd')
|
||||
and cm.customer_type != 1
|
||||
group by cm.PK_REGISTER_GRADE
|
||||
order by cm.PK_REGISTER_GRADE) a
|
||||
|
|
@ -90,15 +84,13 @@
|
|||
select bg.grade_name,
|
||||
bg.grade_value,
|
||||
nvl(a.member_total, 0) member_total,
|
||||
2 sort
|
||||
2 sort
|
||||
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 cm.pay_status = 1) or
|
||||
(to_char(cm.creation_time, 'yyyy-mm') =
|
||||
to_char(sysdate, 'yyyy-mm') and cm.pay_status = 0))
|
||||
and to_char(cm.pay_time, 'yyyy-mm') = to_char(sysdate, 'yyyy-mm')
|
||||
and cm.customer_type != 1
|
||||
group by cm.PK_REGISTER_GRADE
|
||||
order by cm.PK_REGISTER_GRADE) a
|
||||
|
|
|
|||
Loading…
Reference in New Issue