增加门店车辆列表查询接口

This commit is contained in:
2025-08-27 01:48:16 +08:00
parent ad399295c1
commit f1b4c24135
11 changed files with 186 additions and 6 deletions

View File

@ -29,7 +29,12 @@ spring:
password: Sczx123@
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
maximum-pool-size: 10
maximum-pool-size: 20 # 最大连接数
minimum-idle: 5 # 最小空闲连接数
connection-timeout: 30000 # 连接超时时间(毫秒)
idle-timeout: 600000 # 空闲连接超时时间(毫秒)
max-lifetime: 1800000 # 连接最大存活时间(毫秒)
leak-detection-threshold: 60000 # 连接泄漏检测阈值(毫秒)
auto-commit: true
connection_init_sql: SELECT 1
redis:

View File

@ -2,4 +2,52 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sczx.car.mapper.CarMapper">
<select id="pageStoreCar" resultType="com.sczx.car.dto.StoreCarDTO">
select
zc.id,
zc.vin,
zc.license_plate,
zc.brand_name,
zc.model_name,
zc.battery_type ,
ifnull(zom.overdue_days, 0) overdue_days,
(case
when ifnull(zc.package_id, 0)>0 then 'NON_PACKAGE'
when zc.brs_status = '9'
and ifnull(zom.overdue_days, 0) > 0
and zom.order_status = 'RENT_OVERDUE' then 'OVERDUE'
when zc.brs_status = '9'
and ifnull(zom.overdue_days, 0) = 0
and zom.order_status = 'RENT_ING' then 'RENTING'
when zc.brs_status = '0' then 'FREE'
when zc.brs_status = '1' then 'REMOVED'
END ) store_car_status
from
zc_car zc
left join (
select
*
from
zc_order_main
where
del_flag = 0
AND order_status not in ('AUTO_END', 'MANUAL_END')
and vehicle_id in (
select
id
from
zc_car
where
del_flag = 0
and status = 0
and store_id = #{storeCarReq.storeId}
<if test="storeCarReq.licensePlate != null and storeCarReq.licensePlate != ''">
and license_plate like concat('%', #{storeCarReq.licensePlate}, '%')
</if>
) )zom
on
zc.id = zom.vehicle_id
order by
zc.update_time desc
</select>
</mapper>