forked from angelo/java-retail-app
## 奖金添加秒结处理;
This commit is contained in:
parent
af6e0937e0
commit
edbd8ea3e1
|
@ -5,6 +5,8 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||
import com.hzs.bonus.bonus.param.BonusParam;
|
||||
import com.hzs.bonus.bonus.service.ICuMemberBonusService;
|
||||
import com.hzs.bonus.bonus.vo.*;
|
||||
import com.hzs.common.core.enums.EGrantStatus;
|
||||
import com.hzs.common.core.utils.ComputeUtil;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
|
@ -32,6 +34,29 @@ public class ApiCuMemberBonusController extends BaseController {
|
|||
@Autowired
|
||||
private ICuMemberBonusService iCuMemberBonusService;
|
||||
|
||||
/**
|
||||
* 新零售实时奖金:查询会员实时奖金,当日的奖金
|
||||
*/
|
||||
@PostMapping("/query-current-bonus")
|
||||
public TableDataInfo listCurrentBonus(@RequestBody BonusParam bonusParam) {
|
||||
bonusParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
bonusParam.setPkMember(SecurityUtils.getUserId());
|
||||
bonusParam.setStartDate(DateUtils.currentDate());
|
||||
bonusParam.setEndDate(DateUtils.afterDate(1, ChronoUnit.DAYS, DateUtils.currentDate()));
|
||||
bonusParam.setGrantStatus(EGrantStatus.SETTLED.getValue());
|
||||
|
||||
List<CuMemberBonusExt> cuMemberBonusList = iCuMemberBonusService.queryMemberSecondBonusVoByCondition(bonusParam);
|
||||
List<MemberBonusVO> memberBonusVOList = new ArrayList<>();
|
||||
cuMemberBonusList.forEach(cuMemberBonus -> {
|
||||
if (ComputeUtil.compareValue(cuMemberBonus.getRealIncomeTotal())) {
|
||||
MemberBonusVO memberBonusVO = BeanUtil.copyProperties(cuMemberBonus, MemberBonusVO.class, "settleDate");
|
||||
memberBonusVO.setSettleDate(DateUtils.currentDate());
|
||||
memberBonusVOList.add(memberBonusVO);
|
||||
}
|
||||
});
|
||||
return getDataTable(memberBonusVOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新零售实时奖金:查询会员奖金列表
|
||||
*/
|
||||
|
@ -56,6 +81,7 @@ public class ApiCuMemberBonusController extends BaseController {
|
|||
@PostMapping("/query-bonus-total")
|
||||
public TableDataInfo lisBonusTotal(@RequestBody BonusParam bonusParam) {
|
||||
setBonusParam(bonusParam);
|
||||
bonusParam.setStartDate(DateUtils.beforeDate(1, ChronoUnit.DAYS, bonusParam.getEndDate()));
|
||||
|
||||
List<CuMemberBonusExt> cuMemberBonusList = iCuMemberBonusService.queryMemberBonusTotalByCondition(bonusParam);
|
||||
|
||||
|
|
|
@ -140,4 +140,11 @@ public interface ICuMemberBonusService extends IService<CuMemberBonus> {
|
|||
*/
|
||||
List<CuMemberBonus> queryCuMemberBonus(int period, List<CuMemberBonus> cuMemberBonusList);
|
||||
|
||||
/**
|
||||
* 根据查询条件查询会员秒接奖金
|
||||
*
|
||||
* @param bonusParam 查询条件
|
||||
*/
|
||||
List<CuMemberBonusExt> queryMemberSecondBonusVoByCondition(BonusParam bonusParam);
|
||||
|
||||
}
|
||||
|
|
|
@ -418,4 +418,9 @@ public class CuMemberBonusServiceImpl extends ServiceImpl<CuMemberBonusMapper, C
|
|||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CuMemberBonusExt> queryMemberSecondBonusVoByCondition(BonusParam bonusParam) {
|
||||
return getCuMemberBonusExtList(bonusParam);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,152 +20,34 @@ import java.util.Date;
|
|||
@NoArgsConstructor
|
||||
public class MemberBonusVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 会员主键
|
||||
*/
|
||||
private Long pkMember;
|
||||
|
||||
/**
|
||||
* 会员编号
|
||||
*/
|
||||
private String memberCode;
|
||||
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
private String memberName;
|
||||
|
||||
/**
|
||||
* 结算等级
|
||||
*/
|
||||
private Integer pkSettleGrade;
|
||||
|
||||
/**
|
||||
* 真实奖衔
|
||||
*/
|
||||
private Integer pkAwards;
|
||||
|
||||
/**
|
||||
* 体系名称
|
||||
*/
|
||||
private String vertexName;
|
||||
|
||||
/**
|
||||
* 团队名称
|
||||
*/
|
||||
private String teamName;
|
||||
|
||||
/**
|
||||
* 期间
|
||||
*/
|
||||
private Integer period;
|
||||
|
||||
/**
|
||||
* 汇率
|
||||
*/
|
||||
private Integer pkRate;
|
||||
|
||||
/**
|
||||
* 直推收益
|
||||
*/
|
||||
private BigDecimal directIncome;
|
||||
|
||||
/**
|
||||
* 拓展收益
|
||||
*/
|
||||
private BigDecimal expandIncome;
|
||||
|
||||
/**
|
||||
* 辅导收益
|
||||
*/
|
||||
private BigDecimal coachIncome;
|
||||
|
||||
/**
|
||||
* 分红收益
|
||||
*/
|
||||
private BigDecimal shareIncome;
|
||||
|
||||
/**
|
||||
* 报单收益
|
||||
*/
|
||||
private BigDecimal serviceIncome;
|
||||
|
||||
/**
|
||||
* 商城重消
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
private BigDecimal backPoints;
|
||||
|
||||
/**
|
||||
* 平台服务费
|
||||
*/
|
||||
private BigDecimal serviceSpend;
|
||||
|
||||
/**
|
||||
* 商城重消
|
||||
*/
|
||||
private BigDecimal repBackPoints;
|
||||
|
||||
/**
|
||||
* 平台服务费
|
||||
*/
|
||||
private BigDecimal repServiceSpend;
|
||||
|
||||
/**
|
||||
* 实发收益总计
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
private BigDecimal realIncomeTotal;
|
||||
|
||||
/**
|
||||
* 收益状态 (0=正常,1=停止收益)
|
||||
*/
|
||||
private Integer incomeStatus;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private Integer pkCountry;
|
||||
|
||||
/**
|
||||
* 新零售直推级差收益
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
private BigDecimal retailRangeIncome;
|
||||
|
||||
/**
|
||||
* 新零售平级收益
|
||||
* 新零售复购级差收益
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
private BigDecimal retailSameLevelIncome;
|
||||
|
||||
private BigDecimal repurRangeIncome;
|
||||
/**
|
||||
* 新零售区域收益
|
||||
* 新零售复购配送收益
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
private BigDecimal retailAreaIncome;
|
||||
|
||||
/**
|
||||
* 新零售福利极差收益
|
||||
*/
|
||||
private BigDecimal retailBenefitRangeIncome;
|
||||
|
||||
/**
|
||||
* 新零售福利平均收益
|
||||
*/
|
||||
private BigDecimal retailBenefitAvgIncome;
|
||||
|
||||
/**
|
||||
* 新零售福利加权收益
|
||||
*/
|
||||
private BigDecimal retailBenefitIncome;
|
||||
|
||||
/**
|
||||
* 新零售收益小计
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
private BigDecimal retailRealSubtotal;
|
||||
|
||||
/**
|
||||
* 实发收益总计
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
private BigDecimal realIncomeTotal;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
from (select *
|
||||
from cu_member
|
||||
where del_flag = 0
|
||||
start with pk_id = #{item}
|
||||
start with pk_id = #{saOrderExt.pkMember}
|
||||
connect by pk_id = prior pk_parent) a
|
||||
inner join bd_grade ba
|
||||
on a.pk_settle_grade = ba.pk_id
|
||||
|
@ -304,7 +304,7 @@
|
|||
inner join bd_grade ba
|
||||
on a.pk_settle_grade = ba.pk_id
|
||||
where a.del_flag = 0
|
||||
and a.pk_id = #{item}
|
||||
and a.pk_id = #{memberId}
|
||||
and ba.del_flag = 0
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue