冻结积分抵现分批处理方案
2025-02-19 14:17:48 0 举报
冻结积分抵现分批处理方案流程图
作者其他创作
大纲/内容
发送冻结积分请求
...............
最终得出需要去消耗的冻结积分事务列表
产品消耗冻结积分接口
重点+难点:将积分分批冻结,这里需要一个精细的动态算法,根据积分规则将分批的积分再抵现请求都能组合成对应的积分值
冻结积分抵现和取消冻结积分抵现都能实现分批操作
产品分页获取会员积分记录/open/point/member/pageRecord
\"transactionId\": \"45-xx-111111\
memberId
transactionId-7-100
[{\"traceId\": \"transactionId\"}]
transactionId-1-100
积分明细查询(冻结积分列表处理)
select * from table where transactionId = 'transactionId' and status = '0'
冻结积分抵现请求
[ { \"traceId\": \"transactionId-1-100\
fast
transactionId-5-100
select * from table where transactionId = 'transactionId' and status = '1'
通过事务ID transactionId获取已抵现分批事务ID列表
transactionId-4-100
取消冻结积分抵现请求
分解冻结积分
update table set status = \"1\" where transactionId = 'transactionId' and transactionId-xx = \"transactionId -xx\"
请求事务ID和分批后的事务ID关联表
通过分批后的积分事务ID,查询出对应的原积分事务ID,封装产品接口返回结果后重新返回给客户
根据查出来的分批事务列表的冻结积分递加算出为1000的分批事务ID,重点还是在于上述冻结积分的算法
transactionId-3-100
以取消积分(500)为总数计算需要执行取消冻结积分的事务ID
select transactionId from table where transactionId-xx = 'transactionId-xx'
\"transactionId\": \"transactionId\
transactionId-2-100
\"transactionId\": \"44-xx-111111\
select transactionId from table where originalTransactionId= '44-xx-111111'
产品冻结积分接口point:frozen
只抵现1000的冻结积分
bindingPointCreditFreezeTraceId绑定流水号ID和积分冻结事务ID取消冻结积分抵现时使用
产品积分变更撤销/point:revert
获取冻结积分事务ID :transactionId
收藏
收藏
0 条评论
下一页