## 每日点位总数处理;添加三阶段奖金发放记录字段;

This commit is contained in:
cabbage 2025-09-24 19:05:58 +08:00
parent 86b7208d3d
commit 7a63b310ba
6 changed files with 134 additions and 101 deletions

View File

@ -1011,6 +1011,7 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
memberRangeExtMap, saOrderExt, settleDate, rangeTableName, rangeDetailTableName, EBonusStage.ONE,
sourceMember, newRetailDetail, returnRetailDetailList);
}
sourceMember.setPointCount(sourceMember.getPointCount() + newPointInt);
return returnRetailDetailList;
}

View File

@ -20,6 +20,22 @@ public class BonusConstants {
* 二阶段奖金 -- 满14发220
*/
public static final BigDecimal TWO_BONUS = new BigDecimal("220");
/**
* 三阶段一层奖金 -- 第一层满2发160
*/
public static final BigDecimal THREE_BONUS_1 = new BigDecimal("160");
/**
* 三阶段二层奖金 -- 第二层满4发320
*/
public static final BigDecimal THREE_BONUS_2 = new BigDecimal("320");
/**
* 三阶段三层前7点奖金 -- 发130
*/
public static final BigDecimal THREE_BONUS_3 = new BigDecimal("130");
/**
* 三阶段三层前最后一点奖金 -- 发155
*/
public static final BigDecimal THREE_BONUS_38 = new BigDecimal("155");
public static final String POINT_11 = "11";
public static final String POINT_12 = "12";

View File

@ -11,7 +11,6 @@
#{items}
</foreach>
and cmrd.stage = #{stage}
and cmrd.stage_status = 1
order by cmrd.pk_member, cmrd.child_node
</select>

View File

@ -175,7 +175,10 @@
x.point_second,
x.point_member_second,
x.point_third,
x.point_member_third
x.point_member_third,
x.third_bonus_1,
x.third_bonus_2,
x.third_bonus_3
from ${yesterdayDetailTableName} x
left join cu_member cm
on cm.pk_id = x.pk_member
@ -224,7 +227,10 @@
point_second,
point_member_second,
point_third,
point_member_third)
point_member_third,
third_bonus_1,
third_bonus_2,
third_bonus_3)
values (b.pk_member,
b.child_node,
b.pk_parent,
@ -267,7 +273,10 @@
b.point_second,
b.point_member_second,
b.point_third,
b.point_member_third)
b.point_member_third,
b.third_bonus_1,
b.third_bonus_2,
b.third_bonus_3)
when matched then
update set
a.pk_parent = b.pk_parent,
@ -310,7 +319,10 @@
a.point_second = b.point_second,
a.point_member_second = b.point_member_second,
a.point_third = b.point_third,
a.point_member_third = b.point_member_third
a.point_member_third = b.point_member_third,
a.third_bonus_1 = b.third_bonus_1,
a.third_bonus_2 = b.third_bonus_2,
a.third_bonus_3 = b.third_bonus_3
</update>
<!-- 更新会员日结数据 -->

View File

@ -334,7 +334,10 @@
point_member_second NUMBER(20),
point_second NUMBER(8),
point_member_third NUMBER(20),
point_third NUMBER(8)
point_third NUMBER(8),
third_bonus_1 NUMBER(8),
third_bonus_2 NUMBER(8),
third_bonus_3 NUMBER(8)
)
</update>

View File

