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

Commit 3224a3a0 authored by GaoHu's avatar GaoHu

演出列表展示bug

parent 9a91690a
......@@ -50,7 +50,7 @@ public class ShowVo implements Serializable {
* 总销售代理
*/
@ApiModelProperty(value = "总销售代理人数")
private Long totalOutAgent;
private Integer totalOutAgent;
/**
* 演出结束时间
......@@ -137,7 +137,6 @@ public class ShowVo implements Serializable {
this.setOpen(kylinPerformancesDto.getOpen() == null ? BigDecimal.valueOf(0) : kylinPerformancesDto.getOpen());
this.setPerformancesId(kylinPerformancesDto.getPerformancesId());
this.setTimeEnd(kylinPerformancesDto.getTimeEnd());
this.setTotalOutAgent(kylinPerformancesDto.getTotalOutAgent());
return this;
}
}
......@@ -17,6 +17,7 @@ import com.liquidnet.service.goblin.constant.SmileRedisConst;
import com.liquidnet.service.kylin.dao.TicketAndStatusDao;
import com.liquidnet.service.kylin.dao.report.KylinPerformancesDto;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import com.liquidnet.service.kylin.entity.KylinOrderTicketRelations;
import com.liquidnet.service.kylin.entity.KylinPerformanceStatus;
import com.liquidnet.service.kylin.entity.KylinPerformances;
import com.liquidnet.service.kylin.mapper.*;
......@@ -96,6 +97,8 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
List<KylinPerformancesDto> kylinPerformancesList = kylinPerformancesMapper.selectPerIdByAgent();
List<ShowVo> showVoList = kylinPerformancesList.stream().map(kylinPerformancesDto -> {
ShowVo vo = ShowVo.getNew().copy(kylinPerformancesDto);
Integer ordNum = kylinOrderTicketRelationsMapper.concatByAgentDed(kylinPerformancesDto.getPerformancesId());
vo.setTotalOutAgent(ordNum);
//打款状态
vo.setStatus(smileRedisUtils.getShowStatus(kylinPerformancesDto.getPerformancesId()));
return vo;
......
......@@ -48,11 +48,6 @@ public class KylinPerformancesDto implements Serializable, Cloneable {
*/
private BigDecimal totalSalePrice;
/**
* 总销售代理
*/
private Long totalOutAgent;
/**
* 演出结束时间
*/
......
......@@ -18,5 +18,5 @@ public interface KylinOrderTicketRelationsMapper extends BaseMapper<KylinOrderTi
Integer concatByAgent(@Param("performancesId") String performancesId);
List<Long> concatByAgentDed(@Param("performancesId") String performancesId);
Integer concatByAgentDed(@Param("performancesId") String performancesId);
}
......@@ -3,11 +3,22 @@
<mapper namespace="com.liquidnet.service.kylin.mapper.KylinOrderTicketRelationsMapper">
<select id="concatByAgent" resultType="Long">
SELECT count(*) FROM kylin_order_ticket_relations WHERE agent_id != 0 AND performance_id = #{performancesId};
SELECT count(*)
FROM kylin_order_ticket_relations
WHERE agent_id != 0
AND performance_id = #{performancesId};
</select>
<select id="concatByAgentDed" resultType="Long">
SELECT COUNT(*) FROM (SELECT agent_id FROM kylin_order_ticket_relations WHERE agent_id != 0 AND performance_id = #{performancesId} group by agent_id) kotr;
<select id="concatByAgentDed" resultType="Integer">
SELECT COUNT(kk.mid)
FROM (
SELECT kotr.mid, kotr.agent_id
FROM kylin_order_ticket_relations as kotr
LEFT JOIN kylin_order_ticket_status AS kots ON kotr.order_id = kots.order_id
WHERE kots.pay_status = 1
AND kotr.agent_id != 0
AND kotr.performance_id = #{performancesId}
group by kotr.agent_id) kk;
</select>
......
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