去掉免押

This commit is contained in:
2025-09-23 23:52:09 +08:00
parent 0441587c7b
commit ba44e6c9ef
2 changed files with 3 additions and 19 deletions

View File

@ -32,9 +32,6 @@ public class CarModelSimpleDTO {
@ApiModelProperty("是否支持免押(0不支持 1支持)") @ApiModelProperty("是否支持免押(0不支持 1支持)")
private String depositFree; private String depositFree;
@ApiModelProperty("是否支持代扣(0不支持 1支持)")
private String autoDeduct;
@ApiModelProperty("电池类型") @ApiModelProperty("电池类型")
private String batteryType; private String batteryType;

View File

@ -14,8 +14,7 @@
cm.brand_name AS brand_name, cm.brand_name AS brand_name,
cm.image AS image, cm.image AS image,
GROUP_CONCAT(DISTINCT r.rental_type SEPARATOR ',') AS rental_types, GROUP_CONCAT(DISTINCT r.rental_type SEPARATOR ',') AS rental_types,
MAX(r.deposit_free) AS deposit_free, MAX(r.deposit_free) AS deposit_free
MAX(r.auto_deduct) AS auto_deduct
FROM FROM
zc_car_model cm zc_car_model cm
JOIN JOIN
@ -28,20 +27,8 @@
zc_rent_car_rule r ON mp.car_rule_id = r.id AND r.del_flag = '0' AND r.status = '0' zc_rent_car_rule r ON mp.car_rule_id = r.id AND r.del_flag = '0' AND r.status = '0'
<where> <where>
s.id = #{storeCarModelReq.storeId} s.id = #{storeCarModelReq.storeId}
<if test="(storeCarModelReq.depositFree != null and storeCarModelReq.depositFree != '') or (storeCarModelReq.autoDeduct != null and storeCarModelReq.autoDeduct != '')"> <if test="storeCarModelReq.depositFree != null and storeCarModelReq.depositFree != ''">
AND ( and r.deposit_free = #{storeCarModelReq.depositFree}
<choose>
<when test="storeCarModelReq.depositFree != null and storeCarModelReq.depositFree != '' and storeCarModelReq.autoDeduct != null and storeCarModelReq.autoDeduct != ''">
r.deposit_free = #{storeCarModelReq.depositFree} OR r.auto_deduct = #{storeCarModelReq.autoDeduct}
</when>
<when test="storeCarModelReq.depositFree != null and storeCarModelReq.depositFree != ''">
r.deposit_free = #{storeCarModelReq.depositFree}
</when>
<otherwise>
r.auto_deduct = #{storeCarModelReq.autoDeduct}
</otherwise>
</choose>
)
</if> </if>
AND cm.del_flag = '0' AND cm.status = '0' AND cm.del_flag = '0' AND cm.status = '0'
</where> </where>