Commit fe16d531 by lanpingxiong

Merge branch 'dev/lanpingxiong' into 'master'

Dev/lanpingxiong

See merge request hewei/Jumeirah!69
parents 785db346 49b0cd8f
......@@ -40,7 +40,7 @@ public class StrokeDiscountController extends BaseController {
@OperationLog(name = "优惠行程表分页列表", type = OperationLogType.PAGE)
@ApiOperation(value = "优惠行程表分页列表")
public ApiResult<Paging<StrokeDiscountQueryVo>> getStrokeDiscountPageList(@Validated @RequestBody StrokeDiscountPageParam strokeDiscountPageParam) throws Exception {
Paging<StrokeDiscountQueryVo> paging = strokeDiscountService.getStrokeDiscountPageList(strokeDiscountPageParam);
Paging<StrokeDiscountQueryVo> paging = strokeDiscountService.getAppStrokeDiscountPageList(strokeDiscountPageParam);
return ApiResult.ok(paging);
}
......
......@@ -41,4 +41,14 @@ public interface StrokeDiscountMapper extends BaseMapper<StrokeDiscount> {
IPage<StrokeDiscountQueryVo> getStrokeDiscountPageList(
@Param("page") Page page, @Param("param") StrokeDiscountPageParam strokeDiscountPageParam, @Param("mcId") Long mcId);
/**
* 获取分页对象
*
* @param page
* @param strokeDiscountPageParam
* @return
*/
IPage<StrokeDiscountQueryVo> getAppStrokeDiscountPageList(
@Param("page") Page page, @Param("param") StrokeDiscountPageParam strokeDiscountPageParam);
}
......@@ -59,4 +59,10 @@ public interface StrokeDiscountService extends BaseService<StrokeDiscount> {
*/
Paging<StrokeDiscountQueryVo> getStrokeDiscountPageList(StrokeDiscountPageParam strokeDiscountPageParam) throws Exception;
/**
* APP端获取分页对象
* @param strokeDiscountPageParam
* @return
*/
Paging<StrokeDiscountQueryVo> getAppStrokeDiscountPageList(StrokeDiscountPageParam strokeDiscountPageParam);
}
......@@ -66,4 +66,11 @@ public class StrokeDiscountServiceImpl extends BaseServiceImpl<StrokeDiscountMap
return new Paging<StrokeDiscountQueryVo>(iPage);
}
@Override
public Paging<StrokeDiscountQueryVo> getAppStrokeDiscountPageList(StrokeDiscountPageParam strokeDiscountPageParam) {
Page<StrokeDiscountQueryVo> page = new PageInfo<>(strokeDiscountPageParam, OrderItem.desc(getLambdaColumn(StrokeDiscount::getCreateTime)));
IPage<StrokeDiscountQueryVo> iPage = strokeDiscountMapper.getAppStrokeDiscountPageList(page, strokeDiscountPageParam);
return new Paging<StrokeDiscountQueryVo>(iPage);
}
}
......@@ -47,4 +47,19 @@
where sd.mc_id = #{mcId}
</select>
<select id="getAppStrokeDiscountPageList" parameterType="com.jumeirah.common.param.StrokeDiscountPageParam"
resultType="com.jumeirah.common.vo.StrokeDiscountQueryVo">
select
ctco.city_name_cn as city_outset_name,
ctca.city_name_cn as city_arrive_name,
pt.name as plain_type_name,
<include refid="Base_Column_List"/>
from stroke_discount sd
INNER JOIN city_three_code ctco ON ctco.id = sd.city_outset_id
INNER JOIN city_three_code ctca ON ctca.id = sd.city_arrive_id
INNER JOIN plain_type pt ON pt.id = sd.plain_type_id
where sd.status = 0
and sd.seat_num &gt; 0
</select>
</mapper>
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