## 日拨比统计方法补全;
This commit is contained in:
parent
3b61b2af85
commit
bb188366ba
|
@ -4,28 +4,16 @@ import com.hzs.common.core.domain.R;
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比统计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/1 17:24
|
||||
* @param:
|
||||
* @return:
|
||||
**/
|
||||
public interface ICuBonusStatisServiceApi {
|
||||
|
||||
/**
|
||||
* @description: 统计历史奖金拨比
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/19 9:29
|
||||
* @param: [startDate, endDate]
|
||||
* @return: com.hzs.common.core.domain.R
|
||||
**/
|
||||
R<Boolean> statsHistoryBonus(String startDate, String endDate);
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/12/11 10:56
|
||||
* @param: [startDate, endDate]
|
||||
* @return: com.hzs.common.core.domain.R
|
||||
**/
|
||||
R<Boolean> delStats(String startDate, String endDate);
|
||||
|
||||
|
|
|
@ -3,32 +3,18 @@ package com.hzs.member.statis;
|
|||
import com.hzs.common.core.domain.R;
|
||||
|
||||
/**
|
||||
* @description: 顶点奖金拨比统计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/1 17:24
|
||||
* @param:
|
||||
* @return:
|
||||
* 顶点奖金拨比统计
|
||||
**/
|
||||
public interface ICuBonusVertexStatisServiceApi {
|
||||
|
||||
/**
|
||||
* @description: 7天重算顶点奖金拨比统计
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 10:30
|
||||
* @param: [startDate, endDate]
|
||||
* @return: com.hzs.common.core.domain.R
|
||||
**/
|
||||
R<Boolean> anewStatsHistoryBonus(String startDate, String endDate);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/12/11 10:56
|
||||
* @param: [startDate, endDate]
|
||||
* @return: com.hzs.common.core.domain.R
|
||||
**/
|
||||
R<?> delStats(String startDate, String endDate);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ public class CuMemberSettlePeriodServiceImpl extends ServiceImpl<CuMemberSettleP
|
|||
@DubboReference
|
||||
ISystemConfigServiceApi iSystemConfigServiceApi;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CuMemberSettlePeriod getCuMemberSettlePeriodByDate(String date) {
|
||||
|
@ -149,9 +148,6 @@ public class CuMemberSettlePeriodServiceImpl extends ServiceImpl<CuMemberSettleP
|
|||
|
||||
/*
|
||||
* @description: 获取期间,开始时间到结束时间
|
||||
* @author: sui q
|
||||
* @date: 2023/7/29 9:43
|
||||
* @param: null null
|
||||
**/
|
||||
private Map<String, CuMemberSettlePeriod> queryCuMemberSettlePeriod(Date startDate, Date endDate) {
|
||||
LambdaQueryWrapper<CuMemberSettlePeriod> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
|
|
@ -2,27 +2,13 @@ package com.hzs.member.attest.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.member.attest.CuEnergySiloDetail;
|
||||
import com.hzs.common.domain.member.ext.CuEnergySiloDetailExt;
|
||||
import com.hzs.member.attest.param.EnergySiloParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 抗衡能量仓明细表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-12
|
||||
*/
|
||||
public interface CuEnergySiloDetailMapper extends BaseMapper<CuEnergySiloDetail> {
|
||||
|
||||
/**
|
||||
* 根据参数查询能量仓数据
|
||||
* @param energySiloParam 参数
|
||||
* @return: List<BsEnergySilo>
|
||||
* @Author: sui q
|
||||
* @Date: 2023/2/12 10:13
|
||||
*/
|
||||
List<CuEnergySiloDetailExt> queryEnergySiloDetailByCondition(EnergySiloParam energySiloParam);
|
||||
}
|
||||
|
|
|
@ -2,10 +2,6 @@ package com.hzs.member.attest.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.attest.CuEnergySiloDetail;
|
||||
import com.hzs.common.domain.member.ext.CuEnergySiloDetailExt;
|
||||
import com.hzs.member.attest.param.EnergySiloParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 抗衡能量仓明细表 服务类
|
||||
|
@ -15,14 +11,4 @@ import java.util.List;
|
|||
*/
|
||||
public interface ICuEnergySiloDetailService extends IService<CuEnergySiloDetail> {
|
||||
|
||||
/**
|
||||
* 根据参数查询能量仓数据
|
||||
*
|
||||
* @param energySiloParam 参数
|
||||
* @return: List<BsEnergySilo>
|
||||
* @Author: sui q
|
||||
* @Date: 2023/2/12 10:13
|
||||
*/
|
||||
List<CuEnergySiloDetailExt> queryEnergySiloDetailByCondition(EnergySiloParam energySiloParam);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
package com.hzs.member.attest.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.domain.member.attest.CuEnergySiloDetail;
|
||||
import com.hzs.common.domain.member.ext.CuEnergySiloDetailExt;
|
||||
import com.hzs.member.attest.mapper.CuEnergySiloDetailMapper;
|
||||
import com.hzs.member.attest.param.EnergySiloParam;
|
||||
import com.hzs.member.attest.service.ICuEnergySiloDetailService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 抗衡能量仓明细表 服务实现类
|
||||
*
|
||||
|
@ -21,12 +15,4 @@ import java.util.List;
|
|||
@Service
|
||||
public class CuEnergySiloDetailServiceImpl extends ServiceImpl<CuEnergySiloDetailMapper, CuEnergySiloDetail> implements ICuEnergySiloDetailService {
|
||||
|
||||
@Override
|
||||
public List<CuEnergySiloDetailExt> queryEnergySiloDetailByCondition(EnergySiloParam energySiloParam) {
|
||||
if (energySiloParam.getStartEndDate() != null) {
|
||||
energySiloParam.setStartEndDate(DateUtils.afterDate(1, ChronoUnit.DAYS, energySiloParam.getStartEndDate()));
|
||||
}
|
||||
return baseMapper.queryEnergySiloDetailByCondition(energySiloParam);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -273,14 +273,6 @@ public interface CuMemberMapper extends BaseMapper<CuMember> {
|
|||
*/
|
||||
int insertBatchCuMember(@Param("memberList") List<CuMember> memberList);
|
||||
|
||||
/**
|
||||
* 查询会员关系列表
|
||||
*
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
List<CuMemberVO> selectByTreeMemberList(Long memberId);
|
||||
|
||||
/**
|
||||
* @description:特殊业务-修改结算国
|
||||
**/
|
||||
|
|
|
@ -391,14 +391,6 @@ public interface ICuMemberService extends IService<CuMember> {
|
|||
**/
|
||||
List<UserInvestmentVo> selectBiddingList(MarketNewsParam marketNewsParam);
|
||||
|
||||
/**
|
||||
* 查询会员关系列表
|
||||
*
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
List<CuMemberVO> selectByTreeMemberList(Long memberId);
|
||||
|
||||
/**
|
||||
* @description:
|
||||
**/
|
||||
|
|
|
@ -1969,17 +1969,6 @@ public class CuMemberServiceImpl extends ServiceImpl<CuMemberMapper, CuMember> i
|
|||
return baseMapper.selectBiddingList(marketNewsParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员关系列表
|
||||
*
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CuMemberVO> selectByTreeMemberList(Long memberId) {
|
||||
return baseMapper.selectByTreeMemberList(memberId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台设置推荐上下级
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.member.statis.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.member.statis.CuBonusStatis;
|
||||
import com.hzs.member.statis.vo.*;
|
||||
|
@ -9,9 +8,7 @@ import org.apache.ibatis.annotations.Param;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 奖金拨比统计 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-05-31
|
||||
|
@ -20,186 +17,76 @@ public interface CuBonusStatisMapper extends BaseMapper<CuBonusStatis> {
|
|||
|
||||
/**
|
||||
* @description: 查询当天团队统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/1 11:31
|
||||
* @param: [cuBonusStatis]
|
||||
* @return: com.hzs.common.domain.member.statis.CuBonusStatis
|
||||
**/
|
||||
List<CuBonusStatis> getCuBonusStatis(CuBonusStatis cuBonusStatis);
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/3 11:21
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryCuBonusStatis(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询国外奖金拨比
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 16:43
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryForeignCountryCuBonusStatis(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询国外奖金拨比合计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/7 16:01
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
CuBonusStatisVO queryForeignCountryCuBonusStatisSum(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询体系合计的订单业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2024/7/2 9:48
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
CuBonusStatisVO queryOrderAchieveSum(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询能量舱订单金额
|
||||
* @author: zhang jing
|
||||
* @date: 2024/7/1 10:52
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryEnergyChamberOrderList(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比列表统计小计(最后一行)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/13 9:20
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
CuBonusStatisVO queryCuBonusSumStatis(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询个人奖金拨比
|
||||
* @author: zhang jing
|
||||
* @date: 2024/1/13 15:44
|
||||
* @param: [csps]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusSinglePersonStatisVO>
|
||||
**/
|
||||
CuBonusSinglePersonStatisVO bonusSingleSum(CuBonusSinglePersonStatisVO csps);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比图表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/5 13:42
|
||||
* @param: [chartVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisChartVO>
|
||||
**/
|
||||
List<CuBonusStatisChartVO> queryCuBonusStatisChart(CuBonusStatisChartVO chartVO);
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比图表合计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/18 14:39
|
||||
* @param: [chartVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisChartVO
|
||||
**/
|
||||
CuBonusStatisChartVO queryCuBonusSumStatisChart(CuBonusStatisChartVO chartVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询一年注册、升级、复购、嗨粉合计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/5 9:45
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
CuBonusStatisColumnarVO queryYearData(CuBonusStatisColumnarVO columnarVO);
|
||||
|
||||
/**
|
||||
* @description: 查询奖金拨比(饼状图)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/5 15:49
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
CuBonusStatisRoundVO queryDiallingRatio(CuBonusStatisRoundVO roundVO);
|
||||
|
||||
/**
|
||||
* @description: 查询小于当天全部已支付或撤单订单信息
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/16 17:14
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> querySaOrderByLessDay(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计表数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/11 16:03
|
||||
* @param: []
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
Boolean delStatis(@Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* @description: 查询奖金扣项配置参数
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/15 14:00
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> bonusDeductlist(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询分红比例配置
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 17:04
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> bonusDividendRatiolist(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询国外奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 14:12
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryForeignCountryBonus(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询中国奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/8 11:05
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryChinaCountryBonus(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询生效国外国家列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/21 16:09
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> countrylist(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询有效体系
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:37
|
||||
* @param: []
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> vertexList();
|
||||
|
||||
|
|
|
@ -17,48 +17,28 @@ public interface CuBonusVertexStatisMapper extends BaseMapper<CuBonusVertexStati
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/3 11:21
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> queryCuBonusStatis(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询顶点奖金拨比汇总
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/19 15:17
|
||||
* @param: [cuBonusVertexStatisTotalVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisTotalVO> queryCuBonusStatisTotal(CuBonusVertexStatisTotalVO cuBonusVertexStatisTotalVO);
|
||||
|
||||
/**
|
||||
* @description: 顶点奖金拨比汇总查询总和
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/23 13:23
|
||||
* @param: [cuBonusVertexStatisTotalVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO
|
||||
**/
|
||||
CuBonusVertexStatisTotalVO queryCuBonusStatisSum(CuBonusVertexStatisTotalVO cuBonusVertexStatisTotalVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询时间内奖金拨比顶点会员
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/20 14:11
|
||||
* @param: [cuBonusVertexStatisTotalVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisTotalVO> queryCuBonusVertex(CuBonusVertexStatisTotalVO cuBonusVertexStatisTotalVO);
|
||||
|
||||
/**
|
||||
* @description: 查询能量舱订单金额
|
||||
* @author: zhang jing
|
||||
* @date: 2024/7/1 10:52
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> queryEnergyChamberOrderList(CuBonusVertexStatisVO CuBonusVertexStatisVO);
|
||||
|
||||
|
@ -66,57 +46,33 @@ public interface CuBonusVertexStatisMapper extends BaseMapper<CuBonusVertexStati
|
|||
|
||||
/**
|
||||
* @description: 查询顶点拓展封顶人数
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/20 16:16
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisVO
|
||||
**/
|
||||
CuBonusVertexStatisTotalVO queryOrgTopNumber(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询顶点拓展平均碰次和拓展最高碰次
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/20 16:17
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisVO
|
||||
**/
|
||||
CuBonusVertexStatisTotalVO queryTouch(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比列表统计小计(最后一行)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/13 9:20
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisVO
|
||||
**/
|
||||
CuBonusVertexStatisVO queryCuBonusSumStatis(CuBonusVertexStatisVO CuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询小于当天全部已支付或撤单订单信息
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/16 17:14
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> querySaOrderByLessDay(CuBonusVertexStatisVO CuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 7天重算查询订单
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 11:02
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> queryAnewSaOrderByLessDay(CuBonusVertexStatisVO CuBonusVertexStatisVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计表数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/11 16:03
|
||||
* @param: []
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
Boolean delStatis(@Param("startDate") String startDate,
|
||||
@Param("endDate") String endDate,
|
||||
|
@ -124,57 +80,31 @@ public interface CuBonusVertexStatisMapper extends BaseMapper<CuBonusVertexStati
|
|||
|
||||
/**
|
||||
* @description: 查询奖金扣项配置参数
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/15 14:00
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> bonusDeductlist(CuBonusVertexStatisVO CuBonusVertexStatisVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询中国奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/8 11:05
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> queryChinaCountryBonus(CuBonusVertexStatisVO CuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询7天重算奖金查询
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 14:38
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> queryVertexChinaCountryBonus(CuBonusVertexStatisVO CuBonusVertexStatisVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询生效国外国家列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/21 16:09
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> countrylist(CuBonusVertexStatisVO CuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询有效顶点
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:37
|
||||
* @param: []
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> vertexList(@Param("pkVertex") Integer pkVertex);
|
||||
|
||||
/**
|
||||
* @description: 查询当天团队统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/1 11:31
|
||||
* @param: [CuBonusVertexStatis]
|
||||
* @return: com.hzs.common.domain.member.statis.CuBonusVertexStatis
|
||||
**/
|
||||
List<CuBonusVertexStatis> getCuBonusStatis(CuBonusVertexStatis CuBonusVertexStatis);
|
||||
|
||||
|
|
|
@ -9,24 +9,16 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比统计Dubbo 服务
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/1 17:25
|
||||
* @param:
|
||||
* @return:
|
||||
**/
|
||||
@Slf4j
|
||||
@DubboService
|
||||
public class ICuBonusStatisServiceProvider implements ICuBonusStatisServiceApi {
|
||||
|
||||
@Autowired
|
||||
ICuBonusStatisService iCuBonusStatisService;
|
||||
private ICuBonusStatisService iCuBonusStatisService;
|
||||
|
||||
/**
|
||||
* @description: 统计历史奖金拨比
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/19 9:29
|
||||
* @param: [startDate, endDate]
|
||||
* @return: com.hzs.common.core.domain.R
|
||||
**/
|
||||
@Override
|
||||
public R<Boolean> statsHistoryBonus(String startDate, String endDate) {
|
||||
|
@ -35,10 +27,6 @@ public class ICuBonusStatisServiceProvider implements ICuBonusStatisServiceApi {
|
|||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/12/11 10:56
|
||||
* @param: [startDate, endDate]
|
||||
* @return: com.hzs.common.core.domain.R
|
||||
**/
|
||||
@Override
|
||||
public R<Boolean> delStats(String startDate, String endDate) {
|
||||
|
|
|
@ -14,11 +14,7 @@ import java.util.List;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description: 顶点奖金拨比统计Dubbo 服务
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/1 17:25
|
||||
* @param:
|
||||
* @return:
|
||||
* 顶点奖金拨比统计Dubbo 服务
|
||||
**/
|
||||
@Slf4j
|
||||
@DubboService
|
||||
|
@ -31,23 +27,14 @@ public class ICuBonusVertexStatisServiceProvider implements ICuBonusVertexStatis
|
|||
|
||||
/**
|
||||
* @description: 7天重算顶点奖金拨比统计
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 9:58
|
||||
* @param: [startDate, endDate]
|
||||
* @return: com.hzs.common.core.domain.R
|
||||
**/
|
||||
@Override
|
||||
public R<Boolean> anewStatsHistoryBonus(String startDate, String endDate) {
|
||||
return R.ok(iCuBonusVertexStatisService.anewStatisHistoryBonus(startDate, endDate));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/12/11 10:56
|
||||
* @param: [startDate, endDate]
|
||||
* @return: com.hzs.common.core.domain.R
|
||||
**/
|
||||
@Override
|
||||
public R<?> delStats(String startDate, String endDate) {
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
package com.hzs.member.statis.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.statis.CuBonusVertexStatis;
|
||||
import com.hzs.member.statis.vo.CuBonusSinglePersonStatisVO;
|
||||
import com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO;
|
||||
import com.hzs.member.statis.vo.CuBonusLenjoyStatisVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 奖金拨比零线统计 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-08-12
|
||||
|
@ -21,55 +16,31 @@ public interface ICuBonusLenjoyStatisService extends IService<CuBonusVertexStati
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/3 11:21
|
||||
* @param: [CuBonusLenjoyStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusLenjoyStatisVO>
|
||||
**/
|
||||
List<CuBonusLenjoyStatisVO> queryCuBonusStatis(CuBonusLenjoyStatisVO CuBonusLenjoyStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比列表统计小计(最后一行)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/13 9:21
|
||||
* @param: [CuBonusLenjoyStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusLenjoyStatisVO
|
||||
**/
|
||||
CuBonusLenjoyStatisVO queryCuBonusSumStatis(CuBonusLenjoyStatisVO CuBonusLenjoyStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 7天重算顶点奖金拨比统计
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 9:57
|
||||
* @param: [startDate, endDate]
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
Boolean anewStatisHistoryBonus(String startDate,String endDate);
|
||||
Boolean anewStatisHistoryBonus(String startDate, String endDate);
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计表数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/11 16:04
|
||||
* @param: []
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
Boolean delStatis(String startDate,String endDate,List<Integer> pkVertexList);
|
||||
Boolean delStatis(String startDate, String endDate, List<Integer> pkVertexList);
|
||||
|
||||
/**
|
||||
* @description: 查询中国奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/8 11:06
|
||||
* @param: [CuBonusLenjoyStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusLenjoyStatisVO>
|
||||
**/
|
||||
List<CuBonusLenjoyStatisVO> queryChinaCountryBonus(CuBonusLenjoyStatisVO CuBonusLenjoyStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询所有体系
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:36
|
||||
* @param: []
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusLenjoyStatisVO>
|
||||
**/
|
||||
List<CuBonusLenjoyStatisVO> vertexList(Integer pkVertex);
|
||||
|
||||
|
|
|
@ -8,191 +8,76 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 奖金拨比统计 服务类
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-05-31
|
||||
*/
|
||||
public interface ICuBonusStatisService extends IService<CuBonusStatis> {
|
||||
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/3 11:21
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryCuBonusStatis(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询国外奖金拨比
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 16:41
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryForeignCountryCuBonusStatis(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询国外奖金拨比合计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/7 16:06
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
CuBonusStatisVO queryForeignCountryCuBonusStatisSum(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询体系合计的订单业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2024/7/2 9:40
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
CuBonusStatisVO queryOrderAchieveSum(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询能量舱订单金额
|
||||
* @author: zhang jing
|
||||
* @date: 2024/7/1 10:53
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryEnergyChamberOrderList(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比列表统计小计(最后一行)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/13 9:21
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
CuBonusStatisVO queryCuBonusSumStatis(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询个人奖金拨比
|
||||
* @author: zhang jing
|
||||
* @date: 2024/1/13 15:43
|
||||
* @param: [csps]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusSinglePersonStatisVO>
|
||||
**/
|
||||
CuBonusSinglePersonStatisVO bonusSingleSum(CuBonusSinglePersonStatisVO csps);
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比图表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/5 13:41
|
||||
* @param: [chartVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisChartVO>
|
||||
**/
|
||||
List<CuBonusStatisChartVO> queryCuBonusStatisChart(CuBonusStatisChartVO chartVO);
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比图表合计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/18 14:38
|
||||
* @param: [chartVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisChartVO
|
||||
**/
|
||||
CuBonusStatisChartVO queryCuBonusSumStatisChart(CuBonusStatisChartVO chartVO);
|
||||
|
||||
/**
|
||||
* @description: 查询奖金拨比图形数据-柱形图
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/5 9:19
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
CuBonusStatisColumnarVO pillarRatio(CuBonusStatisColumnarVO columnarVO);
|
||||
|
||||
/**
|
||||
* @description: 查询一年注册、升级、复购、嗨粉合计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/5 10:25
|
||||
* @param: [cuBonusStatisVO, queryDate]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
CuBonusStatisColumnarVO queryYearData(CuBonusStatisColumnarVO columnarVO);
|
||||
|
||||
/**
|
||||
* @description: 查询奖金拨比(饼状图)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/5 15:49
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
CuBonusStatisRoundVO queryDiallingRatio(CuBonusStatisRoundVO roundVO);
|
||||
|
||||
/**
|
||||
* @description: 统计历史奖金拨比数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/16 11:35
|
||||
* @param: []
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
Boolean statisHistoryBonus(String startDate, String endDate);
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计表数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/11 16:04
|
||||
* @param: []
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
Boolean delStatis(String startDate, String endDate);
|
||||
|
||||
/**
|
||||
* @description: 查询奖金扣项配置参数
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/15 14:02
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> bonusDeductlist(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询分红比例配置
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 17:03
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> bonusDividendRatiolist(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询国外奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 14:12
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryForeignCountryBonus(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询中国奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/8 11:06
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> queryChinaCountryBonus(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询生效国外国家列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/21 16:10
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> countrylist(CuBonusStatisVO cuBonusStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询所有体系
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:36
|
||||
* @param: []
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
List<CuBonusStatisVO> vertexList();
|
||||
|
||||
|
|
|
@ -9,54 +9,31 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 奖金拨比零线统计 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-08-12
|
||||
*/
|
||||
public interface ICuBonusVertexStatisService extends IService<CuBonusVertexStatis> {
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/3 11:21
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> queryCuBonusStatis(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询顶点奖金拨比汇总
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/19 15:18
|
||||
* @param: [cuBonusVertexStatisTotalVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisTotalVO> queryCuBonusStatisTotal(CuBonusVertexStatisTotalVO cuBonusVertexStatisTotalVO);
|
||||
|
||||
/**
|
||||
* @description: 查询顶点奖金拨比汇总总和(最后一行)
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/23 13:22
|
||||
* @param: [cuBonusVertexStatisTotalVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO
|
||||
**/
|
||||
CuBonusVertexStatisTotalVO queryCuBonusStatisSum(CuBonusVertexStatisTotalVO cuBonusVertexStatisTotalVO);
|
||||
|
||||
/**
|
||||
* @description: 查询时间内奖金拨比顶点会员
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/20 14:12
|
||||
* @param: [cuBonusVertexStatisTotalVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisTotalVO> queryCuBonusVertex(CuBonusVertexStatisTotalVO cuBonusVertexStatisTotalVO);
|
||||
|
||||
/**
|
||||
* @description: 查询能量舱订单金额
|
||||
* @author: zhang jing
|
||||
* @date: 2024/7/1 10:53
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> queryEnergyChamberOrderList(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
|
@ -64,82 +41,46 @@ public interface ICuBonusVertexStatisService extends IService<CuBonusVertexStati
|
|||
|
||||
/**
|
||||
* @description: 查询顶点拓展封顶人数
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/20 16:17
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisVO
|
||||
**/
|
||||
CuBonusVertexStatisTotalVO queryOrgTopNumber(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询顶点拓展平均碰次和拓展最高碰次
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/20 16:17
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisVO
|
||||
**/
|
||||
CuBonusVertexStatisTotalVO queryTouch(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比列表统计小计(最后一行)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/13 9:21
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisVO
|
||||
**/
|
||||
CuBonusVertexStatisVO queryCuBonusSumStatis(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 7天重算顶点奖金拨比统计
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 9:57
|
||||
* @param: [startDate, endDate]
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
Boolean anewStatisHistoryBonus(String startDate, String endDate);
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计表数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/11 16:04
|
||||
* @param: []
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
Boolean delStatis(String startDate, String endDate, List<Integer> pkVertexList);
|
||||
|
||||
/**
|
||||
* @description: 查询奖金扣项配置参数
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/15 14:02
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> bonusDeductlist(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询中国奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/8 11:06
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> queryChinaCountryBonus(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询生效国外国家列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/21 16:10
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> countrylist(CuBonusVertexStatisVO cuBonusVertexStatisVO);
|
||||
|
||||
/**
|
||||
* @description: 查询所有体系
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:36
|
||||
* @param: []
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
List<CuBonusVertexStatisVO> vertexList(Integer pkVertex);
|
||||
|
||||
|
|
|
@ -4,20 +4,13 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.constant.CountryConstants;
|
||||
import com.hzs.common.core.constant.TableNameConstants;
|
||||
import com.hzs.common.core.enums.EBonusItems;
|
||||
import com.hzs.common.core.enums.EDelFlag;
|
||||
import com.hzs.common.core.enums.EOrderStatus;
|
||||
import com.hzs.common.core.enums.EOrderType;
|
||||
import com.hzs.common.domain.member.statis.CuBonusVertexStatis;
|
||||
import com.hzs.member.achieve.service.ICuMemberSettlePeriodService;
|
||||
import com.hzs.member.base.service.ICuMemberService;
|
||||
import com.hzs.member.statis.mapper.CuBonusLenjoyStatisMapper;
|
||||
import com.hzs.member.statis.mapper.CuBonusVertexStatisMapper;
|
||||
import com.hzs.member.statis.service.ICuBonusLenjoyStatisService;
|
||||
import com.hzs.member.statis.service.ICuBonusVertexStatisService;
|
||||
import com.hzs.member.statis.vo.CuBonusLenjoyStatisVO;
|
||||
import com.hzs.member.statis.vo.CuBonusSinglePersonStatisVO;
|
||||
import com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO;
|
||||
import com.hzs.member.statis.vo.CuBonusLenjoyStatisVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -33,9 +26,7 @@ import java.util.Map;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 奖金拨比零线统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-08-12
|
||||
|
@ -44,16 +35,12 @@ import java.util.stream.Collectors;
|
|||
public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoyStatisMapper, CuBonusVertexStatis> implements ICuBonusLenjoyStatisService {
|
||||
|
||||
@Autowired
|
||||
private ICuMemberSettlePeriodService cuMemberSettlePeriodService;
|
||||
private ICuMemberSettlePeriodService iCuMemberSettlePeriodService;
|
||||
@Autowired
|
||||
private ICuMemberService iCuMemberService;
|
||||
|
||||
/**
|
||||
* @description: 通过日期范围,返回范围内每天的日期
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 10:44
|
||||
* @param: [startDate, endDate]
|
||||
* @return: java.util.List<java.lang.String>
|
||||
**/
|
||||
public static List<String> getDatesInRange(String startDate, String endDate) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
@ -70,10 +57,6 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
|
||||
/**
|
||||
* @description: 7天重算顶点奖金拨比统计
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 9:39
|
||||
* @param: [startDate, endDate]
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
@ -87,7 +70,7 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
//日期集合
|
||||
List<String> dates = getDatesInRange(startDate, endDate);
|
||||
for (String date : dates) {
|
||||
int period = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
int period = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
String settleTableName = TableNameConstants.CU_MEMBER_RANGE + period;
|
||||
Integer count = iCuMemberService.selectExistTable(settleTableName);
|
||||
if (count == 0) {
|
||||
|
@ -115,7 +98,7 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
for (Map.Entry<Date, List<CuBonusLenjoyStatisVO>> entry : orachListMap.entrySet()) {
|
||||
for (CuBonusLenjoyStatisVO ve : vertexList) {
|
||||
CuBonusLenjoyStatisVO oldSo = new CuBonusLenjoyStatisVO();
|
||||
oldSo = addOrderAmount(oldSo, null, ve.getPkVertex(), entry.getValue(), 2);
|
||||
addOrderAmount(oldSo, null, ve.getPkVertex(), entry.getValue(), 2);
|
||||
if (oldSo.getPkCountry() != null) {
|
||||
soAll.add(oldSo);
|
||||
}
|
||||
|
@ -137,7 +120,7 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
CuBonusLenjoyStatisVO oldSo = new CuBonusLenjoyStatisVO();
|
||||
for (CuBonusLenjoyStatisVO cb : entry.getValue()) {
|
||||
if (ve.getPkVertex().equals(cb.getPkVertex())) {
|
||||
oldSo = addChAchieve(oldSo, cb);
|
||||
addChAchieve(oldSo, cb);
|
||||
}
|
||||
}
|
||||
if (oldSo.getPkCountry() != null) {
|
||||
|
@ -157,10 +140,6 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计表数据
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/13 9:23
|
||||
* @param: [startDate, endDate]
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
@Override
|
||||
public Boolean delStatis(String startDate, String endDate, List<Integer> pkVertexList) {
|
||||
|
@ -170,10 +149,6 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/3 11:21
|
||||
* @param: [CuBonusLenjoyStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusLenjoyStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusLenjoyStatisVO> queryCuBonusStatis(CuBonusLenjoyStatisVO CuBonusLenjoyStatisVO) {
|
||||
|
@ -183,10 +158,6 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比列表统计小计(最后一行)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/13 9:21
|
||||
* @param: [CuBonusLenjoyStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusLenjoyStatisVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusLenjoyStatisVO queryCuBonusSumStatis(CuBonusLenjoyStatisVO CuBonusLenjoyStatisVO) {
|
||||
|
@ -198,33 +169,20 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
oldBon.setPkCountry(newBon.getPkCountry());
|
||||
oldBon.setCreationTime(newBon.getCreationTime());
|
||||
oldBon.setPkVertex(newBon.getPkVertex());
|
||||
// if(28==newBon.getPkVertex()){
|
||||
// System.out.println(newBon.getPkVertex());
|
||||
// }
|
||||
oldBon.setCloudRealSubtotal(addOrInitializeAmount(oldBon.getCloudRealSubtotal(), newBon.getRealIncome(), 2));
|
||||
return oldBon;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询有效顶点
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:37
|
||||
* @param: []
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusLenjoyStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusLenjoyStatisVO> vertexList(Integer pkVertex) {
|
||||
return baseMapper.vertexList(pkVertex);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 累加订单金额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:50
|
||||
* @param: [so, type]
|
||||
* @return: void
|
||||
**/
|
||||
private CuBonusLenjoyStatisVO addOrderAmount(CuBonusLenjoyStatisVO oldSo, Integer pkCountry, Integer pkVertex, List<CuBonusLenjoyStatisVO> orachList, int type) {
|
||||
for (CuBonusLenjoyStatisVO newSo : orachList) {
|
||||
|
@ -265,10 +223,6 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
|
||||
/**
|
||||
* @description: 保存奖金拨比订单数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/14 14:44
|
||||
* @param: [so, type]
|
||||
* @return: void
|
||||
**/
|
||||
private void saveBonusStatis(List<CuBonusLenjoyStatisVO> soList) {
|
||||
for (CuBonusLenjoyStatisVO so : soList) {
|
||||
|
@ -295,10 +249,6 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
|
||||
/**
|
||||
* @description: 查询中国奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/8 11:06
|
||||
* @param: [CuBonusLenjoyStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusLenjoyStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusLenjoyStatisVO> queryChinaCountryBonus(CuBonusLenjoyStatisVO CuBonusLenjoyStatisVO) {
|
||||
|
@ -324,10 +274,6 @@ public class CuBonusLenjoyStatisServiceImpl extends ServiceImpl<CuBonusLenjoySta
|
|||
|
||||
/**
|
||||
* @description:查询当天顶点统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/1 11:17
|
||||
* @param: [CuBonusVertexStatis]
|
||||
* @return: com.hzs.common.domain.member.statis.CuBonusVertexStatis
|
||||
**/
|
||||
public List<CuBonusVertexStatis> getCuBonusStatis(CuBonusVertexStatis CuBonusVertexStatis) {
|
||||
return baseMapper.getCuBonusStatis(CuBonusVertexStatis);
|
||||
|
|
|
@ -22,9 +22,6 @@ import java.util.stream.Collectors;
|
|||
|
||||
/**
|
||||
* 奖金拨比统计 服务实现类
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-05-31
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
|
@ -32,14 +29,10 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 保存奖金拨比订单数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/14 14:44
|
||||
* @param: [so, type]
|
||||
* @return: void
|
||||
**/
|
||||
private void saveBonusStatis(List<CuBonusStatisVO> soList) {
|
||||
for (CuBonusStatisVO so : soList) {
|
||||
if (so.getPkCountry() == null) {
|
||||
if (null == so.getPkCountry()) {
|
||||
continue;
|
||||
}
|
||||
CuBonusStatis bs = new CuBonusStatis();
|
||||
|
@ -69,94 +62,66 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
bs.setMakerOrder(so.getMakerOrder());
|
||||
bs.setWelfareOrder(so.getWelfareOrder());
|
||||
|
||||
/**
|
||||
* 注册新增PV
|
||||
*/
|
||||
// 注册新增PV
|
||||
bs.setMainRegPv(so.getMainRegPv());
|
||||
/**
|
||||
* 升级新增PV
|
||||
*/
|
||||
// 升级新增PV
|
||||
bs.setMainUpPv(so.getMainUpPv());
|
||||
/**
|
||||
*复购新增PV
|
||||
*/
|
||||
// 复购新增PV
|
||||
bs.setMainRepurPv(so.getMainRepurPv());
|
||||
/**
|
||||
*特殊注册PV
|
||||
*/
|
||||
// 特殊注册PV
|
||||
bs.setSpecialRegisterPv(so.getSpecialRegisterPv());
|
||||
/**
|
||||
*特殊升级PV
|
||||
*/
|
||||
// 特殊升级PV
|
||||
bs.setSpecialUpgradePv(so.getSpecialUpgradePv());
|
||||
/**
|
||||
*特殊复购PV
|
||||
*/
|
||||
// 特殊复购PV
|
||||
bs.setSpecialRepurchasePv(so.getSpecialRepurchasePv());
|
||||
/**
|
||||
*虚拟订单PV
|
||||
*/
|
||||
// 虚拟订单PV
|
||||
bs.setFictitiousPv(so.getFictitiousPv());
|
||||
/**
|
||||
*嗨粉注册PV
|
||||
*/
|
||||
// 嗨粉注册PV
|
||||
bs.setHifansRegPv(so.getHifansRegPv());
|
||||
/**
|
||||
*海粉升级PV
|
||||
*/
|
||||
// 海粉升级PV
|
||||
bs.setHaiFunUpgradePv(so.getHaiFunUpgradePv());
|
||||
/**
|
||||
*云学院订单PV
|
||||
*/
|
||||
// 云学院订单PV
|
||||
bs.setCloudCollegePv(so.getCloudCollegePv());
|
||||
/**
|
||||
*直播订单PV
|
||||
*/
|
||||
// 直播订单PV
|
||||
bs.setMallPv(so.getMallPv());
|
||||
/**
|
||||
*赋能礼包PV
|
||||
*/
|
||||
// 赋能礼包PV
|
||||
bs.setEmpowermentGiftPv(so.getEmpowermentGiftPv());
|
||||
/**
|
||||
*合作订单PV
|
||||
*/
|
||||
// 合作订单PV
|
||||
bs.setCooperatePv(so.getCooperatePv());
|
||||
/**
|
||||
*创客订单PV
|
||||
*/
|
||||
// 创客订单PV
|
||||
bs.setMakerOrderPv(so.getMakerOrderPv());
|
||||
/**
|
||||
*创客礼包PV
|
||||
*/
|
||||
// 创客礼包PV
|
||||
bs.setMakerGiftPv(so.getMakerGiftPv());
|
||||
/**
|
||||
*福利专区PV
|
||||
*/
|
||||
// 福利专区PV
|
||||
bs.setWelfareOrderPv(so.getWelfareOrderPv());
|
||||
|
||||
// 查询数据库判断记录是否存在
|
||||
List<CuBonusStatis> existingRecord = getCuBonusStatis(bs);
|
||||
if (CollectionUtil.isEmpty(existingRecord)) {
|
||||
baseMapper.insert(bs); // 不存在则插入新记录
|
||||
// 不存在则插入新记录
|
||||
baseMapper.insert(bs);
|
||||
} else {
|
||||
bs.setPkId(existingRecord.get(0).getPkId()); // 设置主键ID
|
||||
baseMapper.updateById(bs); // 存在则更新记录
|
||||
// 设置主键ID
|
||||
bs.setPkId(existingRecord.get(0).getPkId());
|
||||
// 存在则更新记录
|
||||
baseMapper.updateById(bs);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 累加订单金额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:50
|
||||
* @param: [so, type]
|
||||
* @return: void
|
||||
**/
|
||||
private CuBonusStatisVO addOrderAmount(CuBonusStatisVO oldSo, Integer pkCountry, Integer pkVertex, List<CuBonusStatisVO> orachList, int type) {
|
||||
for (CuBonusStatisVO newSo : orachList) {
|
||||
// 修改统计数据
|
||||
if ((pkCountry == null && pkVertex != null && pkVertex.equals(newSo.getPkVertex())) ||
|
||||
(pkCountry != null && pkVertex == null && pkCountry.equals(newSo.getPkCountry()))) {
|
||||
if (
|
||||
(pkCountry == null && pkVertex != null && pkVertex.equals(newSo.getPkVertex()))
|
||||
||
|
||||
(pkCountry != null && pkVertex == null && pkCountry.equals(newSo.getPkCountry()))
|
||||
) {
|
||||
// 国家国空,体系不为 并且 体系相同
|
||||
// 国家不为空,体系为空 并且 国家相同
|
||||
oldSo.setPkCountry(newSo.getPkCountry());
|
||||
oldSo.setCreationTime(newSo.getCreationTime());
|
||||
if (newSo.getPkVertex() != null) {
|
||||
|
@ -168,32 +133,39 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
switch (EOrderType.getEnumByValue(newSo.getOrderType())) {
|
||||
// 首购
|
||||
case REGISTER_ORDER:
|
||||
// 注册订单
|
||||
oldSo.setMainRegAmount(addOrInitializeAmount(oldSo.getMainRegAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setMainRegPv(addOrInitializeAmount(oldSo.getMainRegPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case UPGRADE_ORDER:
|
||||
// 升级订单
|
||||
oldSo.setMainUpAmount(addOrInitializeAmount(oldSo.getMainUpAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setMainUpPv(addOrInitializeAmount(oldSo.getMainUpPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case SPECIAL_REGISTER_ORDER:
|
||||
// 乐学注册订单
|
||||
oldSo.setSpecialRegisterAmount(addOrInitializeAmount(oldSo.getSpecialRegisterAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setSpecialRegisterPv(addOrInitializeAmount(oldSo.getSpecialRegisterPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case SPECIAL_UPGRADE_ORDER:
|
||||
// 乐学升级订单
|
||||
oldSo.setSpecialUpgradeAmount(addOrInitializeAmount(oldSo.getSpecialUpgradeAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setSpecialUpgradePv(addOrInitializeAmount(oldSo.getSpecialUpgradePv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
// 复购 3 12 14 18 19 22 26 28 13 31
|
||||
// 复购
|
||||
case REPURCHASE_ORDER:
|
||||
case CONSUME_ORDER:
|
||||
// 复购订单、重消订单
|
||||
oldSo.setMainRepurAmount(addOrInitializeAmount(oldSo.getMainRepurAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setMainRepurPv(addOrInitializeAmount(oldSo.getMainRepurPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case SPECIAL_REPURCHASE_ORDER:
|
||||
// 乐学复购订单
|
||||
oldSo.setSpecialRepurchaseAmount(addOrInitializeAmount(oldSo.getSpecialRepurchaseAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setSpecialRepurchasePv(addOrInitializeAmount(oldSo.getSpecialRepurchasePv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case WELFARE_ORDER:
|
||||
// 福利订单
|
||||
oldSo.setWelfareOrder(addOrInitializeAmount(oldSo.getWelfareOrder(), newSo.getOrderAmount(), type));
|
||||
oldSo.setWelfareOrderPv(addOrInitializeAmount(oldSo.getWelfareOrderPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
|
@ -205,7 +177,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
return oldSo;
|
||||
}
|
||||
|
||||
|
||||
//累计中国奖金
|
||||
private CuBonusStatisVO addChAchieve(CuBonusStatisVO oldBon, CuBonusStatisVO newBon) {
|
||||
oldBon.setPkCountry(newBon.getPkCountry());
|
||||
|
@ -214,99 +185,63 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
oldBon.setPkTeamCode(newBon.getPkTeamCode());
|
||||
|
||||
switch (EBonusItems.getEnumByValue(newBon.getBonusType())) {
|
||||
// 首购 3,4,5,7
|
||||
// 首购
|
||||
case DIRECT_INCOME:
|
||||
// 直推收益
|
||||
oldBon.setIntroduceBonus(addOrInitializeAmount(oldBon.getIntroduceBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case EXPANSION_INCOME:
|
||||
// 拓展收益
|
||||
oldBon.setOrgBonus(addOrInitializeAmount(oldBon.getOrgBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case COACHING_INCOME:
|
||||
// 辅导收益
|
||||
oldBon.setLeaderBonus(addOrInitializeAmount(oldBon.getLeaderBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case SERVICE_SUBSIDIES:
|
||||
// 服务补贴
|
||||
oldBon.setServiceBonus(addOrInitializeAmount(oldBon.getServiceBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
//复购 8,9,12,24,20,21,1
|
||||
// 复购
|
||||
case REPURCHASE_RANGE_INCOME:
|
||||
// 复购级差
|
||||
oldBon.setRepurRangeBonus(addOrInitializeAmount(oldBon.getRepurRangeBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case CONSUMPTION_EXPANSION_INCOME:
|
||||
// 消费拓展收益
|
||||
oldBon.setRepurOrgBonus(addOrInitializeAmount(oldBon.getRepurOrgBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case REPURCHASE_COACHING_INCOME:
|
||||
// 复购辅导收益
|
||||
oldBon.setRepurLeaderBonus(addOrInitializeAmount(oldBon.getRepurLeaderBonus(), newBon.getRealIncome(), 2));
|
||||
case REPURCHASE_COUPONS:
|
||||
// 复购券
|
||||
oldBon.setRepurCouponSubtotal(addOrInitializeAmount(oldBon.getRepurCouponSubtotal(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case HELP_EACH_INCOME:
|
||||
// 复购直推收益
|
||||
oldBon.setRepurPushIncome(addOrInitializeAmount(oldBon.getRepurPushIncome(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
// //创客空间
|
||||
// case MAKER_DIRECT:
|
||||
// oldBon.setMakerDirect(addOrInitializeAmount(oldBon.getMakerDirect(), newBon.getRealIncome(), 2));
|
||||
// //云代
|
||||
// case CLOUD_AGENT_DIRECT_PUSH:
|
||||
// oldBon.setAgentIntroduceBonus(addOrInitializeAmount(oldBon.getAgentIntroduceBonus(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// case MAKER_SHARE:
|
||||
// oldBon.setMakerShare(addOrInitializeAmount(oldBon.getMakerShare(), newBon.getRealIncome(), 2));
|
||||
// case CLOUD_AGENT_FIRST_PURCHASE:
|
||||
// oldBon.setCloudAgentFirstPurchase(addOrInitializeAmount(oldBon.getCloudAgentFirstPurchase(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// case CLOUD_AGENT_REPURCHASE:
|
||||
// oldBon.setCloudAgentRepurchase(addOrInitializeAmount(oldBon.getCloudAgentRepurchase(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// //嗨粉直推收益
|
||||
// case HI_PINK:
|
||||
// oldBon.setHiFunIncome(addOrInitializeAmount(oldBon.getHiFunIncome(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
//云代
|
||||
case CLOUD_AGENT_DIRECT_PUSH:
|
||||
oldBon.setAgentIntroduceBonus(addOrInitializeAmount(oldBon.getAgentIntroduceBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case CLOUD_AGENT_FIRST_PURCHASE:
|
||||
oldBon.setCloudAgentFirstPurchase(addOrInitializeAmount(oldBon.getCloudAgentFirstPurchase(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case CLOUD_AGENT_REPURCHASE:
|
||||
oldBon.setCloudAgentRepurchase(addOrInitializeAmount(oldBon.getCloudAgentRepurchase(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
//嗨粉直推收益
|
||||
case HI_PINK:
|
||||
oldBon.setHiFunIncome(addOrInitializeAmount(oldBon.getHiFunIncome(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
}
|
||||
return oldBon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 累计国外奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 14:28
|
||||
* @param: [oldBon, newBon]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
private CuBonusStatisVO addFcAchieve(CuBonusStatisVO oldBon, CuBonusStatisVO newBon) {
|
||||
oldBon.setPkCountry(newBon.getPkCountry());
|
||||
oldBon.setCreationTime(newBon.getCreationTime());
|
||||
|
||||
switch (EBonusItems.getEnumByValue(newBon.getBonusType())) {
|
||||
// 首购
|
||||
case DIRECT_INCOME:
|
||||
oldBon.setIntroduceBonus(addOrInitializeAmount(oldBon.getIntroduceBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case EXPANSION_INCOME:
|
||||
oldBon.setOrgBonus(addOrInitializeAmount(oldBon.getOrgBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case COACHING_INCOME:
|
||||
oldBon.setLeaderBonus(addOrInitializeAmount(oldBon.getLeaderBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case SERVICE_SUBSIDIES:
|
||||
oldBon.setServiceBonus(addOrInitializeAmount(oldBon.getServiceBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
//复购
|
||||
case REPURCHASE_RANGE_INCOME:
|
||||
oldBon.setRepurRangeBonus(addOrInitializeAmount(oldBon.getRepurRangeBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case CONSUMPTION_EXPANSION_INCOME:
|
||||
oldBon.setRepurOrgBonus(addOrInitializeAmount(oldBon.getRepurOrgBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
}
|
||||
return oldBon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 保存国内奖金拨比奖金数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/16 11:34
|
||||
* @param: [cb]
|
||||
* @return: void
|
||||
**/
|
||||
private void saveBonusStatisAchieve(List<CuBonusStatisVO> cblist) {
|
||||
for (CuBonusStatisVO cb : cblist) {
|
||||
|
@ -327,6 +262,7 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
bs.setServiceBonus(cb.getServiceBonus());
|
||||
bs.setRepurRangeBonus(cb.getRepurRangeBonus());
|
||||
bs.setRepurOrgBonus(cb.getRepurOrgBonus());
|
||||
bs.setRepurLeaderBonus(cb.getRepurLeaderBonus());
|
||||
bs.setAgentIntroduceBonus(cb.getAgentIntroduceBonus());
|
||||
bs.setRepurCouponSubtotal(cb.getRepurCouponSubtotal());
|
||||
bs.setRepurPushIncome(cb.getRepurPushIncome());
|
||||
|
@ -336,53 +272,17 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
bs.setMakerShare(cb.getMakerShare());
|
||||
bs.setCloudAgentFirstPurchase(cb.getCloudAgentFirstPurchase());
|
||||
bs.setCloudAgentRepurchase(cb.getCloudAgentRepurchase());
|
||||
if (28 == cb.getPkVertex()) {
|
||||
System.out.println(cb.getPkVertex());
|
||||
}
|
||||
|
||||
|
||||
// 查询数据库判断记录是否存在
|
||||
List<CuBonusStatis> existingRecord = getCuBonusStatis(bs);
|
||||
if (CollectionUtil.isEmpty(existingRecord)) {
|
||||
baseMapper.insert(bs); // 不存在则插入新记录
|
||||
// 不存在则插入新记录
|
||||
baseMapper.insert(bs);
|
||||
} else {
|
||||
bs.setPkId(existingRecord.get(0).getPkId()); // 设置主键ID
|
||||
baseMapper.updateById(bs); // 存在则更新记录
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 保存国外奖金拨比奖金数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 14:18
|
||||
* @param: [cblist]
|
||||
* @return: void
|
||||
**/
|
||||
private void saveForeignCountryBonus(List<CuBonusStatisVO> cblist) {
|
||||
for (CuBonusStatisVO cb : cblist) {
|
||||
if (cb.getPkCountry() == null) {
|
||||
continue;
|
||||
}
|
||||
//查询体系是否添加
|
||||
CuBonusStatis bs = new CuBonusStatis();
|
||||
bs.setCreationTime(cb.getCreationTime());
|
||||
bs.setPkCountry(cb.getPkCountry());
|
||||
bs.setIntroduceBonus(cb.getIntroduceBonus());
|
||||
bs.setOrgBonus(cb.getOrgBonus());
|
||||
bs.setLeaderBonus(cb.getLeaderBonus());
|
||||
bs.setShareBonus(cb.getShareBonus());
|
||||
bs.setServiceBonus(cb.getServiceBonus());
|
||||
bs.setRepurRangeBonus(cb.getRepurRangeBonus());
|
||||
bs.setRepurOrgBonus(cb.getRepurOrgBonus());
|
||||
bs.setRepurPushIncome(cb.getRepurPushIncome());
|
||||
// 查询数据库判断记录是否存在
|
||||
List<CuBonusStatis> existingRecord = getCuBonusStatis(bs);
|
||||
if (CollectionUtil.isEmpty(existingRecord)) {
|
||||
baseMapper.insert(bs); // 不存在则插入新记录
|
||||
} else {
|
||||
bs.setPkId(existingRecord.get(0).getPkId()); // 设置主键ID
|
||||
baseMapper.updateById(bs); // 存在则更新记录
|
||||
// 设置主键ID
|
||||
bs.setPkId(existingRecord.get(0).getPkId());
|
||||
// 存在则更新记录
|
||||
baseMapper.updateById(bs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -406,70 +306,22 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/3 11:21
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisVO> queryCuBonusStatis(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.queryCuBonusStatis(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询国外奖金拨比
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 16:42
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisVO> queryForeignCountryCuBonusStatis(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.queryForeignCountryCuBonusStatis(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询国外奖金拨比合计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/7 16:02
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public CuBonusStatisVO queryForeignCountryCuBonusStatisSum(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.queryForeignCountryCuBonusStatisSum(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询体系合计的订单业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2024/7/2 9:48
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public CuBonusStatisVO queryOrderAchieveSum(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.queryOrderAchieveSum(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询能量舱订单金额
|
||||
* @author: zhang jing
|
||||
* @date: 2024/7/1 10:52
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisVO> queryEnergyChamberOrderList(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.queryEnergyChamberOrderList(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比列表统计小计(最后一行)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/13 9:21
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusStatisVO queryCuBonusSumStatis(CuBonusStatisVO cuBonusStatisVO) {
|
||||
|
@ -478,10 +330,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 查询个人奖金拨比
|
||||
* @author: zhang jing
|
||||
* @date: 2024/1/13 15:43
|
||||
* @param: [csps]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusSinglePersonStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public CuBonusSinglePersonStatisVO bonusSingleSum(CuBonusSinglePersonStatisVO csps) {
|
||||
|
@ -490,10 +338,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比图表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/5 13:42
|
||||
* @param: [chartVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisChartVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisChartVO> queryCuBonusStatisChart(CuBonusStatisChartVO chartVO) {
|
||||
|
@ -502,10 +346,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比图表合计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/18 14:38
|
||||
* @param: [chartVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisChartVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusStatisChartVO queryCuBonusSumStatisChart(CuBonusStatisChartVO chartVO) {
|
||||
|
@ -514,10 +354,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 查询奖金拨比图形数据-柱形图
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/3 15:14
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusStatisColumnarVO pillarRatio(CuBonusStatisColumnarVO columnarVO) {
|
||||
|
@ -547,10 +383,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 查询一年注册、升级、复购、嗨粉合计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/5 10:20
|
||||
* @param: [cuBonusStatisVO, queryDate]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusStatisColumnarVO queryYearData(CuBonusStatisColumnarVO columnarVO) {
|
||||
|
@ -560,10 +392,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 查询奖金拨比(饼状图)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/5 15:51
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusStatisVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusStatisRoundVO queryDiallingRatio(CuBonusStatisRoundVO roundVO) {
|
||||
|
@ -572,10 +400,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description:查询当天团队统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/1 11:17
|
||||
* @param: [cuBonusStatis]
|
||||
* @return: com.hzs.common.domain.member.statis.CuBonusStatis
|
||||
**/
|
||||
public List<CuBonusStatis> getCuBonusStatis(CuBonusStatis cuBonusStatis) {
|
||||
return baseMapper.getCuBonusStatis(cuBonusStatis);
|
||||
|
@ -583,35 +407,34 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 统计历史奖金拨比数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/16 10:51
|
||||
* @param: []
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean statisHistoryBonus(String startDate, String endDate) {
|
||||
//查询所有体系
|
||||
List<CuBonusStatisVO> vertexlist = vertexList();
|
||||
|
||||
//查询新增订单
|
||||
CuBonusStatisVO cbs = new CuBonusStatisVO();
|
||||
//累加好的数据存入soAll
|
||||
List<CuBonusStatisVO> soAll = new ArrayList<>();
|
||||
cbs.setDelFlag(EDelFlag.UN_DELETE.getValue());
|
||||
cbs.setOrderStatus(EOrderStatus.PAY.getValue());
|
||||
cbs.setStartDate(startDate);
|
||||
cbs.setEndDate(endDate);
|
||||
cbs.setPkCountry(CountryConstants.CHINA_COUNTRY);
|
||||
// //先查中国订单
|
||||
|
||||
//累加好的数据存入soAll
|
||||
List<CuBonusStatisVO> soAll = new ArrayList<>();
|
||||
// 先查中国订单
|
||||
List<CuBonusStatisVO> orachList = baseMapper.querySaOrderByLessDay(cbs);
|
||||
// 按支付时间(年月日)把订单进行分组(key:支付时间(年月日),value:订单统计数据列表)
|
||||
Map<Date, List<CuBonusStatisVO>> orachListMap = orachList.stream()
|
||||
.collect(Collectors.groupingBy(CuBonusStatisVO::getCreationTime));
|
||||
//查询所有体系
|
||||
List<CuBonusStatisVO> vertexlist = vertexList();
|
||||
if (CollectionUtil.isNotEmpty(orachList)) {
|
||||
if (CollectionUtil.isNotEmpty(vertexlist)) {
|
||||
for (Map.Entry<Date, List<CuBonusStatisVO>> entry : orachListMap.entrySet()) {
|
||||
for (CuBonusStatisVO ve : entry.getValue()) {
|
||||
CuBonusStatisVO oldSo = new CuBonusStatisVO();
|
||||
oldSo = addOrderAmount(oldSo, null, ve.getPkVertex(), entry.getValue(), 2);
|
||||
addOrderAmount(oldSo, null, ve.getPkVertex(), entry.getValue(), 2);
|
||||
if (oldSo.getPkCountry() != null) {
|
||||
soAll.add(oldSo);
|
||||
}
|
||||
|
@ -619,11 +442,12 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//累加好的数据存入acAll
|
||||
List<CuBonusStatisVO> acAll = new ArrayList<>();
|
||||
//查询中国统计奖金
|
||||
// List<CuMemberBonus> listCn = cuMemberBonusService.queryMemberBonusByPeriod(null, startDate, endDate, CountryConstants.CHINA_COUNTRY);
|
||||
List<CuBonusStatisVO> listCn = queryChinaCountryBonus(cbs);
|
||||
List<CuBonusStatisVO> listCn = baseMapper.queryChinaCountryBonus(cbs);
|
||||
// 按支付时间(年月日)把订单进行分组(key:支付时间(年月日),value:订单统计数据列表)
|
||||
Map<Date, List<CuBonusStatisVO>> listCnMap = listCn.stream()
|
||||
.collect(Collectors.groupingBy(CuBonusStatisVO::getCreationTime));
|
||||
if (CollectionUtil.isNotEmpty(listCn)) {
|
||||
|
@ -633,86 +457,27 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
CuBonusStatisVO oldSo = new CuBonusStatisVO();
|
||||
for (CuBonusStatisVO cb : entry.getValue()) {
|
||||
if (ve.getPkVertex().equals(cb.getPkVertex())) {
|
||||
oldSo = addChAchieve(oldSo, cb);
|
||||
addChAchieve(oldSo, cb);
|
||||
if (oldSo.getPkCountry() != null) {
|
||||
acAll.add(oldSo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//查询国外国家列表 查询国外统计奖金
|
||||
//累加好的数据存入fcAll
|
||||
List<CuBonusStatisVO> fcAll = new ArrayList<>();
|
||||
List<CuBonusStatisVO> countrylist = countrylist(cbs);
|
||||
if (CollectionUtil.isNotEmpty(countrylist)) {
|
||||
for (CuBonusStatisVO con : countrylist) {
|
||||
cbs.setDelFlag(EDelFlag.UN_DELETE.getValue());
|
||||
cbs.setOrderStatus(EOrderStatus.PAY.getValue());
|
||||
cbs.setStartDate(startDate);
|
||||
cbs.setEndDate(endDate);
|
||||
cbs.setPkCountry(con.getPkCountry());
|
||||
//查询国外订单
|
||||
List<CuBonusStatisVO> orach = baseMapper.querySaOrderByLessDay(cbs);
|
||||
Map<Date, List<CuBonusStatisVO>> orachMap = orach.stream()
|
||||
.collect(Collectors.groupingBy(CuBonusStatisVO::getCreationTime));
|
||||
if (CollectionUtil.isNotEmpty(orach)) {
|
||||
for (Map.Entry<Date, List<CuBonusStatisVO>> entry : orachMap.entrySet()) {
|
||||
CuBonusStatisVO oldSo = new CuBonusStatisVO();
|
||||
oldSo = addOrderAmount(oldSo, con.getPkCountry(), null, entry.getValue(), 2);
|
||||
if (oldSo.getPkCountry() != null) {
|
||||
soAll.add(oldSo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//查询国外统计奖金
|
||||
//累加好的数据存入fcAll
|
||||
CuBonusStatisVO cuBonusStatisVO = new CuBonusStatisVO();
|
||||
cuBonusStatisVO.setStartDate(startDate);
|
||||
cuBonusStatisVO.setEndDate(endDate);
|
||||
cuBonusStatisVO.setPkCountry(con.getPkCountry());
|
||||
//查询国外奖金
|
||||
List<CuBonusStatisVO> bsList = queryForeignCountryBonus(cuBonusStatisVO);
|
||||
Map<Date, List<CuBonusStatisVO>> bsListMap = bsList.stream()
|
||||
.collect(Collectors.groupingBy(CuBonusStatisVO::getCreationTime));
|
||||
if (CollectionUtil.isNotEmpty(bsList)) {
|
||||
for (Map.Entry<Date, List<CuBonusStatisVO>> entry : bsListMap.entrySet()) {
|
||||
CuBonusStatisVO oldSo1 = new CuBonusStatisVO();
|
||||
for (CuBonusStatisVO cb : entry.getValue()) {
|
||||
if (con.getPkCountry().equals(cb.getPkCountry())) {
|
||||
oldSo1 = addFcAchieve(oldSo1, cb);
|
||||
}
|
||||
}
|
||||
if (oldSo1.getPkCountry() != null) {
|
||||
fcAll.add(oldSo1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//存入订单信息
|
||||
saveBonusStatis(soAll);
|
||||
//存入国内奖金信息
|
||||
saveBonusStatisAchieve(acAll);
|
||||
//存入国外奖金信息
|
||||
saveForeignCountryBonus(fcAll);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计表数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/11 16:04
|
||||
* @param: []
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
@Override
|
||||
public Boolean delStatis(String startDate, String endDate) {
|
||||
|
@ -721,72 +486,22 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
|
||||
/**
|
||||
* @description: 查询奖金扣项配置参数
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/15 14:01
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisVO> bonusDeductlist(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.bonusDeductlist(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询分红比例配置
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 17:04
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisVO> bonusDividendRatiolist(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.bonusDividendRatiolist(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询国外奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/28 14:12
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisVO> queryForeignCountryBonus(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.queryForeignCountryBonus(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询中国奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/8 11:06
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisVO> queryChinaCountryBonus(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.queryChinaCountryBonus(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询生效国外国家列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/21 16:10
|
||||
* @param: [cuBonusStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisVO> countrylist(CuBonusStatisVO cuBonusStatisVO) {
|
||||
return baseMapper.countrylist(cuBonusStatisVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询有效体系
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:37
|
||||
* @param: []
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusStatisVO> vertexList() {
|
||||
|
|
|
@ -29,9 +29,6 @@ import java.util.stream.Collectors;
|
|||
|
||||
/**
|
||||
* 奖金拨比零线统计 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-08-12
|
||||
*/
|
||||
@Service
|
||||
public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexStatisMapper, CuBonusVertexStatis> implements ICuBonusVertexStatisService {
|
||||
|
@ -41,10 +38,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 通过日期范围,返回范围内每天的日期
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 10:44
|
||||
* @param: [startDate, endDate]
|
||||
* @return: java.util.List<java.lang.String>
|
||||
**/
|
||||
public static List<String> getDatesInRange(String startDate, String endDate) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
@ -61,10 +54,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 7天重算顶点奖金拨比统计
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 9:39
|
||||
* @param: [startDate, endDate]
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
@ -145,10 +134,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计表数据
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/13 9:23
|
||||
* @param: [startDate, endDate]
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
@Override
|
||||
public Boolean delStatis(String startDate, String endDate, List<Integer> pkVertexList) {
|
||||
|
@ -157,10 +142,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 查询奖金扣项配置参数
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/15 14:01
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusVertexStatisVO> bonusDeductlist(CuBonusVertexStatisVO cuBonusVertexStatisVO) {
|
||||
|
@ -169,10 +150,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/3 11:21
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusVertexStatisVO> queryCuBonusStatis(CuBonusVertexStatisVO cuBonusVertexStatisVO) {
|
||||
|
@ -181,10 +158,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 查询顶点奖金拨比汇总
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/19 15:18
|
||||
* @param: [cuBonusVertexStatisTotalVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusVertexStatisTotalVO> queryCuBonusStatisTotal(CuBonusVertexStatisTotalVO cuBonusVertexStatisTotalVO) {
|
||||
|
@ -193,10 +166,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 顶点奖金拨比汇总查询总和
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/23 13:23
|
||||
* @param: [cuBonusVertexStatisTotalVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusVertexStatisTotalVO queryCuBonusStatisSum(CuBonusVertexStatisTotalVO cuBonusVertexStatisTotalVO) {
|
||||
|
@ -206,10 +175,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 查询时间内奖金拨比顶点会员
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/20 14:12
|
||||
* @param: [cuBonusVertexStatisTotalVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisTotalVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusVertexStatisTotalVO> queryCuBonusVertex(CuBonusVertexStatisTotalVO cuBonusVertexStatisTotalVO) {
|
||||
|
@ -218,10 +183,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 查询能量舱订单金额
|
||||
* @author: zhang jing
|
||||
* @date: 2024/7/1 10:52
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusVertexStatisVO> queryEnergyChamberOrderList(CuBonusVertexStatisVO cuBonusVertexStatisVO) {
|
||||
|
@ -236,10 +197,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 查询顶点拓展封顶人数
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/20 16:17
|
||||
* @param: [cuBonusVertexStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusVertexStatisTotalVO queryOrgTopNumber(CuBonusVertexStatisVO cuBonusVertexStatisVO) {
|
||||
|
@ -248,10 +205,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 查询顶点拓展平均碰次和拓展最高碰次
|
||||
* @author: zhang jing
|
||||
* @date: 2024/9/20 16:17
|
||||
* @param: [cuBonusVertexStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusVertexStatisTotalVO queryTouch(CuBonusVertexStatisVO cuBonusVertexStatisVO) {
|
||||
|
@ -261,10 +214,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 奖金拨比列表统计小计(最后一行)
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/13 9:21
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: com.hzs.member.statis.vo.CuBonusVertexStatisVO
|
||||
**/
|
||||
@Override
|
||||
public CuBonusVertexStatisVO queryCuBonusSumStatis(CuBonusVertexStatisVO cuBonusVertexStatisVO) {
|
||||
|
@ -280,30 +229,41 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
oldBon.setPkTeamCode(newBon.getPkTeamCode());
|
||||
|
||||
switch (EBonusItems.getEnumByValue(newBon.getBonusType())) {
|
||||
// 首购 3,4,5,7
|
||||
// 首购
|
||||
case DIRECT_INCOME:
|
||||
// 直推收益
|
||||
oldBon.setIntroduceBonus(addOrInitializeAmount(oldBon.getIntroduceBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case EXPANSION_INCOME:
|
||||
// 拓展收益
|
||||
oldBon.setOrgBonus(addOrInitializeAmount(oldBon.getOrgBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case COACHING_INCOME:
|
||||
// 辅导收益
|
||||
oldBon.setLeaderBonus(addOrInitializeAmount(oldBon.getLeaderBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case SERVICE_SUBSIDIES:
|
||||
// 服务补贴
|
||||
oldBon.setServiceBonus(addOrInitializeAmount(oldBon.getServiceBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
//复购 8,9,12,24,20,21,1
|
||||
// 复购
|
||||
case REPURCHASE_RANGE_INCOME:
|
||||
// 复购级差
|
||||
oldBon.setRepurRangeBonus(addOrInitializeAmount(oldBon.getRepurRangeBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case CONSUMPTION_EXPANSION_INCOME:
|
||||
// 消费拓展收益
|
||||
oldBon.setRepurOrgBonus(addOrInitializeAmount(oldBon.getRepurOrgBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case REPURCHASE_COACHING_INCOME:
|
||||
// 复购辅导收益
|
||||
oldBon.setRepurLeaderBonus(addOrInitializeAmount(oldBon.getRepurLeaderBonus(), newBon.getRealIncome(), 2));
|
||||
case REPURCHASE_COUPONS:
|
||||
// 复购券
|
||||
oldBon.setRepurCouponSubtotal(addOrInitializeAmount(oldBon.getRepurCouponSubtotal(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case HELP_EACH_INCOME:
|
||||
// 复购直推收益
|
||||
oldBon.setRepurPushIncome(addOrInitializeAmount(oldBon.getRepurPushIncome(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
// //创客空间
|
||||
|
@ -313,30 +273,26 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
// case MAKER_SHARE:
|
||||
// oldBon.setMakerShare(addOrInitializeAmount(oldBon.getMakerShare(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
//云代
|
||||
case CLOUD_AGENT_DIRECT_PUSH:
|
||||
oldBon.setAgentIntroduceBonus(addOrInitializeAmount(oldBon.getAgentIntroduceBonus(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case CLOUD_AGENT_FIRST_PURCHASE:
|
||||
oldBon.setCloudAgentFirstPurchase(addOrInitializeAmount(oldBon.getCloudAgentFirstPurchase(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
case CLOUD_AGENT_REPURCHASE:
|
||||
oldBon.setCloudAgentRepurchase(addOrInitializeAmount(oldBon.getCloudAgentRepurchase(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
//嗨粉直推收益
|
||||
case HI_PINK:
|
||||
oldBon.setHiFunIncome(addOrInitializeAmount(oldBon.getHiFunIncome(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
// //云代
|
||||
// case CLOUD_AGENT_DIRECT_PUSH:
|
||||
// oldBon.setAgentIntroduceBonus(addOrInitializeAmount(oldBon.getAgentIntroduceBonus(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// case CLOUD_AGENT_FIRST_PURCHASE:
|
||||
// oldBon.setCloudAgentFirstPurchase(addOrInitializeAmount(oldBon.getCloudAgentFirstPurchase(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// case CLOUD_AGENT_REPURCHASE:
|
||||
// oldBon.setCloudAgentRepurchase(addOrInitializeAmount(oldBon.getCloudAgentRepurchase(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// //嗨粉直推收益
|
||||
// case HI_PINK:
|
||||
// oldBon.setHiFunIncome(addOrInitializeAmount(oldBon.getHiFunIncome(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
}
|
||||
return oldBon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询生效国外国家列表
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/21 16:10
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusVertexStatisVO> countrylist(CuBonusVertexStatisVO cuBonusVertexStatisVO) {
|
||||
|
@ -345,10 +301,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 查询有效顶点
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:37
|
||||
* @param: []
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusVertexStatisVO> vertexList(Integer pkVertex) {
|
||||
|
@ -358,10 +310,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
|
||||
/**
|
||||
* @description: 累加订单金额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/22 9:50
|
||||
* @param: [so, type]
|
||||
* @return: void
|
||||
**/
|
||||
private CuBonusVertexStatisVO addOrderAmount(CuBonusVertexStatisVO oldSo, Integer pkCountry, Integer pkVertex, List<CuBonusVertexStatisVO> orachList, int type) {
|
||||
for (CuBonusVertexStatisVO newSo : orachList) {
|
||||
|
@ -379,32 +327,39 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
switch (EOrderType.getEnumByValue(newSo.getOrderType())) {
|
||||
// 首购
|
||||
case REGISTER_ORDER:
|
||||
// 注册订单
|
||||
oldSo.setMainRegAmount(addOrInitializeAmount(oldSo.getMainRegAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setMainRegPv(addOrInitializeAmount(oldSo.getMainRegPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case UPGRADE_ORDER:
|
||||
// 升级订单
|
||||
oldSo.setMainUpAmount(addOrInitializeAmount(oldSo.getMainUpAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setMainUpPv(addOrInitializeAmount(oldSo.getMainUpPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case SPECIAL_REGISTER_ORDER:
|
||||
// 乐学注册订单
|
||||
oldSo.setSpecialRegisterAmount(addOrInitializeAmount(oldSo.getSpecialRegisterAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setSpecialRegisterPv(addOrInitializeAmount(oldSo.getSpecialRegisterPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case SPECIAL_UPGRADE_ORDER:
|
||||
// 乐学升级订单
|
||||
oldSo.setSpecialUpgradeAmount(addOrInitializeAmount(oldSo.getSpecialUpgradeAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setSpecialUpgradePv(addOrInitializeAmount(oldSo.getSpecialUpgradePv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
// 复购 3 12 14 18 19 22 26 28 13 31 10
|
||||
// 复购
|
||||
case REPURCHASE_ORDER:
|
||||
case CONSUME_ORDER:
|
||||
// 复购订单、重消订单
|
||||
oldSo.setMainRepurAmount(addOrInitializeAmount(oldSo.getMainRepurAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setMainRepurPv(addOrInitializeAmount(oldSo.getMainRepurPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case SPECIAL_REPURCHASE_ORDER:
|
||||
// 乐学复购订单
|
||||
oldSo.setSpecialRepurchaseAmount(addOrInitializeAmount(oldSo.getSpecialRepurchaseAmount(), newSo.getOrderAmount(), type));
|
||||
oldSo.setSpecialRepurchasePv(addOrInitializeAmount(oldSo.getSpecialRepurchasePv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
case WELFARE_ORDER:
|
||||
// 福利订单
|
||||
oldSo.setWelfareOrder(addOrInitializeAmount(oldSo.getWelfareOrder(), newSo.getOrderAmount(), type));
|
||||
oldSo.setWelfareOrderPv(addOrInitializeAmount(oldSo.getWelfareOrderPv(), newSo.getOrderAchieve(), type));
|
||||
break;
|
||||
|
@ -434,31 +389,28 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
bs.setServiceBonus(cb.getServiceBonus());
|
||||
bs.setRepurRangeBonus(cb.getRepurRangeBonus());
|
||||
bs.setRepurOrgBonus(cb.getRepurOrgBonus());
|
||||
bs.setRepurLeaderBonus(cb.getRepurLeaderBonus());
|
||||
bs.setRepurPushIncome(cb.getRepurPushIncome());
|
||||
//嗨粉直推收益
|
||||
bs.setHiFunIncome(cb.getHiFunIncome());
|
||||
bs.setMakerDirect(cb.getMakerDirect());
|
||||
bs.setMakerShare(cb.getMakerShare());
|
||||
if (28 == cb.getPkVertex()) {
|
||||
System.out.println(cb.getPkVertex());
|
||||
}
|
||||
|
||||
// 查询数据库判断记录是否存在
|
||||
List<CuBonusVertexStatis> existingRecord = getCuBonusStatis(bs);
|
||||
if (CollectionUtil.isEmpty(existingRecord)) {
|
||||
baseMapper.insert(bs); // 不存在则插入新记录
|
||||
// 不存在则插入新记录
|
||||
baseMapper.insert(bs);
|
||||
} else {
|
||||
bs.setPkId(existingRecord.get(0).getPkId()); // 设置主键ID
|
||||
baseMapper.updateById(bs); // 存在则更新记录
|
||||
// 设置主键ID
|
||||
bs.setPkId(existingRecord.get(0).getPkId());
|
||||
// 存在则更新记录
|
||||
baseMapper.updateById(bs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 保存奖金拨比订单数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/14 14:44
|
||||
* @param: [so, type]
|
||||
* @return: void
|
||||
**/
|
||||
private void saveBonusStatis(List<CuBonusVertexStatisVO> soList) {
|
||||
for (CuBonusVertexStatisVO so : soList) {
|
||||
|
@ -489,88 +441,54 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
bs.setMakerOrder(so.getMakerOrder());
|
||||
bs.setWelfareOrder(so.getWelfareOrder());
|
||||
|
||||
/**
|
||||
* 注册新增PV
|
||||
*/
|
||||
// 注册新增PV
|
||||
bs.setMainRegPv(so.getMainRegPv());
|
||||
/**
|
||||
* 升级新增PV
|
||||
*/
|
||||
// 升级新增PV
|
||||
bs.setMainUpPv(so.getMainUpPv());
|
||||
/**
|
||||
*复购新增PV
|
||||
*/
|
||||
bs.setMainRepurPv(so.getMainRepurPv());
|
||||
/**
|
||||
*特殊注册PV
|
||||
*/
|
||||
//特殊注册PV
|
||||
bs.setSpecialRegisterPv(so.getSpecialRegisterPv());
|
||||
/**
|
||||
*特殊升级PV
|
||||
*/
|
||||
// 特殊升级PV
|
||||
bs.setSpecialUpgradePv(so.getSpecialUpgradePv());
|
||||
/**
|
||||
*特殊复购PV
|
||||
*/
|
||||
// 特殊复购PV
|
||||
bs.setSpecialRepurchasePv(so.getSpecialRepurchasePv());
|
||||
/**
|
||||
*虚拟订单PV
|
||||
*/
|
||||
// 虚拟订单PV
|
||||
bs.setFictitiousPv(so.getFictitiousPv());
|
||||
/**
|
||||
*嗨粉注册PV
|
||||
*/
|
||||
// 嗨粉注册PV
|
||||
bs.setHifansRegPv(so.getHifansRegPv());
|
||||
/**
|
||||
*海粉升级PV
|
||||
*/
|
||||
// 海粉升级PV
|
||||
bs.setHaiFunUpgradePv(so.getHaiFunUpgradePv());
|
||||
/**
|
||||
*云学院订单PV
|
||||
*/
|
||||
// 云学院订单PV
|
||||
bs.setCloudCollegePv(so.getCloudCollegePv());
|
||||
/**
|
||||
*直播订单PV
|
||||
*/
|
||||
// 直播订单PV
|
||||
bs.setMallPv(so.getMallPv());
|
||||
/**
|
||||
*赋能礼包PV
|
||||
*/
|
||||
// 赋能礼包PV
|
||||
bs.setEmpowermentGiftPv(so.getEmpowermentGiftPv());
|
||||
/**
|
||||
*合作订单PV
|
||||
*/
|
||||
// 合作订单PV
|
||||
bs.setCooperatePv(so.getCooperatePv());
|
||||
/**
|
||||
*创客订单PV
|
||||
*/
|
||||
// 创客订单PV
|
||||
bs.setMakerOrderPv(so.getMakerOrderPv());
|
||||
/**
|
||||
*创客礼包PV
|
||||
*/
|
||||
// 创客礼包PV
|
||||
bs.setMakerGiftPv(so.getMakerGiftPv());
|
||||
/**
|
||||
*福利专区PV
|
||||
*/
|
||||
// 福利专区PV
|
||||
bs.setWelfareOrderPv(so.getWelfareOrderPv());
|
||||
|
||||
// 查询数据库判断记录是否存在
|
||||
List<CuBonusVertexStatis> existingRecord = getCuBonusStatis(bs);
|
||||
if (CollectionUtil.isEmpty(existingRecord)) {
|
||||
baseMapper.insert(bs); // 不存在则插入新记录
|
||||
// 不存在则插入新记录
|
||||
baseMapper.insert(bs);
|
||||
} else {
|
||||
bs.setPkId(existingRecord.get(0).getPkId()); // 设置主键ID
|
||||
baseMapper.updateById(bs); // 存在则更新记录
|
||||
// 设置主键ID
|
||||
bs.setPkId(existingRecord.get(0).getPkId());
|
||||
// 存在则更新记录
|
||||
baseMapper.updateById(bs);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询中国奖金
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/8 11:06
|
||||
* @param: [CuBonusVertexStatisVO]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.CuBonusVertexStatisVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuBonusVertexStatisVO> queryChinaCountryBonus(CuBonusVertexStatisVO cuBonusVertexStatisVO) {
|
||||
|
@ -594,13 +512,8 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description:查询当天顶点统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/1 11:17
|
||||
* @param: [CuBonusVertexStatis]
|
||||
* @return: com.hzs.common.domain.member.statis.CuBonusVertexStatis
|
||||
**/
|
||||
public List<CuBonusVertexStatis> getCuBonusStatis(CuBonusVertexStatis CuBonusVertexStatis) {
|
||||
return baseMapper.getCuBonusStatis(CuBonusVertexStatis);
|
||||
|
|
|
@ -10,11 +10,9 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 奖金拨比统计
|
||||
* 每个团队,每天一条数据
|
||||
* 数据来自 订单表和 CU_MEMBER_BONUS 会员奖金-会员奖金汇总表
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-05-31
|
||||
|
@ -278,6 +276,12 @@ public class CuBonusStatisVO {
|
|||
@Excel(name = "复购拓展收益(¥)", scale = 2)
|
||||
@BigDecimalFormat
|
||||
private BigDecimal repurOrgBonus = BigDecimal.ZERO;
|
||||
/**
|
||||
* 复购辅导收益(¥)
|
||||
*/
|
||||
@Excel(name = "复购辅导收益(¥)", scale = 2)
|
||||
@BigDecimalFormat
|
||||
private BigDecimal repurLeaderBonus = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* (直推收益+拓展收益+辅导收益+分红收益+报单收益(服务补贴))*0.8+创客空间3000元的店补+1万里面的2000元直推奖=实际拨出之和。
|
||||
|
|
|
@ -279,6 +279,12 @@ public class CuBonusVertexStatisVO {
|
|||
@Excel(name = "复购拓展收益(¥)", scale = 2)
|
||||
@BigDecimalFormat
|
||||
private BigDecimal repurOrgBonus = BigDecimal.ZERO;
|
||||
/**
|
||||
* 复购辅导收益(¥)
|
||||
*/
|
||||
@Excel(name = "复购辅导收益(¥)", scale = 2)
|
||||
@BigDecimalFormat
|
||||
private BigDecimal repurLeaderBonus = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 海粉直推收益(海粉推荐收益)(%)
|
||||
|
|
|
@ -2,69 +2,4 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzs.member.attest.mapper.CuEnergySiloDetailMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="CuEnergySiloDetail" type="com.hzs.common.domain.member.ext.CuEnergySiloDetailExt">
|
||||
<id column="PK_ID" property="pkId" />
|
||||
<result column="DEL_FLAG" property="delFlag" />
|
||||
<result column="PK_CREATOR" property="pkCreator" />
|
||||
<result column="CREATION_TIME" property="creationTime" />
|
||||
<result column="PK_MODIFIED" property="pkModified" />
|
||||
<result column="MODIFIED_TIME" property="modifiedTime" />
|
||||
<result column="PK_COUNTRY" property="pkCountry" />
|
||||
<result column="PK_ENERGY_SILO" property="pkEnergySilo" />
|
||||
<result column="PK_PARENT" property="pkParent" />
|
||||
<result column="PK_MEMBER" property="pkMember" />
|
||||
<result column="BUY_DATE" property="buyDate" />
|
||||
<result column="PK_ORDER" property="pkOrder" />
|
||||
<result column="BUY_NUM" property="buyNum" />
|
||||
<result column="GIFT_BUY_NUM" property="giftBuyNum" />
|
||||
<result column="MEMBER_CODE" property="memberCode" />
|
||||
<result column="MEMBER_NAME" property="memberName" />
|
||||
<result column="PHONE" property="phone" />
|
||||
<result column="AWARDS_NAME" property="awardsName" />
|
||||
<result column="GRADE_NAME" property="gradeName" />
|
||||
<result column="BUY_DATE" property="buyDate" />
|
||||
</resultMap>
|
||||
<select id="queryEnergySiloDetailByCondition" resultMap="CuEnergySiloDetail">
|
||||
select su.member_code,su.member_name,su.phone,bg.grade_name,ba.awards_name,pk_energy_silo,
|
||||
buy_num,gift_buy_num,bs.buy_date
|
||||
from cu_energy_silo be
|
||||
inner join cu_energy_silo_detail bs
|
||||
on be.pk_id = bs.pk_energy_silo
|
||||
inner join cu_member su
|
||||
on bs.pk_member = su.pk_id
|
||||
left join bd_grade bg
|
||||
on su.pk_settle_grade = bg.pk_id
|
||||
left join bd_awards ba
|
||||
on su.pk_awards = ba.pk_id
|
||||
where bs.del_flag = 0
|
||||
and su.del_flag = 0
|
||||
and bs.pk_country = #{pkCountry}
|
||||
<if test="pkId != null">
|
||||
and bs.pk_energy_silo = #{pkId}
|
||||
</if>
|
||||
<if test="pkMember != null">
|
||||
and be.pk_member = #{pkMember}
|
||||
</if>
|
||||
<if test="memberCode != null and memberCode != ''">
|
||||
and su.member_code = #{memberCode}
|
||||
</if>
|
||||
<if test="memberName != null and memberName !=''">
|
||||
and su.member_name = #{memberName}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and su.phone = #{phone}
|
||||
</if>
|
||||
<if test="pkAwards != null">
|
||||
and su.pk_awards=#{pkAwards}
|
||||
</if>
|
||||
|
||||
<if test="startDate != null">
|
||||
and bs.buy_date >=#{startDate, jdbcType = DATE}
|
||||
</if>
|
||||
<if test="startEndDate != null">
|
||||
and bs.buy_date < #{startEndDate, jdbcType = DATE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -1377,18 +1377,6 @@
|
|||
order by mbp.ROUND asc ,mbp.SECOND asc
|
||||
</select>
|
||||
|
||||
<select id="selectByTreeMemberList" resultMap="MemberVO">
|
||||
select t.*
|
||||
from CU_MEMBER t
|
||||
where level < 5
|
||||
and t.DEL_FLAG = 0
|
||||
start
|
||||
with t.PK_PLACE_PARENT = #{memberId}
|
||||
connect by t.PK_PLACE_PARENT = prior t.PK_ID
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<!--特殊配置-修改结算国列表-->
|
||||
<select id="upseCountryList" parameterType="com.hzs.member.base.vo.UpdateSettleCountryVO"
|
||||
resultType="com.hzs.member.base.vo.UpdateSettleCountryVO">
|
||||
|
|
|
@ -4,74 +4,66 @@
|
|||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.member.statis.CuBonusVertexStatis">
|
||||
<id column="PK_ID" property="pkId" />
|
||||
<result column="CREATION_TIME" property="creationTime" />
|
||||
<result column="PK_COUNTRY" property="pkCountry" />
|
||||
<result column="DEL_FLAG" property="delFlag" />
|
||||
<result column="STATIS_TYPE" property="statisType" />
|
||||
<result column="PERIOD" property="period" />
|
||||
<result column="START_DATE" property="startDate" />
|
||||
<result column="END_DATE" property="endDate" />
|
||||
<result column="MAIN_REG_AMOUNT" property="mainRegAmount" />
|
||||
<result column="MAIN_UP_AMOUNT" property="mainUpAmount" />
|
||||
<result column="MAIN_REPUR_AMOUNT" property="mainRepurAmount" />
|
||||
<result column="HIFANS_REG_AMOUNT" property="hifansRegAmount" />
|
||||
<result column="INTRODUCE_BONUS" property="introduceBonus" />
|
||||
<result column="ORG_BONUS" property="orgBonus" />
|
||||
<result column="LEADER_BONUS" property="leaderBonus" />
|
||||
<result column="SHARE_BONUS" property="shareBonus" />
|
||||
<result column="SERVICE_BONUS" property="serviceBonus" />
|
||||
<result column="HI_FUN_INCOME" property="hiFunIncome" />
|
||||
<result column="REPUR_RANGE_BONUS" property="repurRangeBonus" />
|
||||
<result column="REPUR_ORG_BONUS" property="repurOrgBonus" />
|
||||
<result column="MAIN_BONUS" property="mainBonus" />
|
||||
<result column="REPUR_BONUS" property="repurBonus" />
|
||||
<result column="PK_BD_VERTEX" property="pkBdVertex" />
|
||||
<result column="PK_TEAM_CODE" property="pkTeamCode" />
|
||||
<result column="HAI_FUN_INCOME" property="haiFunIncome" />
|
||||
<result column="GIFT_ORDER" property="giftOrder" />
|
||||
<result column="SPECIAL_REGISTER_AMOUNT" property="specialRegisterAmount" />
|
||||
<result column="SPECIAL_UPGRADE_AMOUNT" property="specialUpgradeAmount" />
|
||||
<result column="CLOUD_COLLEGE_AMOUNT" property="cloudCollegeAmount" />
|
||||
<result column="MALL_AMOUNT" property="mallAmount" />
|
||||
<result column="MAKER_GIFT_AMOUNT" property="makerGiftAmount" />
|
||||
<result column="EMPOWERMENT_GIFT_AMOUNT" property="empowermentGiftAmount" />
|
||||
<result column="COOPERATE_AMOUNT" property="cooperateAmount" />
|
||||
<result column="SPECIAL_REPURCHASE_AMOUNT" property="specialRepurchaseAmount" />
|
||||
<result column="HAI_FUN_UPGRADE_AMOUNT" property="haiFunUpgradeAmount" />
|
||||
<result column="REPUR_PUSH_INCOME" property="repurPushIncome" />
|
||||
<result column="MAKER_DIRECT" property="makerDirect" />
|
||||
<result column="MAKER_SHARE" property="makerShare" />
|
||||
<result column="THIRD_ORDER" property="thirdOrder" />
|
||||
<result column="FICTITIOUS_AMOUNT" property="fictitiousAmount" />
|
||||
<result column="MAKER_ORDER" property="makerOrder" />
|
||||
<result column="WELFARE_ORDER" property="welfareOrder" />
|
||||
<result column="MAIN_REG_PV" property="mainRegPv" />
|
||||
<result column="MAIN_UP_PV" property="mainUpPv" />
|
||||
<result column="MAIN_REPUR_PV" property="mainRepurPv" />
|
||||
<result column="SPECIAL_REGISTER_PV" property="specialRegisterPv" />
|
||||
<result column="SPECIAL_UPGRADE_PV" property="specialUpgradePv" />
|
||||
<result column="SPECIAL_REPURCHASE_PV" property="specialRepurchasePv" />
|
||||
<result column="FICTITIOUS_PV" property="fictitiousPv" />
|
||||
<result column="HIFANS_REG_PV" property="hifansRegPv" />
|
||||
<result column="HAI_FUN_UPGRADE_PV" property="haiFunUpgradePv" />
|
||||
<result column="CLOUD_COLLEGE_PV" property="cloudCollegePv" />
|
||||
<result column="MALL_PV" property="mallPv" />
|
||||
<result column="EMPOWERMENT_GIFT_PV" property="empowermentGiftPv" />
|
||||
<result column="COOPERATE_PV" property="cooperatePv" />
|
||||
<result column="MAKER_ORDER_PV" property="makerOrderPv" />
|
||||
<result column="MAKER_GIFT_PV" property="makerGiftPv" />
|
||||
<result column="WELFARE_ORDER_PV" property="welfareOrderPv" />
|
||||
<id column="PK_ID" property="pkId"/>
|
||||
<result column="CREATION_TIME" property="creationTime"/>
|
||||
<result column="PK_COUNTRY" property="pkCountry"/>
|
||||
<result column="DEL_FLAG" property="delFlag"/>
|
||||
<result column="STATIS_TYPE" property="statisType"/>
|
||||
<result column="PERIOD" property="period"/>
|
||||
<result column="START_DATE" property="startDate"/>
|
||||
<result column="END_DATE" property="endDate"/>
|
||||
<result column="MAIN_REG_AMOUNT" property="mainRegAmount"/>
|
||||
<result column="MAIN_UP_AMOUNT" property="mainUpAmount"/>
|
||||
<result column="MAIN_REPUR_AMOUNT" property="mainRepurAmount"/>
|
||||
<result column="HIFANS_REG_AMOUNT" property="hifansRegAmount"/>
|
||||
<result column="INTRODUCE_BONUS" property="introduceBonus"/>
|
||||
<result column="ORG_BONUS" property="orgBonus"/>
|
||||
<result column="LEADER_BONUS" property="leaderBonus"/>
|
||||
<result column="SHARE_BONUS" property="shareBonus"/>
|
||||
<result column="SERVICE_BONUS" property="serviceBonus"/>
|
||||
<result column="HI_FUN_INCOME" property="hiFunIncome"/>
|
||||
<result column="REPUR_RANGE_BONUS" property="repurRangeBonus"/>
|
||||
<result column="REPUR_ORG_BONUS" property="repurOrgBonus"/>
|
||||
<result column="MAIN_BONUS" property="mainBonus"/>
|
||||
<result column="REPUR_BONUS" property="repurBonus"/>
|
||||
<result column="PK_BD_VERTEX" property="pkBdVertex"/>
|
||||
<result column="PK_TEAM_CODE" property="pkTeamCode"/>
|
||||
<result column="HAI_FUN_INCOME" property="haiFunIncome"/>
|
||||
<result column="GIFT_ORDER" property="giftOrder"/>
|
||||
<result column="SPECIAL_REGISTER_AMOUNT" property="specialRegisterAmount"/>
|
||||
<result column="SPECIAL_UPGRADE_AMOUNT" property="specialUpgradeAmount"/>
|
||||
<result column="CLOUD_COLLEGE_AMOUNT" property="cloudCollegeAmount"/>
|
||||
<result column="MALL_AMOUNT" property="mallAmount"/>
|
||||
<result column="MAKER_GIFT_AMOUNT" property="makerGiftAmount"/>
|
||||
<result column="EMPOWERMENT_GIFT_AMOUNT" property="empowermentGiftAmount"/>
|
||||
<result column="COOPERATE_AMOUNT" property="cooperateAmount"/>
|
||||
<result column="SPECIAL_REPURCHASE_AMOUNT" property="specialRepurchaseAmount"/>
|
||||
<result column="HAI_FUN_UPGRADE_AMOUNT" property="haiFunUpgradeAmount"/>
|
||||
<result column="REPUR_PUSH_INCOME" property="repurPushIncome"/>
|
||||
<result column="MAKER_DIRECT" property="makerDirect"/>
|
||||
<result column="MAKER_SHARE" property="makerShare"/>
|
||||
<result column="THIRD_ORDER" property="thirdOrder"/>
|
||||
<result column="FICTITIOUS_AMOUNT" property="fictitiousAmount"/>
|
||||
<result column="MAKER_ORDER" property="makerOrder"/>
|
||||
<result column="WELFARE_ORDER" property="welfareOrder"/>
|
||||
<result column="MAIN_REG_PV" property="mainRegPv"/>
|
||||
<result column="MAIN_UP_PV" property="mainUpPv"/>
|
||||
<result column="MAIN_REPUR_PV" property="mainRepurPv"/>
|
||||
<result column="SPECIAL_REGISTER_PV" property="specialRegisterPv"/>
|
||||
<result column="SPECIAL_UPGRADE_PV" property="specialUpgradePv"/>
|
||||
<result column="SPECIAL_REPURCHASE_PV" property="specialRepurchasePv"/>
|
||||
<result column="FICTITIOUS_PV" property="fictitiousPv"/>
|
||||
<result column="HIFANS_REG_PV" property="hifansRegPv"/>
|
||||
<result column="HAI_FUN_UPGRADE_PV" property="haiFunUpgradePv"/>
|
||||
<result column="CLOUD_COLLEGE_PV" property="cloudCollegePv"/>
|
||||
<result column="MALL_PV" property="mallPv"/>
|
||||
<result column="EMPOWERMENT_GIFT_PV" property="empowermentGiftPv"/>
|
||||
<result column="COOPERATE_PV" property="cooperatePv"/>
|
||||
<result column="MAKER_ORDER_PV" property="makerOrderPv"/>
|
||||
<result column="MAKER_GIFT_PV" property="makerGiftPv"/>
|
||||
<result column="WELFARE_ORDER_PV" property="welfareOrderPv"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
CREATION_TIME,
|
||||
PK_COUNTRY,
|
||||
DEL_FLAG,
|
||||
PK_ID, STATIS_TYPE, PERIOD, START_DATE, END_DATE, MAIN_REG_AMOUNT, MAIN_UP_AMOUNT, MAIN_REPUR_AMOUNT, HIFANS_REG_AMOUNT, INTRODUCE_BONUS, ORG_BONUS, LEADER_BONUS, SHARE_BONUS, SERVICE_BONUS, HI_FUN_INCOME, REPUR_RANGE_BONUS, REPUR_ORG_BONUS, MAIN_BONUS, REPUR_BONUS, PK_BD_VERTEX, PK_TEAM_CODE, HAI_FUN_INCOME, GIFT_ORDER, SPECIAL_REGISTER_AMOUNT, SPECIAL_UPGRADE_AMOUNT, CLOUD_COLLEGE_AMOUNT, MALL_AMOUNT, MAKER_GIFT_AMOUNT, EMPOWERMENT_GIFT_AMOUNT, COOPERATE_AMOUNT, SPECIAL_REPURCHASE_AMOUNT, HAI_FUN_UPGRADE_AMOUNT, REPUR_PUSH_INCOME, MAKER_DIRECT, MAKER_SHARE, THIRD_ORDER, FICTITIOUS_AMOUNT, MAKER_ORDER, WELFARE_ORDER, MAIN_REG_PV, MAIN_UP_PV, MAIN_REPUR_PV, SPECIAL_REGISTER_PV, SPECIAL_UPGRADE_PV, SPECIAL_REPURCHASE_PV, FICTITIOUS_PV, HIFANS_REG_PV, HAI_FUN_UPGRADE_PV, CLOUD_COLLEGE_PV, MALL_PV, EMPOWERMENT_GIFT_PV, COOPERATE_PV, MAKER_ORDER_PV, MAKER_GIFT_PV, WELFARE_ORDER_PV
|
||||
</sql>
|
||||
|
||||
<!-- 奖金拨比列表-->
|
||||
<select id="queryCuBonusStatis" parameterType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO">
|
||||
|
@ -139,7 +131,6 @@
|
|||
</select>
|
||||
|
||||
|
||||
|
||||
<!-- 7天重算查询订单-->
|
||||
<select id="queryAnewSaOrderByLessDay" parameterType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO">
|
||||
|
@ -199,30 +190,27 @@
|
|||
</if>
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 查询有效顶点-->
|
||||
<select id="vertexList" parameterType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO">
|
||||
SELECT
|
||||
pk_id as pkVertex,
|
||||
MEMBER_CODE as memberCode,
|
||||
MEMBER_NAME as memberName
|
||||
FROM
|
||||
cu_member m
|
||||
WHERE
|
||||
m.pk_place_parent = 2
|
||||
AND m.del_flag = 0
|
||||
AND m.pk_country = 1
|
||||
AND m.category = 0
|
||||
AND m.pay_status =1
|
||||
AND m.SYSTEM_TYPE =1
|
||||
<if test="pkVertex!=null">
|
||||
AND m.pk_id=#{pkVertex}
|
||||
</if>
|
||||
|
||||
SELECT
|
||||
pk_id as pkVertex,
|
||||
MEMBER_CODE as memberCode,
|
||||
MEMBER_NAME as memberName
|
||||
FROM
|
||||
cu_member m
|
||||
WHERE
|
||||
m.pk_place_parent = 2
|
||||
AND m.del_flag = 0
|
||||
AND m.pk_country = 1
|
||||
AND m.category = 0
|
||||
AND m.pay_status =1
|
||||
AND m.SYSTEM_TYPE =1
|
||||
<if test="pkVertex!=null">
|
||||
AND m.pk_id=#{pkVertex}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询中国奖金-->
|
||||
<select id="queryChinaCountryBonus" parameterType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO">
|
||||
|
@ -234,7 +222,8 @@
|
|||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_push mbp
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbp.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY pk_place_parent = PRIOR pk_id ) cm
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY
|
||||
pk_place_parent = PRIOR pk_id ) cm
|
||||
on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbp.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbp.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
|
@ -259,7 +248,8 @@
|
|||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS_EXPAND mbe
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbe.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY pk_place_parent = PRIOR pk_id ) cm
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY
|
||||
pk_place_parent = PRIOR pk_id ) cm
|
||||
on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbe.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbe.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
|
@ -284,7 +274,8 @@
|
|||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS_COACH mbc
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbc.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY pk_place_parent = PRIOR pk_id ) cm
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY
|
||||
pk_place_parent = PRIOR pk_id ) cm
|
||||
on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbc.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbc.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
|
@ -309,7 +300,8 @@
|
|||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_range mbr
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbr.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY pk_place_parent = PRIOR pk_id ) cm
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY
|
||||
pk_place_parent = PRIOR pk_id ) cm
|
||||
on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbr.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbr.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
|
@ -334,7 +326,8 @@
|
|||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_detail mbd
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbd.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY pk_place_parent = PRIOR pk_id ) cm
|
||||
INNER join ( SELECT cm.pk_id FROM cu_member cm WHERE del_flag = 0 AND category = 0 START WITH PK_PARENT =#{pkVertex} CONNECT BY
|
||||
pk_place_parent = PRIOR pk_id ) cm
|
||||
on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbd.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbd.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
|
@ -352,28 +345,25 @@
|
|||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
|
||||
</select>
|
||||
<!-- 查询7天重算奖金查询-->
|
||||
<!-- 查询7天重算奖金查询-->
|
||||
<select id="queryVertexChinaCountryBonus" parameterType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusLenjoyStatisVO">
|
||||
select
|
||||
1 pkCountry,
|
||||
sum(cmb.CLOUD_REAL_SUBTOTAL) realIncome,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(cmsp.SETTLE_DATE, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
select 1 pkCountry,
|
||||
sum(cmb.CLOUD_REAL_SUBTOTAL) realIncome,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(cmsp.SETTLE_DATE, 'yyyy-mm-dd'), 'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS cmb
|
||||
INNER join ( SELECT
|
||||
pk_member
|
||||
FROM
|
||||
${settleTableName}
|
||||
WHERE category=0
|
||||
start with pk_member = #{pkVertex}
|
||||
connect by PK_PARENT = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
INNER JOIN CU_MEMBER_SETTLE_PERIOD cmsp on cmsp.pk_id=cmb.PERIOD
|
||||
where cmb.DEL_FLAG=0
|
||||
and cmb.PERIOD=#{period}
|
||||
GROUP BY
|
||||
to_char(cmsp.SETTLE_DATE, 'yyyy-mm-dd')
|
||||
INNER join (SELECT pk_member
|
||||
FROM ${settleTableName}
|
||||
WHERE category = 0
|
||||
start
|
||||
with pk_member = #{pkVertex}
|
||||
connect by PK_PARENT = prior pk_member) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
INNER JOIN CU_MEMBER_SETTLE_PERIOD cmsp on cmsp.pk_id = cmb.PERIOD
|
||||
where cmb.DEL_FLAG = 0
|
||||
and cmb.PERIOD = #{period}
|
||||
GROUP BY to_char(cmsp.SETTLE_DATE, 'yyyy-mm-dd')
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
@ -2,59 +2,12 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzs.member.statis.mapper.CuBonusStatisMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.member.statis.CuBonusStatis">
|
||||
<id column="PK_ID" property="pkId"/>
|
||||
<result column="STATIS_TYPE" property="statisType"/>
|
||||
<result column="PERIOD" property="period"/>
|
||||
<result column="START_DATE" property="startDate"/>
|
||||
<result column="END_DATE" property="endDate"/>
|
||||
<result column="MAIN_REG_AMOUNT" property="mainRegAmount"/>
|
||||
<result column="MAIN_UP_AMOUNT" property="mainUpAmount"/>
|
||||
<result column="MAIN_REPUR_AMOUNT" property="mainRepurAmount"/>
|
||||
<result column="AGENT_REG_AMOUNT" property="agentRegAmount"/>
|
||||
<result column="AGENT_UP_AMOUNT" property="agentUpAmount"/>
|
||||
<result column="AGENT_REPUR_AMOUNT" property="agentRepurAmount"/>
|
||||
<result column="HIFANS_REG_AMOUNT" property="hifansRegAmount"/>
|
||||
<result column="TOTAL_AMOUNT" property="totalAmount"/>
|
||||
<result column="INTRODUCE_BONUS" property="introduceBonus"/>
|
||||
<result column="ORG_BONUS" property="orgBonus"/>
|
||||
<result column="LEADER_BONUS" property="leaderBonus"/>
|
||||
<result column="SHARE_BONUS" property="shareBonus"/>
|
||||
<result column="SERVICE_BONUS" property="serviceBonus"/>
|
||||
<result column="SEABEAN" property="seabean"/>
|
||||
<result column="REPUR_RANGE_BONUS" property="repurRangeBonus"/>
|
||||
<result column="SEABEAN_REPUR_RANGE" property="seabeanRepurRange"/>
|
||||
<result column="REPUR_ORG_BONUS" property="repurOrgBonus"/>
|
||||
<result column="AGENT_INTRODUCE_BONUS" property="agentIntroduceBonus"/>
|
||||
<result column="AGENT_AREA_BONUS" property="agentAreaBonus"/>
|
||||
<result column="MAIN_BONUS" property="mainBonus"/>
|
||||
<result column="REPUR_BONUS" property="repurBonus"/>
|
||||
<result column="TOTAL_BONUS" property="totalBonus"/>
|
||||
<result column="TOTAL_BONUS_REAL" property="totalBonusReal"/>
|
||||
<result column="PK_BD_VERTEX" property="pkBdVertex"/>
|
||||
<result column="PK_TEAM_CODE" property="pkTeamCode"/>
|
||||
<result column="CREATION_TIME" property="creationTime"/>
|
||||
<result column="PK_COUNTRY" property="pkCountry"/>
|
||||
<result column="HI_FUN_INCOME" property="hiFunIncome"/>
|
||||
<result column="GIFT_ORDER" property="giftOrder"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
PK_ID
|
||||
, STATIS_TYPE, PERIOD, START_DATE, END_DATE, MAIN_REG_AMOUNT, MAIN_UP_AMOUNT, MAIN_REPUR_AMOUNT, AGENT_REG_AMOUNT, AGENT_UP_AMOUNT, AGENT_REPUR_AMOUNT, HIFANS_REG_AMOUNT, TOTAL_AMOUNT, INTRODUCE_BONUS, INTRODUCE_BONUS_RATE, ORG_BONUS, ORG_BONUS_RATE, LEADER_BONUS, LEADER_BONUS_RATE, SHARE_BONUS, SHARE_BONUS_RATE, SERVICE_BONUS, SERVICE_BONUS_RATE, SEABEAN, REPUR_RANGE_BONUS, SEABEAN_REPUR_RANGE, REPUR_ORG_BONUS, AGENT_INTRODUCE_BONUS, AGENT_AREA_BONUS, MAIN_BONUS, MAIN_BONUS_RATE, REPUR_BONUS, REPUR_BONUS_RATE, TOTAL_BONUS, TOTAL_BONUS_RATE, TOTAL_BONUS_REAL, STATIS_SYS
|
||||
</sql>
|
||||
|
||||
<!-- 查询当天团队统计数据-->
|
||||
<select id="getCuBonusStatis" parameterType="com.hzs.common.domain.member.statis.CuBonusStatis"
|
||||
resultType="com.hzs.common.domain.member.statis.CuBonusStatis">
|
||||
SELECT *
|
||||
FROM
|
||||
CU_BONUS_STATIS a
|
||||
WHERE
|
||||
1=1
|
||||
FROM CU_BONUS_STATIS a
|
||||
WHERE 1 = 1
|
||||
<if test="pkBdVertex != null ">
|
||||
AND a.PK_BD_VERTEX = #{pkBdVertex}
|
||||
</if>
|
||||
|
@ -236,245 +189,8 @@
|
|||
and cbs.CREATION_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
ORDER BY cbs.CREATION_TIME asc
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询国外奖金拨比-->
|
||||
<select id="queryForeignCountryCuBonusStatis" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
SELECT
|
||||
cbs.PK_BD_VERTEX pkVertex,
|
||||
cbs.PK_TEAM_CODE pkTeamCode,
|
||||
ver.VERTEX_NAME as vertexName,
|
||||
ct.TEAM_NAME as teamName,
|
||||
cbs.PK_ID pkId,
|
||||
cbs.PERIOD period,
|
||||
cbs.MAIN_REG_AMOUNT mainRegAmount,
|
||||
cbs.MAIN_UP_AMOUNT mainUpAmount,
|
||||
cbs.MAIN_REPUR_AMOUNT mainRepurAmount,
|
||||
cbs.AGENT_UP_AMOUNT agentUpAmount,
|
||||
cbs.AGENT_REPUR_AMOUNT agentRepurAmount,
|
||||
cbs.HIFANS_REG_AMOUNT hifansRegAmount,
|
||||
cbs.TOTAL_AMOUNT totalAmount,
|
||||
cbs.INTRODUCE_BONUS introduceBonus,
|
||||
cbs.ORG_BONUS orgBonus,
|
||||
cbs.LEADER_BONUS leaderBonus,
|
||||
#{orderAchieve} shareBonus,
|
||||
cbs.SERVICE_BONUS serviceBonus,
|
||||
cbs.HI_FUN_INCOME hiFunIncome,
|
||||
cbs.REPUR_RANGE_BONUS repurRangeBonus,
|
||||
cbs.REPUR_ORG_BONUS repurOrgBonus,
|
||||
cbs.AGENT_INTRODUCE_BONUS agentIntroduceBonus,
|
||||
cbs.AGENT_REG_AMOUNT agentRegAmount,
|
||||
cbs.gift_order giftOrder,
|
||||
cbs.CREATION_TIME creationTime,
|
||||
cbs.PK_COUNTRY pkCountry,
|
||||
cbs.pur_real_subtotal purRealSubtotal,
|
||||
cbs.REPUR_REAL_SUBTOTAL repurRealSubtotal,
|
||||
CASE WHEN (cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*cbs.INTRODUCE_BONUS/(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end as introduceBonusRate,
|
||||
CASE WHEN (cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*cbs.ORG_BONUS/(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end as orgBonusRate,
|
||||
CASE WHEN (cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*cbs.LEADER_BONUS/(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end leaderBonusRate,
|
||||
CASE WHEN (cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*(#{orderAchieve})/(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end shareBonusRate,
|
||||
CASE WHEN (cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*cbs.SERVICE_BONUS/(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end serviceBonusRate,
|
||||
|
||||
CASE WHEN (cbs.MAIN_REPUR_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*cbs.REPUR_RANGE_BONUS/(cbs.MAIN_REPUR_AMOUNT),4) end as repurRangeBonusRate,
|
||||
|
||||
CASE WHEN (cbs.MAIN_REPUR_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*cbs.REPUR_ORG_BONUS/(cbs.MAIN_REPUR_AMOUNT),4) end as repurOrgBonusRate,
|
||||
|
||||
( cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT) AS firstPurchaseAll,
|
||||
|
||||
( cbs.MAIN_REPUR_AMOUNT) AS repurchaseAllAmount,
|
||||
|
||||
( cbs.AGENT_REG_AMOUNT + cbs.AGENT_UP_AMOUNT ) AS agentFirstAmount,
|
||||
|
||||
(cbs.INTRODUCE_BONUS + cbs.ORG_BONUS+cbs.LEADER_BONUS+
|
||||
cbs.SERVICE_BONUS+(#{orderAchieve})) AS mainBonus,
|
||||
|
||||
CASE WHEN (cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT) = 0
|
||||
THEN 0 ELSE ROUND (#{perCent}*#{backRatio}*(cbs.INTRODUCE_BONUS +
|
||||
cbs.ORG_BONUS+cbs.LEADER_BONUS+cbs.SERVICE_BONUS+
|
||||
(#{orderAchieve}))
|
||||
/ (cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end AS mainBonusRate,
|
||||
|
||||
CASE WHEN (cbs.MAIN_REG_PV+cbs.MAIN_UP_PV) = 0
|
||||
THEN 0 ELSE ROUND (#{perCent}*(cbs.INTRODUCE_BONUS +
|
||||
cbs.ORG_BONUS+cbs.LEADER_BONUS+cbs.SERVICE_BONUS+(#{orderAchieve}))
|
||||
/#{rate}/ (cbs.MAIN_REG_PV+cbs.MAIN_UP_PV),4) end AS mainBonusPvRate,
|
||||
|
||||
( cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS ) AS repurBonus,
|
||||
|
||||
CASE WHEN (cbs.MAIN_REPUR_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*#{backRatio}*(cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS) / (cbs.MAIN_REPUR_AMOUNT),4) end
|
||||
AS repurBonusRate,
|
||||
|
||||
CASE WHEN (cbs.MAIN_REPUR_PV)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*(cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS) /#{rate}/ (cbs.MAIN_REPUR_PV),4) end
|
||||
AS repurBonusPvRate,
|
||||
|
||||
cbs.INTRODUCE_BONUS + cbs.ORG_BONUS+cbs.LEADER_BONUS+cbs.SERVICE_BONUS+
|
||||
cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS+(#{orderAchieve}) AS totalBonus,
|
||||
|
||||
CASE WHEN ( cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT+cbs.MAIN_REPUR_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND ((#{perCent}*#{backRatio}*((cbs.INTRODUCE_BONUS + cbs.ORG_BONUS+cbs.LEADER_BONUS+cbs.SERVICE_BONUS+
|
||||
(#{orderAchieve}))+cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS)) /
|
||||
(cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT+cbs.MAIN_REPUR_AMOUNT),4) end AS totalBonusRate
|
||||
FROM
|
||||
CU_BONUS_STATIS cbs
|
||||
left join bd_vertex ver on cbs.pk_bd_vertex = ver.pk_id
|
||||
LEFT JOIN cu_member_team ct ON ct.pk_id = cbs.pk_team_code
|
||||
WHERE 1=1
|
||||
<if test="pkCountry != null and pkCountry ==1 ">
|
||||
and ver.DEL_FLAG=0
|
||||
</if>
|
||||
<if test="pkCountry != null">
|
||||
and cbs.PK_COUNTRY=#{pkCountry}
|
||||
</if>
|
||||
<if test="pkTeamCodeList != null ">
|
||||
and cbs.PK_TEAM_CODE in
|
||||
<foreach collection="pkTeamCodeList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pkBdVertexList != null ">
|
||||
and cbs.PK_BD_VERTEX in
|
||||
<foreach collection="pkBdVertexList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and cbs.CREATION_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate!=null and endDate!='' ">
|
||||
and cbs.CREATION_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
ORDER BY cbs.CREATION_TIME asc
|
||||
</select>
|
||||
<!-- 查询国外奖金拨比合计-->
|
||||
<select id="queryForeignCountryCuBonusStatisSum" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
SELECT
|
||||
SUM(cbs.MAIN_REG_AMOUNT) mainRegAmountSum,
|
||||
SUM(cbs.MAIN_UP_AMOUNT) mainUpAmountSum,
|
||||
SUM(cbs.MAIN_REPUR_AMOUNT) mainRepurAmountSum,
|
||||
SUM(cbs.AGENT_UP_AMOUNT) agentUpAmountSum,
|
||||
SUM(cbs.AGENT_REPUR_AMOUNT) agentRepurAmountSum,
|
||||
SUM(cbs.HIFANS_REG_AMOUNT) hifansRegAmountSum,
|
||||
SUM(cbs.TOTAL_AMOUNT) totalAmountSum,
|
||||
SUM(cbs.INTRODUCE_BONUS) introduceBonusSum,
|
||||
SUM(cbs.ORG_BONUS) orgBonusSum,
|
||||
SUM(cbs.LEADER_BONUS) leaderBonusSum,
|
||||
SUM((#{orderAchieve})) shareBonusSum,
|
||||
SUM(cbs.SERVICE_BONUS) serviceBonusSum,
|
||||
SUM(cbs.HI_FUN_INCOME) hiFunIncomeSum,
|
||||
SUM(cbs.REPUR_RANGE_BONUS) repurRangeBonusSum,
|
||||
SUM(cbs.REPUR_ORG_BONUS) repurOrgBonusSum,
|
||||
SUM(cbs.AGENT_INTRODUCE_BONUS) agentIntroduceBonusSum,
|
||||
SUM(cbs.AGENT_REG_AMOUNT) agentRegAmountSum,
|
||||
SUM(cbs.gift_order) giftOrderSum,
|
||||
SUM(cbs.pur_real_subtotal) purRealSubtotalSum,
|
||||
SUM(cbs.REPUR_REAL_SUBTOTAL) repurRealSubtotalSum,
|
||||
CASE WHEN (SUM(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT))=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*SUM(cbs.INTRODUCE_BONUS)/(SUM(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)),4) end as
|
||||
introduceBonusRateSum,
|
||||
CASE WHEN (SUM(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT))=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*SUM(cbs.ORG_BONUS)/(SUM(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)),4) end as
|
||||
orgBonusRateSum,
|
||||
CASE WHEN SUM(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*sum(cbs.LEADER_BONUS)/sum(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end
|
||||
leaderBonusRateSum,
|
||||
CASE WHEN sum(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*(sum(#{orderAchieve}))/sum(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end
|
||||
shareBonusRateSum,
|
||||
CASE WHEN sum(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*sum(cbs.SERVICE_BONUS)/sum(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end
|
||||
serviceBonusRateSum,
|
||||
|
||||
CASE WHEN sum(cbs.MAIN_REPUR_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*sum(cbs.REPUR_RANGE_BONUS)/sum(cbs.MAIN_REPUR_AMOUNT),4) end as repurRangeBonusRateSum,
|
||||
|
||||
CASE WHEN sum(cbs.MAIN_REPUR_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*sum(cbs.REPUR_ORG_BONUS)/sum(cbs.MAIN_REPUR_AMOUNT),4) end as repurOrgBonusRateSum,
|
||||
|
||||
sum(cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT) AS firstPurchaseAllSum,
|
||||
|
||||
sum( cbs.MAIN_REPUR_AMOUNT) AS repurchaseAllAmountSum,
|
||||
|
||||
sum( cbs.AGENT_REG_AMOUNT + cbs.AGENT_UP_AMOUNT ) AS agentFirstAmountSum,
|
||||
|
||||
sum(cbs.INTRODUCE_BONUS + cbs.ORG_BONUS+cbs.LEADER_BONUS+
|
||||
cbs.SERVICE_BONUS+(#{orderAchieve})) AS mainBonusSum,
|
||||
|
||||
CASE WHEN sum(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT) = 0
|
||||
THEN 0 ELSE ROUND (#{perCent}*#{backRatio}*sum(cbs.INTRODUCE_BONUS +
|
||||
cbs.ORG_BONUS+cbs.LEADER_BONUS+cbs.SERVICE_BONUS+
|
||||
(#{orderAchieve}))
|
||||
/ sum(cbs.MAIN_REG_AMOUNT+cbs.MAIN_UP_AMOUNT),4) end AS mainBonusRateSum,
|
||||
|
||||
CASE WHEN sum(cbs.MAIN_REG_PV+cbs.MAIN_UP_PV) = 0
|
||||
THEN 0 ELSE ROUND (#{perCent}*sum(cbs.INTRODUCE_BONUS +
|
||||
cbs.ORG_BONUS+cbs.LEADER_BONUS+cbs.SERVICE_BONUS+(#{orderAchieve}))
|
||||
/#{rate}/ sum(cbs.MAIN_REG_PV+cbs.MAIN_UP_PV),4) end AS mainBonusPvRateSum,
|
||||
|
||||
sum( cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS ) AS repurBonusSum,
|
||||
|
||||
CASE WHEN sum(cbs.MAIN_REPUR_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*#{backRatio}*sum(cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS)/sum(cbs.MAIN_REPUR_AMOUNT),4)
|
||||
end AS repurBonusRateSum,
|
||||
|
||||
CASE WHEN sum(cbs.MAIN_REPUR_PV)=0 THEN 0
|
||||
ELSE ROUND(#{perCent}*sum(cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS)/#{rate}/sum(cbs.MAIN_REPUR_PV),4)
|
||||
end AS repurBonusPvRateSum,
|
||||
|
||||
sum(cbs.INTRODUCE_BONUS + cbs.ORG_BONUS+cbs.LEADER_BONUS+cbs.SERVICE_BONUS+
|
||||
cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS+(#{orderAchieve}) )AS totalBonusSum,
|
||||
|
||||
CASE WHEN sum(cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT+cbs.MAIN_REPUR_AMOUNT)=0 THEN 0
|
||||
ELSE ROUND ((#{perCent}*#{backRatio}*sum((cbs.INTRODUCE_BONUS +
|
||||
cbs.ORG_BONUS+cbs.LEADER_BONUS+cbs.SERVICE_BONUS+
|
||||
(#{orderAchieve}))+cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS)) /
|
||||
sum(cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT+cbs.MAIN_REPUR_AMOUNT),4) end AS totalBonusRateSum
|
||||
FROM
|
||||
CU_BONUS_STATIS cbs
|
||||
left join bd_vertex ver on cbs.pk_bd_vertex = ver.pk_id
|
||||
LEFT JOIN cu_member_team ct ON ct.pk_id = cbs.pk_team_code
|
||||
WHERE 1=1
|
||||
<if test="pkCountry != null and pkCountry ==1 ">
|
||||
and ver.DEL_FLAG=0
|
||||
</if>
|
||||
<if test="pkCountry != null">
|
||||
and cbs.PK_COUNTRY=#{pkCountry}
|
||||
</if>
|
||||
<if test="pkTeamCodeList != null ">
|
||||
and cbs.PK_TEAM_CODE in
|
||||
<foreach collection="pkTeamCodeList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pkBdVertexList != null ">
|
||||
and cbs.PK_BD_VERTEX in
|
||||
<foreach collection="pkBdVertexList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and cbs.CREATION_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate!=null and endDate!='' ">
|
||||
and cbs.CREATION_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询体系合计的订单业绩-->
|
||||
<select id="queryOrderAchieveSum" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
|
@ -512,89 +228,6 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询能量舱订单金额-->
|
||||
<select id="queryEnergyChamberOrderList" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
select
|
||||
nvl(sum(ORDER_AMOUNT-CONSUME_AMOUNT),0) orderAmount,
|
||||
cm.PK_VERTEX,
|
||||
count(1)*49500 as energySum,
|
||||
so.PAY_TIME payTime
|
||||
from
|
||||
SA_ORDER so
|
||||
inner join cu_member cm on so.pk_member=cm.pk_id and cm.DEL_FLAG=0
|
||||
WHERE
|
||||
so.DEL_FLAG=0
|
||||
and ORDER_STATUS=1
|
||||
and (so.ORDER_AMOUNT-so.CONSUME_AMOUNT)>=198000
|
||||
<if test="orderTypeList != null ">
|
||||
and so.ORDER_TYPE in
|
||||
<foreach collection="orderTypeList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pkBdVertexList != null ">
|
||||
and cm.PK_VERTEX in
|
||||
<foreach collection="pkBdVertexList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pkVertex != null ">
|
||||
and cm.PK_VERTEX =#{pkVertex}
|
||||
</if>
|
||||
|
||||
<if test="pkCountry != null">
|
||||
and so.PK_COUNTRY=#{pkCountry}
|
||||
</if>
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate!=null and endDate!='' ">
|
||||
and so.PAY_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
GROUP BY cm.PK_VERTEX,so.PAY_TIME
|
||||
</select>
|
||||
|
||||
<select id="queryEnergyChamberAmount" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
select
|
||||
nvl(sum(ORDER_AMOUNT),0) orderAmount,
|
||||
cm.PK_VERTEX
|
||||
from
|
||||
SA_ORDER so
|
||||
inner join cu_member cm on so.pk_member=cm.pk_id and cm.DEL_FLAG=0
|
||||
WHERE
|
||||
so.DEL_FLAG=0
|
||||
and ORDER_STATUS=1
|
||||
and so.ORDER_AMOUNT>=198000
|
||||
<if test="orderTypeList != null ">
|
||||
and so.ORDER_TYPE in
|
||||
<foreach collection="orderTypeList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pkBdVertexList != null ">
|
||||
and cm.PK_VERTEX in
|
||||
<foreach collection="pkBdVertexList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pkVertex != null ">
|
||||
and cm.PK_VERTEX =#{pkVertex}
|
||||
</if>
|
||||
|
||||
<if test="pkCountry != null">
|
||||
and so.PK_COUNTRY=#{pkCountry}
|
||||
</if>
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate!=null and endDate!='' ">
|
||||
and so.PAY_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
GROUP BY cm.PK_VERTEX
|
||||
</select>
|
||||
|
||||
<!-- 奖金拨比列表统计小计(最后一行)-->
|
||||
<select id="queryCuBonusSumStatis" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
|
@ -740,7 +373,6 @@
|
|||
<if test="endDate!=null and endDate!='' ">
|
||||
and cbs.CREATION_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 奖金拨比图表-->
|
||||
|
@ -875,6 +507,7 @@
|
|||
</if>
|
||||
ORDER BY cbs.CREATION_TIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 奖金拨比图表统计合计 最后一行 -->
|
||||
<select id="queryCuBonusSumStatisChart" parameterType="com.hzs.member.statis.vo.CuBonusStatisChartVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisChartVO">
|
||||
|
@ -992,7 +625,6 @@
|
|||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and cbs.CREATION_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1061,23 +693,22 @@
|
|||
so.PK_COUNTRY pkCountry,
|
||||
so.PK_MEMBER pkMember,
|
||||
so.ORDER_TYPE orderType,
|
||||
(so.ORDER_AMOUNT-nvl(so.CONSUME_AMOUNT,0)) orderAmount,
|
||||
(so.ORDER_AMOUNT - nvl(so.CONSUME_AMOUNT,0)) orderAmount,
|
||||
so.ORDER_ACHIEVE orderAchieve,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'), 'yyyy-mm-dd') AS creationTime,
|
||||
so.MODIFIED_TIME modifiedTime
|
||||
from sa_order so
|
||||
inner JOIN CU_MEMBER cm on so.PK_MEMBER=cm.pk_id
|
||||
where so.ORDER_TYPE in (1,2,3,4,5,6,7,10,12,13,14,18,19,20,22,24,25,26,27,28,31) and cm.DEL_FLAG=0
|
||||
inner JOIN CU_MEMBER cm on so.PK_MEMBER = cm.pk_id
|
||||
where so.ORDER_TYPE in (1, 2, 3, 10, 13, 20, 24, 25, 26) and cm.DEL_FLAG = 0
|
||||
<if test="pkCountry != null">
|
||||
and so.pk_country=#{pkCountry}
|
||||
and so.pk_country = #{pkCountry}
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
AND so.DEL_FLAG=#{delFlag}
|
||||
AND so.DEL_FLAG = #{delFlag}
|
||||
</if>
|
||||
<if test="orderStatus != null">
|
||||
AND so.order_status=#{orderStatus}
|
||||
AND so.order_status = #{orderStatus}
|
||||
</if>
|
||||
|
||||
<if test="startDate != null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1091,8 +722,8 @@
|
|||
AND so.MODIFIED_TIME = to_date(#{modifiedTimeStr}, 'YYYY-MM-dd')
|
||||
</if>
|
||||
)
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除奖金拨比统计表数据-->
|
||||
<delete id="delStatis">
|
||||
delete from CU_BONUS_STATIS
|
||||
|
@ -1126,7 +757,6 @@
|
|||
<!--查询个人奖金拨比-->
|
||||
<select id="bonusSingleSum" parameterType="com.hzs.member.statis.vo.CuBonusSinglePersonStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusSinglePersonStatisVO">
|
||||
|
||||
select
|
||||
cm.MEMBER_CODE,cm.MEMBER_NAME,
|
||||
ver.VERTEX_NAME as vertexName,
|
||||
|
@ -1570,8 +1200,6 @@
|
|||
left join bd_vertex ver on cm.PK_VERTEX = ver.pk_id
|
||||
LEFT JOIN cu_member_team ct ON ct.pk_id = cm.PK_TEAM_CODE
|
||||
where cm.DEL_FLAG=0 and cm.PK_ID=#{pkMember}
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询分红比例-->
|
||||
|
@ -1591,16 +1219,6 @@
|
|||
ORDER BY ba.ABONUS_RATIO DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询生效国外国家-->
|
||||
<select id="countrylist" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
select pk_id as pkCountry
|
||||
from BD_COUNTRY
|
||||
where pk_id!=1 and del_flag = 0 and EFFECTIVE_DATE <= sysdate
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询有效体系-->
|
||||
<select id="vertexList" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
|
@ -1609,111 +1227,24 @@
|
|||
where del_flag = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询国外奖金-->
|
||||
<select id="queryForeignCountryBonus" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbp.REAL_INCOME) realIncome,
|
||||
mbp.PK_COUNTRY con,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_push mbp
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbp.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbp.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbp.DEL_FLAG=0
|
||||
and mbp.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate!=null and endDate!='' ">
|
||||
and so.PAY_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
GROUP BY mbp.PK_COUNTRY,
|
||||
bbi.BONUS_VALUE,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbe.REAL_INCOME) realIncome,
|
||||
mbe.PK_COUNTRY con,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS_EXPAND mbe
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbe.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbe.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbe.DEL_FLAG=0
|
||||
and mbe.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate!=null and endDate!='' ">
|
||||
and so.PAY_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
GROUP BY mbe.PK_COUNTRY,
|
||||
bbi.BONUS_VALUE,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbc.REAL_INCOME) realIncome,
|
||||
mbc.PK_COUNTRY con,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS_COACH mbc
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbc.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbc.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbc.DEL_FLAG=0
|
||||
and mbc.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate!=null and endDate!='' ">
|
||||
and so.PAY_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
GROUP BY mbc.PK_COUNTRY,
|
||||
bbi.BONUS_VALUE,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbr.REAL_INCOME) realIncome,
|
||||
mbr.PK_COUNTRY con,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_range mbr
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbr.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbr.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbr.DEL_FLAG=0
|
||||
and mbr.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate!=null and endDate!='' ">
|
||||
and so.PAY_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
GROUP BY bbi.BONUS_VALUE,
|
||||
mbr.PK_COUNTRY,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
|
||||
</select>
|
||||
<!-- 查询中国奖金-->
|
||||
<!-- 查询中国奖金-->
|
||||
<select id="queryChinaCountryBonus" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
<!-- 直推收益 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbp.REAL_INCOME) realIncome,
|
||||
mbp.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbp.PK_COUNTRY con,
|
||||
sum(mbp.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
cm.PK_VERTEX pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_push mbp
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbp.PK_BONUS=cmb.pk_id
|
||||
INNER join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbp.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbp.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbp.DEL_FLAG=0
|
||||
and mbp.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
inner join CU_MEMBER_BONUS cmb on mbp.PK_BONUS = cmb.pk_id
|
||||
inner join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbp.PK_BONUS_ITEMS
|
||||
inner join sa_order so on so.pk_id=mbp.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbp.DEL_FLAG = 0
|
||||
and mbp.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1725,20 +1256,22 @@
|
|||
cm.PK_VERTEX,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION ALL
|
||||
<!-- 拓展收益、消费拓展收益,收益状态:正常,延缓发放 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbe.REAL_INCOME) realIncome,
|
||||
mbe.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbe.PK_COUNTRY con,
|
||||
sum(mbe.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
cm.PK_VERTEX pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS_EXPAND mbe
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbe.PK_BONUS=cmb.pk_id
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbe.PK_BONUS = cmb.pk_id
|
||||
INNER join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbe.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbe.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbe.DEL_FLAG=0
|
||||
and mbe.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbe.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbe.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbe.DEL_FLAG = 0
|
||||
and mbe.INCOME_STATUS in (0, 4)
|
||||
and mbe.pk_order != 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1750,20 +1283,22 @@
|
|||
cm.PK_VERTEX,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION ALL
|
||||
<!-- 辅导收益,收益状态:正常,延缓发放 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbc.REAL_INCOME) realIncome,
|
||||
mbc.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbc.PK_COUNTRY con,
|
||||
sum(mbc.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
cm.PK_VERTEX pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS_COACH mbc
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbc.PK_BONUS=cmb.pk_id
|
||||
INNER join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbc.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbc.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbc.DEL_FLAG=0
|
||||
and mbc.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
inner join CU_MEMBER_BONUS cmb on mbc.PK_BONUS = cmb.pk_id
|
||||
inner join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbc.PK_BONUS_ITEMS
|
||||
inner JOIN sa_order so on so.pk_id = mbc.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbc.DEL_FLAG = 0
|
||||
and mbc.INCOME_STATUS in (0, 4)
|
||||
and mbc.pk_order != 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1775,9 +1310,10 @@
|
|||
cm.PK_VERTEX,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION ALL
|
||||
<!-- 复购级差 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbr.REAL_INCOME) realIncome,
|
||||
mbr.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbr.PK_COUNTRY con,
|
||||
sum(mbr.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
cm.PK_VERTEX pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
|
@ -1785,10 +1321,10 @@
|
|||
INNER JOIN CU_MEMBER_BONUS cmb on mbr.PK_BONUS=cmb.pk_id
|
||||
INNER join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbr.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbr.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
INNER JOIN sa_order so on so.pk_id = mbr.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbr.DEL_FLAG=0
|
||||
and mbr.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1800,20 +1336,21 @@
|
|||
cm.PK_VERTEX,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION ALL
|
||||
<!-- 报单服务费 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbd.REAL_INCOME) realIncome,
|
||||
mbd.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbd.PK_COUNTRY con,
|
||||
sum(mbd.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
cm.PK_VERTEX pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_detail mbd
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbd.PK_BONUS=cmb.pk_id
|
||||
INNER join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbd.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbd.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbd.DEL_FLAG=0
|
||||
and mbd.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbd.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbd.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbd.DEL_FLAG = 0
|
||||
and mbd.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1824,8 +1361,6 @@
|
|||
mbd.PK_COUNTRY,
|
||||
cm.PK_VERTEX,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -891,12 +891,12 @@
|
|||
pk_member
|
||||
FROM
|
||||
${settleTableName}
|
||||
WHERE category=0
|
||||
WHERE category = 0
|
||||
start with pk_place_parent = #{pkVertex}
|
||||
connect by pk_place_parent = prior pk_member
|
||||
) cm
|
||||
INNER JOIN SA_ORDER so on so.pk_member=cm.pk_member
|
||||
where so.ORDER_TYPE in (1,2,3,4,5,6,7,12,13,14,18,19,20,22,24,25,26,27,28,31)
|
||||
INNER JOIN SA_ORDER so on so.pk_member = cm.pk_member
|
||||
where so.ORDER_TYPE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="pkCountry != null">
|
||||
and so.pk_country=#{pkCountry}
|
||||
</if>
|
||||
|
@ -906,7 +906,6 @@
|
|||
<if test="orderStatus != null">
|
||||
AND so.order_status=#{orderStatus}
|
||||
</if>
|
||||
|
||||
<if test="startDate != null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1118,32 +1117,32 @@
|
|||
GROUP BY bbi.BONUS_VALUE,
|
||||
mbd.PK_COUNTRY,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询7天重算奖金查询-->
|
||||
<select id="queryVertexChinaCountryBonus" parameterType="com.hzs.member.statis.vo.CuBonusVertexStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusVertexStatisVO">
|
||||
<!-- 直推收益 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbp.REAL_INCOME) realIncome,
|
||||
mbp.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbp.PK_COUNTRY con,
|
||||
sum(mbp.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_push mbp
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbp.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT
|
||||
pk_member
|
||||
FROM
|
||||
${settleTableName}
|
||||
WHERE category=0
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbp.PK_BONUS = cmb.pk_id
|
||||
INNER join (
|
||||
SELECT pk_member
|
||||
FROM ${settleTableName}
|
||||
WHERE category = 0
|
||||
start with pk_member = #{pkVertex}
|
||||
connect by pk_place_parent = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbp.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbp.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbp.DEL_FLAG=0
|
||||
and mbp.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbp.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbp.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbp.DEL_FLAG= 0
|
||||
and mbp.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1154,27 +1153,27 @@
|
|||
bbi.BONUS_VALUE,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION ALL
|
||||
<!-- 拓展收益、消费拓展收益,收益状态:正常,延缓发放 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbe.REAL_INCOME) realIncome,
|
||||
mbe.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbe.PK_COUNTRY con,
|
||||
sum(mbe.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS_EXPAND mbe
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbe.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT
|
||||
pk_member
|
||||
FROM
|
||||
${settleTableName}
|
||||
WHERE category=0
|
||||
INNER join ( SELECT pk_member
|
||||
FROM ${settleTableName}
|
||||
WHERE category = 0
|
||||
start with pk_member = #{pkVertex}
|
||||
connect by pk_place_parent = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbe.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbe.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbe.DEL_FLAG=0
|
||||
and mbe.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbe.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbe.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbe.DEL_FLAG = 0
|
||||
and mbe.INCOME_STATUS in (0, 4)
|
||||
and mbe.pk_order != 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1185,27 +1184,27 @@
|
|||
bbi.BONUS_VALUE,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION ALL
|
||||
<!-- 辅导收益,收益状态:正常,延缓发放 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbc.REAL_INCOME) realIncome,
|
||||
mbc.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbc.PK_COUNTRY con,
|
||||
sum(mbc.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS_COACH mbc
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbc.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT
|
||||
pk_member
|
||||
FROM
|
||||
${settleTableName}
|
||||
INNER join ( SELECT pk_member
|
||||
FROM ${settleTableName}
|
||||
WHERE category=0
|
||||
start with pk_member = #{pkVertex}
|
||||
connect by pk_place_parent = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbc.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbc.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbc.DEL_FLAG=0
|
||||
and mbc.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbc.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbc.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbc.DEL_FLAG = 0
|
||||
and mbc.INCOME_STATUS in (0, 4)
|
||||
and mbc.pk_order != 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1216,27 +1215,26 @@
|
|||
bbi.BONUS_VALUE,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION ALL
|
||||
<!-- 复购级差 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbr.REAL_INCOME) realIncome,
|
||||
mbr.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbr.PK_COUNTRY con,
|
||||
sum(mbr.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_range mbr
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbr.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT
|
||||
pk_member
|
||||
FROM
|
||||
${settleTableName}
|
||||
WHERE category=0
|
||||
INNER join ( SELECT pk_member
|
||||
FROM ${settleTableName}
|
||||
WHERE category = 0
|
||||
start with pk_member = #{pkVertex}
|
||||
connect by pk_place_parent = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbr.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbr.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbr.DEL_FLAG=0
|
||||
and mbr.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbr.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbr.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbr.DEL_FLAG = 0
|
||||
and mbr.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1247,27 +1245,26 @@
|
|||
mbr.PK_COUNTRY,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
UNION ALL
|
||||
<!-- 报单服务费 -->
|
||||
select
|
||||
#{pkCountry} pkCountry,sum(mbd.REAL_INCOME) realIncome,
|
||||
mbd.PK_COUNTRY con,
|
||||
#{pkCountry} pkCountry, mbd.PK_COUNTRY con,
|
||||
sum(mbd.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_detail mbd
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbd.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT
|
||||
pk_member
|
||||
FROM
|
||||
${settleTableName}
|
||||
WHERE category=0
|
||||
INNER join ( SELECT pk_member
|
||||
FROM ${settleTableName}
|
||||
WHERE category = 0
|
||||
start with pk_member = #{pkVertex}
|
||||
connect by pk_place_parent = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbd.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbd.pk_order and so.PK_COUNTRY=#{pkCountry} and so.del_flag=0
|
||||
where mbd.DEL_FLAG=0
|
||||
and mbd.INCOME_STATUS=0
|
||||
and bbi.BONUS_VALUE in (3,4,5,7,8,9,12,24,20,21,14,15,16,1)
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbd.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbd.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbd.DEL_FLAG = 0
|
||||
and mbd.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
|
@ -1277,17 +1274,14 @@
|
|||
GROUP BY bbi.BONUS_VALUE,
|
||||
mbd.PK_COUNTRY,
|
||||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询当天团队统计数据-->
|
||||
<select id="getCuBonusStatis" parameterType="com.hzs.common.domain.member.statis.CuBonusVertexStatis"
|
||||
resultType="com.hzs.common.domain.member.statis.CuBonusVertexStatis">
|
||||
SELECT *
|
||||
FROM
|
||||
CU_BONUS_VERTEX_STATIS a
|
||||
WHERE
|
||||
1=1
|
||||
FROM CU_BONUS_VERTEX_STATIS a
|
||||
WHERE 1 = 1
|
||||
<if test="pkBdVertex != null ">
|
||||
AND a.PK_BD_VERTEX = #{pkBdVertex}
|
||||
</if>
|
||||
|
|
|
@ -41,16 +41,6 @@ public class MemberMsgConstants {
|
|||
*/
|
||||
public static final String PARENT_NO_JURISDICTION = "推荐人没有推荐该等级权限!";
|
||||
|
||||
/**
|
||||
* 验证推荐人是否又推荐某等级权限 -- 下单商品的总业绩至少需要达到优客级别才可购买沙棘礼包!
|
||||
*/
|
||||
public static final String ORDER_PRODUCT_ENOUGH_ACHIEVE = "下单商品的总业绩至少需要达到VIP级别才可购买沙棘礼包!";
|
||||
|
||||
/**
|
||||
* 验证推荐人是否又推荐某等级权限 -- 能量仓使用次数仅为优客级会员开放,请及时升级!
|
||||
*/
|
||||
public static final String YOU_KE_ORDER_PRODUCT_ENOUGH_ACHIEVE = "能量仓使用次数仅为优客级会员开放,请及时升级!";
|
||||
|
||||
/**
|
||||
* 验证手机号是否被注册 -- 会员信息已存在!
|
||||
*/
|
||||
|
@ -308,8 +298,4 @@ public class MemberMsgConstants {
|
|||
*/
|
||||
public static final String EXIST_MEMBER_NOT_CANCEL = "订单所属会员下存在用户不能取消";
|
||||
|
||||
/**
|
||||
* 订单取消时,如果是注册单,校验伞下是否推荐或者安置过人 -- 订单所属会员下存在用户不能取消
|
||||
*/
|
||||
public static final String JC_TX_GIFT_NOT_ENOUGH_ACHIEVE = "只有注册或升级VIP/SVIP时可以购买!";
|
||||
}
|
||||
|
|
|
@ -2,10 +2,6 @@ package com.hzs.common.core.constant.msg;
|
|||
|
||||
/**
|
||||
* @Description: 订单记录返回到前台的所有通知消息
|
||||
* @Author: sui q
|
||||
* @Time: 2022/9/21 17:36
|
||||
* @Classname: SaOrderMsgConstants
|
||||
* @PackageName: com.hzs.common.core.constant.msg
|
||||
*/
|
||||
public class SaOrderMsgConstants {
|
||||
|
||||
|
@ -24,11 +20,6 @@ public class SaOrderMsgConstants {
|
|||
*/
|
||||
public static final String ORDER_CODE_EMPTY = "订单编号不能为空,请刷新重试!";
|
||||
|
||||
/**
|
||||
* 验证推荐人是否又推荐某等级权限 -- 分享订单生成失败,请重新下单
|
||||
*/
|
||||
public static final String SHARE_ORDER_FAIL = "分享订单生成失败,请重新下单";
|
||||
|
||||
/**
|
||||
* 根据订单编号查询订单 -- 没有找寻到该订单编号,请刷新重试!
|
||||
*/
|
||||
|
@ -49,16 +40,6 @@ public class SaOrderMsgConstants {
|
|||
*/
|
||||
public static final String SPECIAL_AREA_NOT_EMPTY = "所属专区不能为空!";
|
||||
|
||||
/**
|
||||
* 没有选择商品 -- 没有选择商品!
|
||||
*/
|
||||
public static final String SHOPPING_CAR = "没有选择商品!";
|
||||
|
||||
/**
|
||||
* 选择了生态科技仓的购买次数 -- 存在能量仓的购买次数,必须选择需要使用的创客空间!
|
||||
*/
|
||||
public static final String EXISTS_MAKER_SPACE_WARES = "存在能量仓的购买次数,必须选择需要使用的创客空间!";
|
||||
|
||||
/**
|
||||
* 只能撤销7天内支付的订单 -- 只能撤销7天内支付的订单!
|
||||
*/
|
||||
|
@ -195,18 +176,12 @@ public class SaOrderMsgConstants {
|
|||
*/
|
||||
public static final String HYDROGENATION_MACHINE_NUM_EXCEED = "氢氧机自选数量不得高于2台!";
|
||||
|
||||
/**
|
||||
* 该会员安置或推荐存在会员不能撤单 -- 该会员安置或推荐存在会员不能撤单
|
||||
*/
|
||||
public static final String GIFT_MONEY_EXCEED = "赠品总价值介于198000至198400之间!";
|
||||
|
||||
/**
|
||||
* 自提订单不支持自助撤单
|
||||
*/
|
||||
public static final String SELF_ORDER_NOT_REVOKE = "自提订单不支持自助撤单";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 会员续约 -- 休止期不允许报单
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@ public class CuMemberBonusCoach extends BaseEntity {
|
|||
private Integer pkBonusItems;
|
||||
|
||||
/**
|
||||
* 收益状态 (0=正常,1=烧伤)
|
||||
* 收益状态 (0=正常,1=停收,2=烧伤,3=K值,4=延缓发放)
|
||||
*/
|
||||
@TableField("INCOME_STATUS")
|
||||
private Integer incomeStatus;
|
||||
|
|
|
@ -53,7 +53,7 @@ public class CuMemberBonusPush extends BaseEntity {
|
|||
private Integer pkBonusItems;
|
||||
|
||||
/**
|
||||
* 收益状态 (0=正常,1=烧伤)
|
||||
* 收益状态 (0=正常,1=停收,2=烧伤,3=K值,4=延缓发放)
|
||||
*/
|
||||
@TableField("INCOME_STATUS")
|
||||
private Integer incomeStatus;
|
||||
|
|
|
@ -56,7 +56,7 @@ public class CuMemberBonusRange extends BaseEntity {
|
|||
private Integer pkBonusItems;
|
||||
|
||||
/**
|
||||
* 收益状态 (0=正常,1=烧伤)
|
||||
* 收益状态 (0=正常,1=停收,2=烧伤,3=K值,4=延缓发放)
|
||||
*/
|
||||
@TableField("INCOME_STATUS")
|
||||
private Integer incomeStatus;
|
||||
|
|
|
@ -4,21 +4,20 @@ import java.math.BigDecimal;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import com.hzs.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 奖金拨比统计
|
||||
* 每个团队,每天一条数据
|
||||
* 数据来自 订单表和 CU_MEMBER_BONUS 会员奖金-会员奖金汇总表
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-05-31
|
||||
|
@ -88,7 +87,6 @@ public class CuBonusStatis extends BaseEntity {
|
|||
private BigDecimal fictitiousAmount;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 复购新增业绩(¥)(复购订单)
|
||||
*/
|
||||
|
@ -248,6 +246,13 @@ public class CuBonusStatis extends BaseEntity {
|
|||
private BigDecimal repurOrgBonus;
|
||||
|
||||
|
||||
/**
|
||||
* 复购辅导收益(¥)
|
||||
*/
|
||||
@TableField("REPUR_LEADER_BONUS")
|
||||
private BigDecimal repurLeaderBonus;
|
||||
|
||||
|
||||
/**
|
||||
* 云代理直推收益(¥)
|
||||
*/
|
||||
|
@ -288,7 +293,7 @@ public class CuBonusStatis extends BaseEntity {
|
|||
private BigDecimal totalBonusReal;
|
||||
|
||||
/**
|
||||
*体系ID 统计体系,1原体系,2六合体系,3六合二,101非洲体系
|
||||
* 体系ID 统计体系,1原体系,2六合体系,3六合二,101非洲体系
|
||||
*/
|
||||
@TableField("PK_BD_VERTEX")
|
||||
private Integer pkBdVertex;
|
||||
|
@ -384,87 +389,75 @@ public class CuBonusStatis extends BaseEntity {
|
|||
@TableField("MAIN_UP_PV")
|
||||
private BigDecimal mainUpPv;
|
||||
/**
|
||||
*复购新增PV
|
||||
* 复购新增PV
|
||||
*/
|
||||
@TableField("MAIN_REPUR_PV")
|
||||
private BigDecimal mainRepurPv;
|
||||
/**
|
||||
*特殊注册PV
|
||||
* 特殊注册PV
|
||||
*/
|
||||
@TableField("SPECIAL_REGISTER_PV")
|
||||
private BigDecimal specialRegisterPv;
|
||||
/**
|
||||
*特殊升级PV
|
||||
* 特殊升级PV
|
||||
*/
|
||||
@TableField("SPECIAL_UPGRADE_PV")
|
||||
private BigDecimal specialUpgradePv;
|
||||
/**
|
||||
*特殊复购PV
|
||||
* 特殊复购PV
|
||||
*/
|
||||
@TableField("SPECIAL_REPURCHASE_PV")
|
||||
private BigDecimal specialRepurchasePv;
|
||||
/**
|
||||
*虚拟订单PV
|
||||
* 虚拟订单PV
|
||||
*/
|
||||
@TableField("FICTITIOUS_PV")
|
||||
private BigDecimal fictitiousPv;
|
||||
/**
|
||||
*嗨粉注册PV
|
||||
* 嗨粉注册PV
|
||||
*/
|
||||
@TableField("HIFANS_REG_PV")
|
||||
private BigDecimal hifansRegPv;
|
||||
/**
|
||||
*海粉升级PV
|
||||
* 海粉升级PV
|
||||
*/
|
||||
@TableField("HAI_FUN_UPGRADE_PV")
|
||||
private BigDecimal haiFunUpgradePv;
|
||||
/**
|
||||
*云学院订单PV
|
||||
* 云学院订单PV
|
||||
*/
|
||||
@TableField("CLOUD_COLLEGE_PV")
|
||||
private BigDecimal cloudCollegePv;
|
||||
/**
|
||||
*直播订单PV
|
||||
* 直播订单PV
|
||||
*/
|
||||
@TableField("MALL_PV")
|
||||
private BigDecimal mallPv;
|
||||
/**
|
||||
*赋能礼包PV
|
||||
* 赋能礼包PV
|
||||
*/
|
||||
@TableField("EMPOWERMENT_GIFT_PV")
|
||||
private BigDecimal empowermentGiftPv;
|
||||
/**
|
||||
*合作订单PV
|
||||
* 合作订单PV
|
||||
*/
|
||||
@TableField("COOPERATE_PV")
|
||||
private BigDecimal cooperatePv;
|
||||
/**
|
||||
*创客订单PV
|
||||
* 创客订单PV
|
||||
*/
|
||||
@TableField("MAKER_ORDER_PV")
|
||||
private BigDecimal makerOrderPv;
|
||||
/**
|
||||
*创客礼包PV
|
||||
* 创客礼包PV
|
||||
*/
|
||||
@TableField("MAKER_GIFT_PV")
|
||||
private BigDecimal makerGiftPv;
|
||||
/**
|
||||
*福利专区PV
|
||||
* 福利专区PV
|
||||
*/
|
||||
@TableField("WELFARE_ORDER_PV")
|
||||
private BigDecimal welfareOrderPv;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -128,6 +128,12 @@ public class CuBonusVertexStatis extends BaseEntity {
|
|||
@TableField("REPUR_ORG_BONUS")
|
||||
private BigDecimal repurOrgBonus;
|
||||
|
||||
/**
|
||||
* 复购辅导收益(¥)
|
||||
*/
|
||||
@TableField("REPUR_LEADER_BONUS")
|
||||
private BigDecimal repurLeaderBonus;
|
||||
|
||||
/**
|
||||
* 首购相关奖金(¥)
|
||||
*/
|
||||
|
|
|
@ -47,26 +47,7 @@ public class MemberJob {
|
|||
}
|
||||
|
||||
/**
|
||||
* 定时统计顶点奖金拨比
|
||||
*/
|
||||
@XxlJob("bonus-vertex-statis")
|
||||
public void cuBonusVertexStatis() {
|
||||
//查询前一天的订单和奖金
|
||||
Date date = DateUtils.currentDate();
|
||||
date = DateUtils.beforeDate(1, ChronoUnit.DAYS, date);
|
||||
String payTimeStr = (DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, date));
|
||||
R<Boolean> stats = iCuBonusVertexStatisServiceApi.anewStatsHistoryBonus(payTimeStr, payTimeStr);
|
||||
if (!stats.getData()) {
|
||||
log.info("{}-定时统计奖金拨统计失败", DateUtils.currentDate());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 重算7天内奖金拨比
|
||||
* @author: zhang jing
|
||||
* @date: 2023/12/11 10:45
|
||||
* @param: []
|
||||
* @return: void
|
||||
* 重算7天内奖金拨比
|
||||
**/
|
||||
@XxlJob("rerun-bonus-statis")
|
||||
public void rerunCuBonusStatis() {
|
||||
|
@ -88,11 +69,22 @@ public class MemberJob {
|
|||
}
|
||||
|
||||
/**
|
||||
* @description: 7天重算顶点奖金拨比统计
|
||||
* @author: zhang jing
|
||||
* @date: 2024/8/15 10:29
|
||||
* @param: []
|
||||
* @return: void
|
||||
* 定时统计顶点奖金拨比
|
||||
*/
|
||||
@XxlJob("bonus-vertex-statis")
|
||||
public void cuBonusVertexStatis() {
|
||||
//查询前一天的订单和奖金
|
||||
Date date = DateUtils.currentDate();
|
||||
date = DateUtils.beforeDate(1, ChronoUnit.DAYS, date);
|
||||
String payTimeStr = (DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, date));
|
||||
R<Boolean> stats = iCuBonusVertexStatisServiceApi.anewStatsHistoryBonus(payTimeStr, payTimeStr);
|
||||
if (!stats.getData()) {
|
||||
log.info("{}-定时统计顶点奖金拨统计失败", DateUtils.currentDate());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 7天重算顶点奖金拨比统计
|
||||
**/
|
||||
@XxlJob("rerun-bonus-vertex-statis")
|
||||
public void rerunCuBonusVertexStatis() {
|
||||
|
|
Loading…
Reference in New Issue