This commit is contained in:
sxu 2023-12-06 16:43:13 +08:00
parent 3d06a48f9f
commit 10a6c56172
2 changed files with 29 additions and 3 deletions

View File

@ -35,4 +35,12 @@ public class DevInfoVo extends DevInfo {
private String type;
/**上下架id*/
private int upId;
private Integer monthLeasePriceMin;
private Integer monthLeasePriceMax;
private Integer ageMin;
private Integer ageMax;
private Integer workingHoursMin;
private Integer workingHoursMax;
private String monthLeasePriceOrderBy; // ASC or DESC
private String updateTimeOrderBy; // ASC or DESC
}

View File

@ -57,9 +57,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="brand != null and brand != ''"> and d.brand = #{brand}</if>
<if test="modelName != null and modelName != ''"> and d.model_name like concat('%', #{modelName}, '%')</if>
<if test="productionDate != null and productionDate != ''"> and d.production_date = #{productionDate}</if>
<if test="workingHours != null and workingHours != ''"> and d.working_hours = #{workingHours}</if>
<if test="workingHoursMin != null and workingHoursMin != '' and workingHoursMax != null and workingHoursMax != ''">
and d.working_hours &gt;= #{workingHoursMin} and d.working_hours &lt;= #{workingHoursMax}
</if>
<if test="serialNumber != null and serialNumber != ''"> and d.serial_number = #{serialNumber}</if>
<if test="monthLeasePrice != null and monthLeasePrice != ''"> and d.month_lease_price = #{monthLeasePrice}</if>
<if test="monthLeasePriceMin != null and monthLeasePriceMin != '' and monthLeasePriceMax != null and monthLeasePriceMax != ''">
and d.month_lease_price &gt;= #{monthLeasePriceMin} and d.month_lease_price &lt;= #{monthLeasePriceMax}
</if>
<if test="dayLeasePrice != null and dayLeasePrice != ''"> and d.day_lease_price = #{dayLeasePrice}</if>
<if test="picUrl != null and picUrl != ''"> and d.pic_url = #{picUrl}</if>
<if test="jsMonthPrice != null and jsMonthPrice != ''"> and d.js_month_price = #{jsMonthPrice}</if>
@ -84,6 +88,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</if>
</where>
order by
d.is_active
<if test="monthLeasePriceOrderBy != null and monthLeasePriceOrderBy == 'ASC'">
,d.month_lease_price
</if>
<if test="monthLeasePriceOrderBy != null and monthLeasePriceOrderBy == 'DESC'">
,d.month_lease_price DESC
</if>
<if test="updateTime != null and monthLeasePriceOrderBy == 'ASC'">
,d.update_time
</if>
<if test="updateTime != null and monthLeasePriceOrderBy == 'DESC'">
,d.update_time DESC
</if>
</select>
<select id="selectDevInfoHotList" parameterType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">