记得上下班打卡 | git大法好,push需谨慎

Commit ac94df69 authored by anjiabin's avatar anjiabin

提交演出数据

parent 035ff8fd
......@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceOrderStatisCountResp;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinPerformancesAdminServiceImpl;
import com.liquidnet.service.kylin.dao.PerformanceAdminListDao;
import com.liquidnet.service.kylin.dao.PerformanceMemberAuditDao;
......@@ -17,6 +18,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.List;
......@@ -95,7 +97,26 @@ public class KylinPerformancesController extends BaseController {
@RequiresPermissions("kylin:performances:performanceStatic")
@GetMapping(value = "/performanceStatic/{performancesId}")
public String performanceStatic(@PathVariable("performancesId") String performancesId, ModelMap mmap) {
//获取演出详情
KylinPerformanceMisVo performanceMisVo = kylinPerformancesService.performanceDetails(performancesId);
List<PerformanceOrderStatisticalDao> result = kylinPerformancesService.getPerformanceOrderStatisticalList(performancesId);
//构造top统计数据
PerformanceOrderStatisCountResp perCountResp = new PerformanceOrderStatisCountResp();
perCountResp.setPerformanceTitle(performanceMisVo.getTitle());
if(result.size()>=2){
PerformanceOrderStatisticalDao resdao = result.get(result.size()-1);
perCountResp.setTotalSalePrice(resdao.getTotalSalePrice());
perCountResp.setSaleGeneral(resdao.getSaleGeneral());
perCountResp.setTotalGeneral(resdao.getTotalGeneral());
perCountResp.setTotalExchange(resdao.getTotalExchange());
perCountResp.setSurplusExchange(resdao.getSurplusGeneral());
perCountResp.setTotalBuyUsers(resdao.getTotalBuyUsers());
perCountResp.setTotalDisPrice(BigDecimal.ONE);
perCountResp.setTotalRefundGeneral(resdao.getTotalRefundGeneral());
}
mmap.put("perCountResp", perCountResp);
mmap.put("perOrderStaticList", result);
return prefix + "/performancesStatic";
}
......
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: PerformanceCalendarReq
* @Package com.liquidnet.client.admin.zhengzai.kylin.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/6/1 15:47
*/
@Data
public class PerformanceOrderStatisCountResp {
/**
* 销售总金额
*/
String performanceTitle;
BigDecimal totalSalePrice;
BigDecimal saleGeneral;
BigDecimal totalGeneral;
BigDecimal totalExchange;
BigDecimal surplusExchange;
BigDecimal totalBuyUsers;
BigDecimal totalDisPrice; //分销金额
BigDecimal totalRefundGeneral;
}
......@@ -634,6 +634,23 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
@Override
public List<PerformanceOrderStatisticalDao> getPerformanceOrderStatisticalList(String performancesId) {
return performancesMapper.getPerformanceOrderStatisticalList(performancesId);
PerformanceOrderStatisticalDao countBean = new PerformanceOrderStatisticalDao();
countBean.setTitle("总计:");
List<PerformanceOrderStatisticalDao> dtoList = performancesMapper.getPerformanceOrderStatisticalList(performancesId);
dtoList.forEach(dto -> {
countBean.setTotalGeneral(countBean.getTotalGeneral().add(dto.getTotalGeneral()));
countBean.setSaleGeneral(countBean.getSaleGeneral().add(dto.getSaleGeneral()));
countBean.setSurplusGeneral(countBean.getSurplusGeneral().add(dto.getSurplusGeneral()));
countBean.setTotalSalePrice(countBean.getTotalSalePrice().add(dto.getTotalSalePrice()));
countBean.setTotalExchange(countBean.getTotalExchange().add(dto.getTotalExchange()));
countBean.setTotalRefundGeneral(countBean.getTotalRefundGeneral().add(dto.getTotalRefundGeneral()));
countBean.setTotalRefundPrice(countBean.getTotalRefundPrice().add(dto.getTotalRefundPrice()));
countBean.setTotalMemberNumber(countBean.getTotalMemberNumber().add(dto.getTotalMemberNumber()));
countBean.setTotalPayingNumber(countBean.getTotalPayingNumber().add(dto.getTotalPayingNumber()));
countBean.setTotalBuyUsers(dto.getTotalBuyUsers());
});
dtoList.add(countBean);
return dtoList;
}
}
......@@ -30,5 +30,6 @@ public class PerformanceOrderStatisticalDao {
private BigDecimal totalRefundGeneral;
private BigDecimal totalRefundPrice;
private BigDecimal totalMemberNumber;
private BigDecimal totalpayingNumber;
private BigDecimal totalPayingNumber;
private BigDecimal totalBuyUsers;
}
......@@ -74,17 +74,22 @@
</resultMap>
<resultMap id="performanceOrderStatisticalDaoResult" type="com.liquidnet.service.kylin.dao.PerformanceOrderStatisticalDao">
<result column="performances_id" property="performancesId"/>
<result column="tickets_id" property="ticketsId"/>
<result column="title" property="title"/>
<result column="use_start" property="useStart"/>
<result column="status" property="status"/>
<result column="time_start" property="timeStart"/>
<result column="price" property="price"/>
<result column="price_discount_member" property="priceDiscountMember"/>
<result column="advance_minute_member" property="advanceMinuteMember"/>
<result column="member_limit_count" property="memberLimitCount"/>
<result column="is_member" property="isMember"/>
<result column="is_exclusive" property="isExclusive"/>
<result column="type" property="type"/>
<result column="use_start" property="useStart"/>
<result column="total_general" property="totalGeneral"/>
<result column="sale_general" property="saleGeneral"/>
<result column="surplus_general" property="surplusGeneral"/>
<result column="total_sale_price" property="totalSalePrice"/>
<result column="total_exchange" property="totalExchange"/>
<result column="total_refund_general" property="totalRefundGeneral"/>
<result column="total_refund_price" property="totalRefundPrice"/>
<result column="total_member_number" property="totalMemberNumber"/>
<result column="total_paying_number" property="totalPayingNumber"/>
<result column="total_buy_users" property="totalBuyUsers"/>
</resultMap>
<!-- 第三方演出列表 (不包含退票信息) -->
......@@ -350,7 +355,8 @@
IFNULL(ot.total_refund_general , 0) AS 'total_refund_general',
IFNULL(ot.total_refund_price , 0) AS 'total_refund_price',
IFNULL(ot.total_member_number , 0) AS 'total_member_number',
IFNULL(ot.total_member_number , 0) AS 'total_paying_number'
IFNULL(ot.total_paying_number , 0) AS 'total_paying_number',
IFNULL(ut.total_buy_users , 0) AS 'total_buy_users'
FROM
(select t.performances_id from kylin_performances t where t.performances_id = ${performancesId}) AS kp
inner JOIN(
......@@ -373,7 +379,7 @@
inner join kylin_tickets kt on kt.tickets_id = ot.ticket_id
inner join kylin_ticket_status kts on kts.ticket_id = kt.tickets_id
inner JOIN(
select t.performance_id,count(t.user_id) from(
select t.performance_id,count(t.user_id) as 'total_buy_users' from(
SELECT
kotr.performance_id,
kot.user_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment