This commit is contained in:
YAS\29473
2025-12-31 16:02:46 +08:00
parent a5fac3091f
commit 2347445e74
4 changed files with 17 additions and 12 deletions

View File

@@ -352,7 +352,7 @@ public interface OrderBasicInfoMapper {
* @param dto 查询条件
* @return 统计结果
*/
com.jsowell.pile.vo.web.OrderStatisticsVO countBusinessOrderStatistics(QueryOrderDTO dto);
OrderStatisticsVO countBusinessOrderStatistics(QueryOrderDTO dto);
List<OrderBasicInfo> queryRepayOrder(String memberId);

View File

@@ -6325,6 +6325,7 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
.map(order -> BusinessOrderListVO.builder()
.createTime(order.getCreateTime())
.startMode(order.getStartMode())
.orderCode(order.getOrderCode())
.orderAmount(StringUtils.isNotBlank(order.getOrderAmount())
? new BigDecimal(order.getOrderAmount()) : BigDecimal.ZERO)
.chargingDegree(StringUtils.isNotBlank(order.getChargingDegree())

View File

@@ -18,6 +18,12 @@ import java.math.BigDecimal;
@NoArgsConstructor
@Builder
public class BusinessOrderListVO {
/**
* 订单编号
*/
private String orderCode;
/**
* 创建时间
*/

View File

@@ -2070,28 +2070,26 @@
resultType="com.jsowell.pile.vo.web.OrderStatisticsVO">
select
COUNT(*) as orderCount,
IFNULL(SUM(t1.order_amount), 0) as orderAmount
from order_basic_info t1
left join member_basic_info t2 on t1.member_id = t2.member_id and t2.del_flag = '0'
join pile_station_info t3 on t1.station_id = t3.id and t3.del_flag = '0'
where t1.del_flag = '0'
IFNULL(SUM(order_amount), 0) as orderAmount
from order_basic_info
where del_flag = '0'
<if test="orderStatus != null and orderStatus != ''">
and t1.order_status = #{orderStatus,jdbcType=VARCHAR}
and order_status = #{orderStatus,jdbcType=VARCHAR}
</if>
<if test="merchantId != null and merchantId != ''">
and t1.merchant_id = #{merchantId,jdbcType=VARCHAR}
and merchant_id = #{merchantId,jdbcType=VARCHAR}
</if>
<if test="stationId != null and stationId != ''">
and t1.station_id = #{stationId,jdbcType=VARCHAR}
and station_id = #{stationId,jdbcType=VARCHAR}
</if>
<if test="startTime != null and startTime != ''">
and t1.create_time <![CDATA[ >= ]]> #{startTime,jdbcType=VARCHAR}
and create_time <![CDATA[ >= ]]> #{startTime,jdbcType=VARCHAR}
</if>
<if test="endTime != null and endTime != ''">
and t1.create_time <![CDATA[ <= ]]> #{endTime,jdbcType=VARCHAR}
and create_time <![CDATA[ <= ]]> #{endTime,jdbcType=VARCHAR}
</if>
<if test="stationIdList != null and stationIdList.size() != 0">
and t1.station_id in
and station_id in
<foreach collection="stationIdList" item="stationId" open="(" separator="," close=")">
#{stationId}
</foreach>