| | |
| | | return tjVipSumDao.selectProjConsumeCnt(timeSpaceParam, shopId, null); |
| | | case "20" : |
| | | return tjVipSumDao.selectTimeLength(timeSpaceParam, shopId, null); |
| | | case "21" : |
| | | return tjVipSumDao.selectCardAmount(timeSpaceParam, shopId, null); |
| | | case "22" : |
| | | return tjVipSumDao.selectFreeAmount(timeSpaceParam, shopId, null); |
| | | default : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null); |
| | | } |
| | |
| | | return tjVipSumDao.selectProjConsumeCnt(timeSpaceParam, null, companyId); |
| | | case "20" : |
| | | return tjVipSumDao.selectTimeLength(timeSpaceParam, null, companyId); |
| | | case "21" : |
| | | return tjVipSumDao.selectCardAmount(timeSpaceParam, null, companyId); |
| | | case "22" : |
| | | return tjVipSumDao.selectFreeAmount(timeSpaceParam, null, companyId); |
| | | default : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId); |
| | | } |
| | |
| | | // 服务时长 |
| | | Map<String, BigDecimal> selectTimeLength(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 储值卡本金扣款 |
| | | Map<String, BigDecimal> selectCardAmount(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 储值卡赠金扣款 |
| | | Map<String, BigDecimal> selectFreeAmount(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | List<VipAchieveDataShowVo> selectVipAchieveInPage(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("userId") Long userId); |
| | | |
| | | // 订单业绩 |
| | |
| | | from area where id=1 |
| | | </select> |
| | | |
| | | <select id="selectCardAmount" resultType="java.util.TreeMap"> |
| | | select |
| | | <foreach collection="list" index="index" item="item" separator="," > |
| | | ( |
| | | select IFNULL(sum(IFNULL(amount, 0)), 0) |
| | | from sys_order_flow a |
| | | inner join sys_order b on a.order_id=b.id and b.STATU!='已取消' |
| | | where a.pay_method='储值卡' and a.is_gift='N' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]> |
| | | <if test="shopId != null"> |
| | | and a.shop_id=#{shopId} |
| | | </if> |
| | | <if test="companyId != null"> |
| | | and a.company_id=#{companyId} |
| | | </if> |
| | | ) as t${index} |
| | | |
| | | </foreach> |
| | | from area where id=1 |
| | | </select> |
| | | |
| | | <select id="selectFreeAmount" resultType="java.util.TreeMap"> |
| | | select |
| | | <foreach collection="list" index="index" item="item" separator="," > |
| | | ( |
| | | select IFNULL(sum(IFNULL(amount, 0)), 0) |
| | | from sys_order_flow a |
| | | inner join sys_order b on a.order_id=b.id and b.STATU!='已取消' |
| | | where a.pay_method='储值卡' and a.is_gift='Y' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]> |
| | | <if test="shopId != null"> |
| | | and a.shop_id=#{shopId} |
| | | </if> |
| | | <if test="companyId != null"> |
| | | and a.company_id=#{companyId} |
| | | </if> |
| | | ) as t${index} |
| | | |
| | | </foreach> |
| | | from area where id=1 |
| | | </select> |
| | | |
| | | <select id="selectVipAchieveInPage" resultType="com.matrix.system.app.vo.VipAchieveDataShowVo"> |
| | | <foreach collection="list" index="index" item="item" separator="union all" > |
| | | select |