去掉免押
This commit is contained in:
@ -32,9 +32,6 @@ public class CarModelSimpleDTO {
|
||||
@ApiModelProperty("是否支持免押(0不支持 1支持)")
|
||||
private String depositFree;
|
||||
|
||||
@ApiModelProperty("是否支持代扣(0不支持 1支持)")
|
||||
private String autoDeduct;
|
||||
|
||||
@ApiModelProperty("电池类型")
|
||||
private String batteryType;
|
||||
|
||||
|
||||
@ -14,8 +14,7 @@
|
||||
cm.brand_name AS brand_name,
|
||||
cm.image AS image,
|
||||
GROUP_CONCAT(DISTINCT r.rental_type SEPARATOR ',') AS rental_types,
|
||||
MAX(r.deposit_free) AS deposit_free,
|
||||
MAX(r.auto_deduct) AS auto_deduct
|
||||
MAX(r.deposit_free) AS deposit_free
|
||||
FROM
|
||||
zc_car_model cm
|
||||
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'
|
||||
<where>
|
||||
s.id = #{storeCarModelReq.storeId}
|
||||
<if test="(storeCarModelReq.depositFree != null and storeCarModelReq.depositFree != '') or (storeCarModelReq.autoDeduct != null and storeCarModelReq.autoDeduct != '')">
|
||||
AND (
|
||||
<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 test="storeCarModelReq.depositFree != null and storeCarModelReq.depositFree != ''">
|
||||
and r.deposit_free = #{storeCarModelReq.depositFree}
|
||||
</if>
|
||||
AND cm.del_flag = '0' AND cm.status = '0'
|
||||
</where>
|
||||
|
||||
Reference in New Issue
Block a user