From f4a0f2acc63d7785eab108419a4e16f5f688cb95 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期六, 18 一月 2020 12:06:27 +0800 Subject: [PATCH] 用户注册信息 --- fanli/src/main/java/com/yeshi/fanli/service/impl/count/UserSystemCouponCountServiceImpl.java | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/count/UserSystemCouponCountServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/count/UserSystemCouponCountServiceImpl.java index daeafa1..41cc4a5 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/count/UserSystemCouponCountServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/count/UserSystemCouponCountServiceImpl.java @@ -3,7 +3,6 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import java.util.Map; import javax.annotation.Resource; @@ -11,10 +10,11 @@ import org.springframework.stereotype.Service; import com.yeshi.fanli.dao.mybatis.user.UserSystemCouponCountMapper; +import com.yeshi.fanli.dto.ChartTDO; import com.yeshi.fanli.entity.bus.user.UserInfo; import com.yeshi.fanli.entity.bus.user.UserSystemCoupon; import com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord; -import com.yeshi.fanli.entity.system.SystemCoupon; +import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum; import com.yeshi.fanli.service.inter.config.SystemCouponService; import com.yeshi.fanli.service.inter.count.HongBaoV2CountService; import com.yeshi.fanli.service.inter.count.UserSystemCouponCountService; @@ -140,11 +140,13 @@ } for (SystemCouponVO systemCouponVO: list) { + BigDecimal money = null; + if (systemCouponVO.getType() != CouponTypeEnum.freeCouponGive) + money = userSystemCouponCountMapper.countFreeMoneyByCouponId(systemCouponVO.getId()); - BigDecimal money = userSystemCouponCountMapper.countFreeMoneyByCouponId(systemCouponVO.getId()); - if (money == null) { + if (money == null) money = new BigDecimal(0); - } + systemCouponVO.setMoney(money); } return list; @@ -260,19 +262,19 @@ @Override - public List<Map<String, Object>> getRebateCouponUsedNumToCharts(Integer dateType, String year, + public List<ChartTDO> getRebateCouponUsedNumToCharts(Integer dateType, String year, String startTime, String endTime){ return userSystemCouponCountMapper.getRebateCouponUsedNumToCharts(dateType, year, startTime, endTime); } @Override - public List<Map<String, Object>> getRebateCouponMoneyToCharts(Integer dateType, String year, + public List<ChartTDO> getRebateCouponMoneyToCharts(Integer dateType, String year, String startTime, String endTime){ return userSystemCouponCountMapper.getRebateCouponMoneyToCharts(dateType, year, startTime, endTime); } @Override - public List<Map<String, Object>> getFreeCouponMoneyToCharts(Integer dateType, String year, String startTime, + public List<ChartTDO> getFreeCouponMoneyToCharts(Integer dateType, String year, String startTime, String endTime, String couponType){ return userSystemCouponCountMapper.getFreeCouponMoneyToCharts(dateType, year, startTime, endTime, couponType); } -- Gitblit v1.8.0