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

Commit 4919e9fc authored by 姜秀龙's avatar 姜秀龙

Merge branch 'refs/heads/master' into container

parents 3eea414f cfdf4132
......@@ -47,6 +47,10 @@
<div class="tab-content">
<div id="tab-1" class="tab-pane">
<div class="panel-body">
<!-- 导出按钮 -->
<div class="m-t-md" style="text-align: left; margin-bottom: 2px">
<button type="button" class="btn btn-primary" onclick="exportTableData()">导出数据</button>
</div>
<div id="tab-1" class="tab-pane">
<iframe id="tab_iframe_1" name="tab_iframe_1" marginwidth=0 marginheight=0 width=100%
height=800px frameborder=0></iframe>
......@@ -575,6 +579,15 @@
anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
});
}
/**
* 导出文件
*/
function exportTableData() {
var performancesId = '[[${kylinPerformanceMisVo.performancesId}]]'.replaceAll("\"", "")
var url = prefix + '/performance/export?performanceId=' + performancesId;
window.location.href = url; // 直接触发下载
}
</script>
</body>
</html>
......@@ -53,12 +53,12 @@
<div th:text="*{totalBuyUsers}">39</div>
</div>
</div>
<div class="col-lg-1">
<div>
<div>小家伙分销(元)</div>
<div th:text="*{totalDisPrice}">0</div>
</div>
</div>
<!-- <div class="col-lg-1">-->
<!-- <div>-->
<!-- <div>小家伙分销(元)</div>-->
<!-- <div th:text="*{totalDisPrice}">0</div>-->
<!-- </div>-->
<!-- </div>-->
<div class="col-lg-1">
<div>
<div>退票数量(张)</div>
......@@ -71,66 +71,75 @@
<thead>
<tr>
<th>
<div class="cell">票种名</div>
<div class="cell">场次</div>
</th>
<th>
<div class="cell">单价</div>
<div class="cell">票种类型</div>
</th>
<th>
<div class="cell">类型</div>
<div class="cell">票种名称</div>
</th>
<th>
<div class="cell">适用时间</div>
<div class="cell">票种价格</div>
</th>
<th>
<div class="cell">销售总数量</div>
<div class="cell">库存数量</div>
</th>
<th>
<div class="cell">会员销售数量</div>
<div class="cell">销售数量</div>
</th>
<th>
<div class="cell">库存数量</div>
<div class="cell">余票数量</div>
</th>
<th>
<div class="cell">登登登VIP购票数量</div>
</th>
<th>
<div class="cell">正在支付数量</div>
</th>
<th>
<div class="cell">退票数量</div>
<div class="cell">退票总数量</div>
</th>
<th>
<div class="cell">全额退票数量</div>
</th>
<th>
<div class="cell">手续费退票数量</div>
</th>
<th>
<div class="cell">羊毛券数量</div>
<div class="cell">退票手续费收益</div>
</th>
<th>
<div class="cell">销售额(元)</div>
<div class="cell">票面销售金额</div>
</th>
<!-- <th>-->
<!-- <div class="cell">兑换数量</div>-->
<!-- </th>-->
</tr>
</thead>
<tbody>
<tr th:each="respBean,respBeanStat:${perOrderStaticList}">
<td>
<div class="cell" th:text="${respBean.title}">180元区</div>
<div class="cell" th:text="${respBean.timeTitle}">180元区</div>
</td>
<td>
<div class="cell" th:text="${respBean.price}">180.00</div>
<div class="cell" th:text="${@dict.getLabel('zhengzai_ticket_type',respBean.type)}">0</div>
</td>
<td>
<div class="cell" th:text="${@dict.getLabel('zhengzai_ticket_type',respBean.type)}">0</div>
<div class="cell" th:text="${respBean.title}">0</div>
</td>
<td>
<div class="cell" >[[${respBean.useStart}]] - [[${respBean.useEnd}]]</div>
<div class="cell" th:text="${respBean.price}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.saleGeneral}">0</div>
<div class="cell" th:text="${respBean.totalGeneral}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.totalMemberNumber}">0</div>
<div class="cell" th:text="${respBean.saleGeneral}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.surplusGeneral}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.vipBuyTotal}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.totalPayingNumber}">0</div>
</td>
......@@ -138,16 +147,40 @@
<div class="cell" th:text="${respBean.totalRefundGeneral}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.totalVoucherCount}">0</div>
<div class="cell" th:text="${respBean.fullRefundTicketTotal}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.handlingFeeRefundTicketTotal}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.refundFeeRevenueTotal}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.totalSalePrice}">0</div>
<div class="cell" th:text="${respBean.audienceSalesAmountTotal}">0</div>
</td>
<!-- <td>-->
<!-- <div class="cell" th:text="${respBean.totalExchange}">0</div>-->
<!-- </td>-->
</tr>
</tbody>
<tfoot>
<tr th:object="${sumResp}">
<td><div class="cell">总计</div></td>
<td><div class="cell"></div></td>
<td><div class="cell"></div></td>
<td><div class="cell"></div></td>
<td><div class="cell" th:text="*{totalGeneralSum}">0</div></td>
<td><div class="cell" th:text="*{saleGeneralSum}">0</div></td>
<td><div class="cell" th:text="*{surplusGeneralSum}">0</div></td>
<td><div class="cell" th:text="*{vipBuyTotalSum}">0</div></td>
<td><div class="cell" th:text="*{totalPayingNumberSum}">0</div></td>
<td><div class="cell" th:text="*{totalRefundGeneralSum}">0</div></td>
<td><div class="cell" th:text="*{fullRefundTicketTotalSum}">0</div></td>
<td><div class="cell" th:text="*{handlingFeeRefundTicketTotalSum}">0</div></td>
<td><div class="cell" th:text="*{refundFeeRevenueTotalSum}">0</div></td>
<td><div class="cell" th:text="*{audienceSalesAmountTotalSum}">0</div></td>
</tr>
</tfoot>
</table>
<div style="display: none;">
<button type="button" class="el-button main el-button--primary el-button--medium"><!---->
......
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import lombok.Data;
@Data
public class OpenDataBaseResponse<T> {
private Integer code;
private String msg;
private T data;
public boolean isSucc(){
return this.code != null && this.code == 0;
}
}
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@Data
public class OpenDataSalesResponse extends OpenDataBaseResponse<List<PerformanceSalesDto>>{
}
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@Data
public class OpenDataTicketSalesResponse extends OpenDataBaseResponse<PerformanceTicketSalesDto>{
}
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import lombok.Data;
@Data
public class PerformanceSalesDto {
/**
* 演出ID
*/
private String performanceId;
/**
* 总库存
*/
private Integer totalGeneral;
/**
* 观众购票数
*/
private Integer audienceTicketTotal;
/**
* 剩余库存
*/
private Integer surplusGeneral;
/**
* 总销售额
*/
private String salesAmountTotal;
}
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import lombok.Data;
import java.util.List;
@Data
public class PerformanceTicketSalesDto {
/**
* 演出ID
*/
private String performanceId;
/**
* 演出名称
*/
private String performanceTitle;
/**
* 总销售票款(元)
*/
private String fullSalesAmountTotal;
/**
* 观众购票数
*/
private String fullAudienceTicketTotal;
/**
* 总库存
*/
private String fullTotalGeneral;
/**
* 退票数量(张)
*/
private String fullRefundTicketTotal;
/**
* 购买人数
*/
private String fullBuyTotal;
/**
* 票种销售数据
*/
private List<TicketSales> fullTicketDataList;
@Data
public static class TicketSales {
// 票ID
private String ticketId;
// 场次ID
private String timeId;
// 场次名称
private String timeTitle;
// 票种名称
private String ticketTitle;
// 票种金额
private String ticketPrice;
// 销售总金额
private String salesAmountTotal;
// 退票手续费总收益
private String refundFeeRevenueTotal;
// 观众购票总数[销售总票量-兑换码票总数] 销售数量
private String audienceTicketTotal;
// 观众购票销售总金额[票种金额* 观众购票总数] 票面销售金额
private String audienceSalesAmountTotal;
// 全额退票总数
private Integer fullRefundTicketTotal;
// 手续费退票总数
private Integer handlingFeeRefundTicketTotal;
// 退票总数量
private String refundTicketTotal;
// 票种类型 1:单日票 2:通票
private Integer ticketType;
// 库存数量
private String totalGeneral;
// 登登登VIP购买数量
private Integer vipBuyTotal;
// 正在支付数量
private String payingTotal;
// 剩余库存
private String surplusGeneral;
}
}
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class PerformanceTicketSumDto {
// 库存数量
private BigDecimal totalGeneralSum = BigDecimal.ZERO;
// 销售数量
private BigDecimal saleGeneralSum = BigDecimal.ZERO;
// 余票数量
private BigDecimal surplusGeneralSum = BigDecimal.ZERO;
//VIP购票数量
private BigDecimal vipBuyTotalSum = BigDecimal.ZERO;
//正在支付数量
private BigDecimal totalPayingNumberSum = BigDecimal.ZERO;
//退票总数量
private BigDecimal totalRefundGeneralSum = BigDecimal.ZERO;
//全额退票数量
private BigDecimal fullRefundTicketTotalSum = BigDecimal.ZERO;
//手续费退票数量
private BigDecimal handlingFeeRefundTicketTotalSum = BigDecimal.ZERO;
//退票手续费收益
private BigDecimal refundFeeRevenueTotalSum = BigDecimal.ZERO;
//票面销售金额
private BigDecimal audienceSalesAmountTotalSum = BigDecimal.ZERO;
}
package com.liquidnet.client.admin.zhengzai.kylin.service;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceSalesDto;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceTicketSalesDto;
import java.util.List;
/**
* 数据查询服务
*/
public interface IOpenDataService {
/**
* 获取演出销售数据
* @param performanceIdList
* @return
*/
List<PerformanceSalesDto> getPerformanceSalesInfo(List<String> performanceIdList);
/**
* 获取演出票销售数据
* @param performanceId
* @return
*/
PerformanceTicketSalesDto getPerformanceTicketSalesInfo(String performanceId);
}
......@@ -7,14 +7,14 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.liquidnet.client.admin.common.utils.StringUtils;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceSalesDto;
import com.liquidnet.client.admin.zhengzai.kylin.service.IOpenDataService;
import com.liquidnet.client.admin.zhengzai.kylin.service.InnerService;
import com.liquidnet.client.admin.zhengzai.kylin.utils.DataUtils;
import com.liquidnet.client.admin.zhengzai.kylin.utils.PerformanceVoUtils;
import com.liquidnet.client.admin.zhengzai.slime.service.ISlimeAuthorizationRecordsAdminService;
import com.liquidnet.client.admin.zhengzai.smile.utils.SmileRedisUtils;
import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.goblin.dto.vo.SmileAgentVo;
import com.liquidnet.service.kylin.constant.KylinRedisConst;
......@@ -104,6 +104,10 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
@Autowired
KylinPerformancesMapper kylinPerformancesMapper;
@Autowired
private IOpenDataService openDataService;
@Override
public void test() {
// //同步演出
......@@ -293,8 +297,31 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
List<PerformanceAdminListDao> newList = new ArrayList();
try {
Map<String, Object> map = BeanUtil.convertBeanToMap(performanceAdminListParam);
List<PerformanceAdminListDao> voList = performancesMapper.misPerformanceList(map);
List<PerformanceAdminListDao> voList = performancesMapper.misPerformanceListV2(map);
List<String> performanceIdList = voList.stream().map(PerformanceAdminListDao::getPerformancesId)
.collect(Collectors.toList());
Map<String, PerformanceSalesDto> salesDtoMap = new HashMap<>();
if (!performanceIdList.isEmpty()) {
// 获取演出销售数据
List<PerformanceSalesDto> performanceSalesInfoList = openDataService.getPerformanceSalesInfo(performanceIdList);
if (!performanceSalesInfoList.isEmpty()) {
salesDtoMap = performanceSalesInfoList.stream()
.collect(Collectors.toMap(
PerformanceSalesDto::getPerformanceId,
performanceSalesDto -> performanceSalesDto
));
}
}
for (PerformanceAdminListDao item : voList) {
// 修改售卖数据
PerformanceSalesDto performanceSalesDto = salesDtoMap.get(item.getPerformancesId());
if (performanceSalesDto != null) {
item.setTotalGeneral(performanceSalesDto.getTotalGeneral());
item.setTotalSalePrice(new BigDecimal(performanceSalesDto.getSalesAmountTotal()));
item.setSaleGeneral(performanceSalesDto.getAudienceTicketTotal());
item.setSurplusGeneral(performanceSalesDto.getSurplusGeneral());
}
if (item.getTimeSell() == null || item.getTimeStop() == null) {
continue;
}
......
package com.liquidnet.client.admin.zhengzai.kylin.service.impl;
import com.liquidnet.client.admin.zhengzai.kylin.dto.OpenDataSalesResponse;
import com.liquidnet.client.admin.zhengzai.kylin.dto.OpenDataTicketSalesResponse;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceSalesDto;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceTicketSalesDto;
import com.liquidnet.client.admin.zhengzai.kylin.service.IOpenDataService;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.commons.lang.util.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@Slf4j
@Service
public class OpenDataServiceImpl implements IOpenDataService {
@Value("${liquidnet.openData.host}")
private String openDataHost;
@Value("${liquidnet.openData.auth}")
private String openDataAuth;
@Override
public List<PerformanceSalesDto> getPerformanceSalesInfo(List<String> performanceIdList) {
HashMap<String, List<String>> map = new HashMap<>();
map.put("performanceIds", performanceIdList);
HttpHeaders headers = new HttpHeaders();
headers.set(HttpHeaders.AUTHORIZATION, openDataAuth);
try {
String postJson = HttpUtil.postJson(openDataHost + "/api/performance/sales", JsonUtils.toJson(map), headers);
log.info("response: {}", postJson);
if (StringUtil.isBlank(postJson)) {
return Collections.emptyList();
}
OpenDataSalesResponse openDataSalesResponse = JsonUtils.fromJson(postJson, OpenDataSalesResponse.class);
if (!openDataSalesResponse.isSucc()) {
return Collections.emptyList();
}
return openDataSalesResponse.getData();
} catch (Exception e) {
log.error("error", e);
}
return Collections.emptyList();
}
@Override
public PerformanceTicketSalesDto getPerformanceTicketSalesInfo(String performanceId) {
HttpHeaders headers = new HttpHeaders();
headers.set(HttpHeaders.AUTHORIZATION, openDataAuth);
try {
String responseStr = HttpUtil.getByUri(openDataHost + "/api/performance/ticket/sales?performanceId=" + performanceId, headers);
log.info("response: {}", responseStr);
if (StringUtil.isBlank(responseStr)) {
return null;
}
OpenDataTicketSalesResponse openDataSalesResponse = JsonUtils.fromJson(responseStr, OpenDataTicketSalesResponse.class);
if (!openDataSalesResponse.isSucc()) {
return null;
}
return openDataSalesResponse.getData();
} catch (Exception e) {
log.error("error", e);
}
return null;
}
}
package com.liquidnet.client.admin.zhengzai.kylin.utils;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceTicketSumDto;
import com.liquidnet.service.kylin.dao.PerformanceOrderStatisticalDao;
import java.math.BigDecimal;
import java.util.List;
public class DataSumUtils {
public static PerformanceTicketSumDto sumStatistics(List<PerformanceOrderStatisticalDao> list) {
// 初始化所有需要统计的字段(BigDecimal类型)
BigDecimal totalGeneralSum = BigDecimal.ZERO;
BigDecimal saleGeneralSum = BigDecimal.ZERO;
BigDecimal surplusGeneralSum = BigDecimal.ZERO;
BigDecimal vipBuyTotalSum = BigDecimal.ZERO;
BigDecimal totalPayingNumberSum = BigDecimal.ZERO;
BigDecimal totalRefundGeneralSum = BigDecimal.ZERO;
BigDecimal fullRefundTicketTotalSum = BigDecimal.ZERO;
BigDecimal handlingFeeRefundTicketTotalSum = BigDecimal.ZERO;
BigDecimal refundFeeRevenueTotalSum = BigDecimal.ZERO;
BigDecimal audienceSalesAmountTotalSum = BigDecimal.ZERO;
// 遍历列表进行累加
for (PerformanceOrderStatisticalDao item : list) {
// BigDecimal类型字段
totalGeneralSum = safeAdd(totalGeneralSum, item.getTotalGeneral());
saleGeneralSum = safeAdd(saleGeneralSum, item.getSaleGeneral());
surplusGeneralSum = safeAdd(surplusGeneralSum, item.getSurplusGeneral());
totalPayingNumberSum = safeAdd(totalPayingNumberSum, item.getTotalPayingNumber());
totalRefundGeneralSum = safeAdd(totalRefundGeneralSum, item.getTotalRefundGeneral());
refundFeeRevenueTotalSum = safeAdd(refundFeeRevenueTotalSum, item.getRefundFeeRevenueTotal());
audienceSalesAmountTotalSum = safeAdd(audienceSalesAmountTotalSum, item.getAudienceSalesAmountTotal());
// Integer类型字段转换
vipBuyTotalSum = safeAdd(vipBuyTotalSum, BigDecimal.valueOf(item.getVipBuyTotal()));
fullRefundTicketTotalSum = safeAdd(fullRefundTicketTotalSum, BigDecimal.valueOf(item.getFullRefundTicketTotal()));
handlingFeeRefundTicketTotalSum = safeAdd(handlingFeeRefundTicketTotalSum,
BigDecimal.valueOf(item.getHandlingFeeRefundTicketTotal()));
}
PerformanceTicketSumDto sumDto = new PerformanceTicketSumDto();
sumDto.setTotalGeneralSum(totalGeneralSum); // 库存数量
sumDto.setSaleGeneralSum(saleGeneralSum); // 销售数量
sumDto.setSurplusGeneralSum(surplusGeneralSum); // 余票数量
sumDto.setVipBuyTotalSum(vipBuyTotalSum);//VIP购票数量
sumDto.setTotalPayingNumberSum(totalPayingNumberSum);//正在支付数量
sumDto.setTotalRefundGeneralSum(totalRefundGeneralSum);//退票总数量
sumDto.setFullRefundTicketTotalSum(fullRefundTicketTotalSum);//全额退票数量
sumDto.setHandlingFeeRefundTicketTotalSum(handlingFeeRefundTicketTotalSum);//手续费退票数量
sumDto.setRefundFeeRevenueTotalSum(refundFeeRevenueTotalSum);//退票手续费收益
sumDto.setAudienceSalesAmountTotalSum(audienceSalesAmountTotalSum);//票面销售金额
return sumDto;
}
// 安全的BigDecimal加法(处理null值)
private static BigDecimal safeAdd(BigDecimal sum, BigDecimal value) {
if (value == null) {
return sum;
}
return sum.add(value);
}
}
......@@ -22,5 +22,8 @@ liquidnet:
mongodb:
sslEnabled: false
database: dev_ln_scene
openData:
host: http://localhost:8091
auth: t-gI1wT4kM4qF2bB4mJ4zQ1gM6cU6dC9uB
# end-dev-这里是配置信息基本值
\ No newline at end of file
......@@ -22,5 +22,8 @@ liquidnet:
mongodb:
sslEnabled: false
database: test_ln_scene
openData:
host: https://testopen.zhengzai.tv
auth: t-gI1wT4kM4qF2bB4mJ4zQ1gM6cU6dC9uB
# end-test-这里是配置信息基本值
\ No newline at end of file
......@@ -3,7 +3,6 @@ package com.liquidnet.service.kylin.dao;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
......@@ -18,23 +17,46 @@ import java.time.LocalDateTime;
public class PerformanceOrderStatisticalDao implements Cloneable{
private String performancesId;
private String ticketsId;
private String title;
private BigDecimal price;
private Integer type;
private String title;// 票种名称
private BigDecimal price;// 票种价格
private Integer type;// 票种类型
private String useStart;
private String useEnd;
private BigDecimal totalGeneral = BigDecimal.ZERO;
private BigDecimal saleGeneral = BigDecimal.ZERO;
private BigDecimal surplusGeneral = BigDecimal.ZERO;
private BigDecimal totalGeneral = BigDecimal.ZERO;// 库存数量
private BigDecimal saleGeneral = BigDecimal.ZERO;// 销售数量
private BigDecimal surplusGeneral = BigDecimal.ZERO; // 余票数量
private BigDecimal totalSalePrice = BigDecimal.ZERO;
private BigDecimal totalExchange = BigDecimal.ZERO;
private BigDecimal totalRefundGeneral = BigDecimal.ZERO;
private BigDecimal totalRefundGeneral = BigDecimal.ZERO; // 退票总数量
private BigDecimal totalRefundPrice = BigDecimal.ZERO;
private BigDecimal totalMemberNumber = BigDecimal.ZERO;
private BigDecimal totalPayingNumber = BigDecimal.ZERO;
private BigDecimal totalPayingNumber = BigDecimal.ZERO;// 正在支付数量
private BigDecimal totalBuyUsers = BigDecimal.ZERO;
private BigDecimal totalVoucherCount = BigDecimal.ZERO;
// 场次ID
private String timeId;
// 场次名称
private String timeTitle;
// vip购票数量
private Integer vipBuyTotal = 0;
// 全额退票总数
private Integer fullRefundTicketTotal = 0;
// 手续费退票总数
private Integer handlingFeeRefundTicketTotal = 0;
// 退票手续费总收益
private BigDecimal refundFeeRevenueTotal = BigDecimal.ZERO;
// 票面销售金额
private BigDecimal audienceSalesAmountTotal = BigDecimal.ZERO;
private static final PerformanceOrderStatisticalDao obj = new PerformanceOrderStatisticalDao();
public static PerformanceOrderStatisticalDao getNew() {
try {
......
......@@ -28,6 +28,8 @@ public interface KylinPerformancesMapper extends BaseMapper<KylinPerformances> {
//列表
List<PerformanceAdminListDao> misPerformanceList(Map<String,Object> map);
List<PerformanceAdminListDao> misPerformanceListV2(Map<String,Object> map);
//根据巡演查询 通过审核演出列表
List<PerformanceTitleDao> misTitleByRoadShowIdList(String roadShowId);
......
......@@ -376,6 +376,74 @@
ORDER BY ${orderItem} ${orderSc}
</if>
</select>
<select id="misPerformanceListV2" parameterType="java.util.Map" resultMap="misPerformanceListResult">
SELECT
p.performances_id ,
p.sponsor,
p.audit_time,
p.sort,
p.title ,
p.type,
p.time_start ,
p.time_end ,
ps.sync_damai ,
t.time_sell,
t.time_stop,
ps.`status` ,
ps.audit_status ,
ps.field_audit_status,
p.reject_txt ,
p.created_at
FROM
kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN(
SELECT
ttr.performance_id ,
MIN(
DATE_SUB(
t.time_start ,
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell' ,
MAX(t.time_end) AS 'time_stop'
FROM
kylin_ticket_status AS ts
LEFT JOIN kylin_ticket_relations AS tr ON tr.ticket_id = ts.ticket_id
LEFT JOIN kylin_tickets AS t ON t.tickets_id = ts.ticket_id
LEFT JOIN kylin_ticket_time_relation AS ttr ON tr.times_id = ttr.times_id
GROUP BY
ttr.performance_id
) AS t ON p.performances_id = t.performance_id
<where>
<if test="title!=''">
AND title LIKE concat('%', #{title}, '%')
</if>
<if test="cityName!=''">
AND city_name LIKE concat('%', #{cityName}, '%')
</if>
<if test="status!='-2'">
AND ps.STATUS = #{status}
</if>
<if test="status=='-2'">
AND (ps.STATUS >= 3 or ps.STATUS = 1)
</if>
<if test="auditStatus!='-2'">
AND ps.audit_status = #{auditStatus}
</if>
<!-- <if test="auditStatus=='-2'">-->
<!-- AND (ps.audit_status = 0 or ps.audit_status = 1 or ps.audit_status = 2)-->
<!-- </if>-->
<if test="stopSellDay!=-2">
AND p.time_end BETWEEN #{stopSellTime} AND NOW()
</if>
</where>
<if test="orderItem!=''">
ORDER BY ${orderItem} ${orderSc}
</if>
</select>
<!-- Mis 根据巡演查询演出列表 -->
<select id="misTitleByRoadShowIdList" parameterType="java.lang.String" resultMap="performanceTitleDaoResult">
SELECT performances_id,
......
......@@ -47,7 +47,7 @@ public class OrderRefundCallbackController {
//延迟5秒执行
ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
scheduler.schedule(() -> {
orderRefundsCallbackServiceImpl.automaticRefund(orderRefundsId);
orderRefundsCallbackServiceImpl.automaticRefund(orderRefundsId);
}, 5, TimeUnit.SECONDS);
return ResponseDto.success("success");
}
......
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