@ -57,173 +57,160 @@ public class CuMemberRetailDetail {
@TableField("STAGE_DATE")
private Date stageDate;
/**
* 点位1-1会员ID
*/
@TableField("POINT_MEMBER_11")
private Long pointMember11;
/**
* 点位1-1会员子节点
*/
@TableField("POINT_11")
private Integer point11;
/**
* 点位1-2会员ID
*/
@TableField("POINT_MEMBER_12")
private Long pointMember12;
/**
* 点位1-2会员子节点
*/
@TableField("POINT_12")
private Integer point12;
/**
* 点位2-1会员ID
*/
@TableField("POINT_MEMBER_21")
private Long pointMember21;
/**
* 点位2-1会员子节点
*/
@TableField("POINT_21")
private Integer point21;
/**
* 点位2-2会员ID
*/
@TableField("POINT_MEMBER_22")
private Long pointMember22;
/**
* 点位2-2会员子节点
*/
@TableField("POINT_22")
private Integer point22;
/**
* 点位2-3会员ID
*/
@TableField("POINT_MEMBER_23")
private Long pointMember23;
/**
* 点位2-3会员子节点
*/
@TableField("POINT_23")
private Integer point23;
/**
* 点位2-4会员ID
*/
@TableField("POINT_MEMBER_24")
private Long pointMember24;
/**
* 点位2-4会员子节点
*/
@TableField("POINT_24")
private Integer point24;
/**
* 点位3-1会员ID
*/
@TableField("POINT_MEMBER_31")
private Long pointMember31;
/**
* 点位3-1会员子节点
*/
@TableField("POINT_31")
private Integer point31;
/**
* 点位3-2会员ID
*/
@TableField("POINT_MEMBER_32")
private Long pointMember32;
/**
* 点位3-2会员子节点
*/
@TableField("POINT_32")
private Integer point32;
/**
* 点位3-3会员ID
*/
@TableField("POINT_MEMBER_33")
private Long pointMember33;
/**
* 点位3-3会员子节点
*/
@TableField("POINT_33")
private Integer point33;
/**
* 点位3-4会员ID
*/
@TableField("POINT_MEMBER_34")
private Long pointMember34;
/**
* 点位3-4会员子节点
*/
@TableField("POINT_34")
private Integer point34;
/**
* 点位3-5会员ID
*/
@TableField("POINT_MEMBER_35")
private Long pointMember35;
/**
* 点位3-5会员子节点
*/
@TableField("POINT_35")
private Integer point35;
/**
* 点位3-6会员ID
*/
@TableField("POINT_MEMBER_36")
private Long pointMember36;
/**
* 点位3-6会员子节点
*/
@TableField("POINT_36")
private Integer point36;
/**
* 点位3-7会员ID
*/
@TableField("POINT_MEMBER_37")
private Long pointMember37;
/**
* 点位3-7会员子节点
*/
@TableField("POINT_37")
private Integer point37;
/**
* 点位3-8会员子节点
*/
@TableField("POINT_38")
private Integer point38;
/**
* 点位1-1会员ID
*/
@TableField("POINT_MEMBER_11")
private Long pointMember11;
/**
* 点位1-2会员ID
*/
@TableField("POINT_MEMBER_12")
private Long pointMember12;
/**
* 点位2-1会员ID
*/
@TableField("POINT_MEMBER_21")
private Long pointMember21;
/**
* 点位2-2会员ID
*/
@TableField("POINT_MEMBER_22")
private Long pointMember22;
/**
* 点位2-3会员ID
*/
@TableField("POINT_MEMBER_23")
private Long pointMember23;
/**
* 点位2-4会员ID
*/
@TableField("POINT_MEMBER_24")
private Long pointMember24;
/**
* 点位3-1会员ID
*/
@TableField("POINT_MEMBER_31")
private Long pointMember31;
/**
* 点位3-2会员ID
*/
@TableField("POINT_MEMBER_32")
private Long pointMember32;
/**
* 点位3-3会员ID
*/
@TableField("POINT_MEMBER_33")
private Long pointMember33;
/**
* 点位3-4会员ID
*/
@TableField("POINT_MEMBER_34")
private Long pointMember34;
/**
* 点位3-5会员ID
*/
@TableField("POINT_MEMBER_35")
private Long pointMember35;
/**
* 点位3-6会员ID
*/
@TableField("POINT_MEMBER_36")
private Long pointMember36;
/**
* 点位3-7会员ID
*/
@TableField("POINT_MEMBER_37")
private Long pointMember37;
/**
* 点位3-8会员ID
*/
@TableField("POINT_MEMBER_38")
private Long pointMember38;
/**
* 点位3-8会员子节点
*/
@TableField("POINT_38")
private Integer point38;
/**
* 点位类型0=普通1=赠送点位
@ -244,6 +231,11 @@ public class CuMemberRetailDetail {
@TableField("CREATION_TIME")
private Date creationTime;
/**
* 第一层会员ID
*/
@TableField("POINT_MEMBER_FIRST")
private Long pointMemberFirst;
/**
* 第一层会员子节点
*/
@ -251,11 +243,10 @@ public class CuMemberRetailDetail {
private Integer pointFirst;
/**
* 层会员ID
* 层会员ID
*/
@TableField("POINT_MEMBER_FIRST")
private Long pointMemberFirst;
@TableField("POINT_MEMBER_SECOND")
private Long pointMemberSecond;
/**
* 第二层会员子节点
*/
@ -263,11 +254,10 @@ public class CuMemberRetailDetail {
private Integer pointSecond;
/**
* 层会员ID
* 层会员ID
*/
@TableField("POINT_MEMBER_SECOND")
private Long pointMemberSecond;
@TableField("POINT_MEMBER_THIRD")
private Long pointMemberThird;
/**
* 第三层会员子节点
*/
@ -275,10 +265,22 @@ public class CuMemberRetailDetail {
private Integer pointThird;
/**
* 第三层会员ID
* 三阶段1层奖金次数
*/
@TableField("POINT_MEMBER_THIRD")
private Long pointMemberThird;
@TableField("THIRD_BONUS_1")
private Integer thirdBonus1;
/**
* 三阶段2层奖金次数
*/
@TableField("THIRD_BONUS_2")
private Integer thirdBonus2;
/**
* 三阶段3层奖金次数
*/
@TableField("THIRD_BONUS_3")
private Integer thirdBonus3;
/**
* 更新标记不为null则需要入库