Commit 23a8f008 authored by hezhen's avatar hezhen

添加排序

parent 21bd1722
......@@ -56,6 +56,10 @@ public class TourDepartTimeVo {
@ApiModelProperty(value = "库存")
private Integer stock;
//是否过期
@ApiModelProperty(value = "是否过期")
private Integer overdue;
}
......@@ -17,7 +17,7 @@ public class TourGoodSpeController extends TourBaseController<TourGoodSpeBiz> {
//获取商品详情
//获取价格
@RequestMapping(value = "/user/prices", method = RequestMethod.POST)
public ObjectRestResponse<TourSpePriceVo> prices(@RequestBody TourSpePriceDto priceDto) {
return baseBiz.getPricesByuserid(priceDto);
......
......@@ -31,13 +31,14 @@
<result property="stock" column="stock"/>
<result property="startWeek" column="startWeek"/>
<result property="endWeek" column="endWeek"/>
<result property="overdue" column="overdue"/>
</resultMap>
<!-- 获取出行时间 -->
<select id="getAllByGoodId" resultMap="tourDepartTimeVoMap">
SELECT id,good_id,good_id,DATE_FORMAT(start_time,'%Y-%m-%d') as start_time,DATE_FORMAT(end_time,'%Y-%m-%d') as end_time,spe_id,price,child_price,member_price,stock,
DATE_FORMAT(start_time,'%w') as startWeek,DATE_FORMAT(end_time,'%w') as endWeek
FROM tour_good_spe_price WHERE good_id=#{goodId} and is_del=0
DATE_FORMAT(start_time,'%w') as startWeek,DATE_FORMAT(end_time,'%w') as endWeek,IF(IFNULL(DATEDIFF(start_time,NOW()),0)>0,'0','1') as overdue
FROM tour_good_spe_price WHERE good_id=#{goodId} and is_del=0 ORDER BY start_time
</select>
<!-- 减库存-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment