| | |
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | BigDecimal countFreeMoneyByTypeAndDay(@Param("type") String type, @Param("preDay") String preDay);
|
| | | BigDecimal countFreeMoneyByTypeAndDay(@Param("type") String type, @Param("preDay") String preDay, @Param("source") String source);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | BigDecimal countCouponNumByDay(@Param("type") String type, @Param("preDay") String preDay);
|
| | | BigDecimal countCouponNumByDay(@Param("type") String type, @Param("preDay") String preDay, @Param("source") String source);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | welfareFreeCouponMoney("福利免单统计金额"), |
| | | freeCouponGiveNum("赠送免单券统计数量"), |
| | | rebateCouponNum("返利奖励券统计数量"), |
| | | rebateCouponMoney("返利奖励券统计金额"); |
| | | rebateCouponMoney("返利奖励券统计金额"), |
| | | pullNewCouponNum("拉新免单券统计数量"), |
| | | pullNewCouponMoney("拉新免单券统计金额"); |
| | | |
| | | |
| | | private final String desc; |
| | | |
| | |
| | | LEFT JOIN `yeshi_ec_hongbao_v2` v2 ON ho.`ho_hongbao_id` = v2.`hb_id`
|
| | | WHERE pr.`ucr_state` = 3 AND sp.`sc_type` = #{type}
|
| | | AND TO_DAYS(v2.`hb_get_time`) = TO_DAYS(#{preDay})
|
| | | <if test="source != null and source != ''">
|
| | | AND c.`usc_source` = #{source}
|
| | | </if>
|
| | | </select>
|
| | |
|
| | | <select id="countRebateMoneyByDay" resultType="BigDecimal">
|
| | |
| | | SELECT COUNT(c.`usc_id`) FROM yeshi_ec_user_system_coupon c
|
| | | LEFT JOIN yeshi_ec_system_coupon p ON p.`sc_id`= c.`usc_coupon_id`
|
| | | WHERE p.`sc_type` = #{type} AND TO_DAYS(c.`usc_create_time`) = TO_DAYS(#{preDay})
|
| | | <if test="source != null and source != ''">
|
| | | AND c.`usc_source` = #{source}
|
| | | </if>
|
| | | </select>
|
| | |
|
| | |
|
| | |
| | | SELECT * FROM `yeshi_ec_user_system_coupon_record` cd
|
| | | LEFT JOIN `yeshi_ec_user_system_coupon` uc ON uc.`usc_id` = cd.`ucr_user_coupon_id`
|
| | | WHERE cd.`ucr_order_no` = #{orderNo}
|
| | | <if test="state != null">
|
| | | <if test="source != null">
|
| | | AND cd.`ucr_good_source` = #{source}
|
| | | </if>
|
| | | <if test="state != null">
|
| | |
| | | import com.yeshi.fanli.dao.user.count.DailyCountCouponDao;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountCoupon;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountCoupon.DailyCountCouponEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserSystemCoupon;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum;
|
| | | import com.yeshi.fanli.service.inter.count.DailyCountCouponService;
|
| | | import com.yeshi.fanli.service.inter.count.UserSystemCouponCountService;
|
| | |
| | | total = userSystemCouponCountService.countCouponNumByDay(CouponTypeEnum.rebatePercentCoupon, preDay);
|
| | | } else if (DailyCountCouponEnum.rebateCouponMoney == typeEnum) {
|
| | | total = userSystemCouponCountService.countRebateMoneyByDay(preDay);
|
| | | } else if (DailyCountCouponEnum.pullNewCouponNum == typeEnum) {
|
| | | total = userSystemCouponCountService.countCouponNumByDay(CouponTypeEnum.freeCoupon, preDay, UserSystemCoupon.SOURCE_PULL_NEW);
|
| | | } else if (DailyCountCouponEnum.pullNewCouponMoney == typeEnum) {
|
| | | total = userSystemCouponCountService.countFreeMoneyByTypeAndDay(CouponTypeEnum.freeCoupon, preDay, UserSystemCoupon.SOURCE_PULL_NEW);
|
| | | }
|
| | |
|
| | | if (total == null) {
|
| | |
| | |
|
| | | @Override
|
| | | public BigDecimal countFreeMoneyByTypeAndDay(CouponTypeEnum typeEnum, String preDay){
|
| | | return userSystemCouponCountMapper.countFreeMoneyByTypeAndDay(typeEnum.name(), preDay);
|
| | | return userSystemCouponCountMapper.countFreeMoneyByTypeAndDay(typeEnum.name(), preDay, null);
|
| | | }
|
| | | |
| | | @Override
|
| | | public BigDecimal countFreeMoneyByTypeAndDay(CouponTypeEnum typeEnum, String preDay, String source){
|
| | | return userSystemCouponCountMapper.countFreeMoneyByTypeAndDay(typeEnum.name(), preDay, source);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public BigDecimal countCouponNumByDay(CouponTypeEnum typeEnum, String preDay){
|
| | | return userSystemCouponCountMapper.countCouponNumByDay(typeEnum.name(), preDay);
|
| | | return userSystemCouponCountMapper.countCouponNumByDay(typeEnum.name(), preDay, null);
|
| | | }
|
| | | |
| | | @Override
|
| | | public BigDecimal countCouponNumByDay(CouponTypeEnum typeEnum, String preDay, String source){
|
| | | return userSystemCouponCountMapper.countCouponNumByDay(typeEnum.name(), preDay, source);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | * @return
|
| | | */
|
| | | public long countCouponNum(Long uid, Integer state, Integer activated, List<String> list, List<String> listSource);
|
| | |
|
| | | public BigDecimal countCouponNumByDay(CouponTypeEnum typeEnum, String preDay, String source);
|
| | |
|
| | | public BigDecimal countFreeMoneyByTypeAndDay(CouponTypeEnum typeEnum, String preDay, String source);
|
| | |
|
| | | }
|