From f54eaccdd28bfc119932c966880655ac97938019 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Fri, 4 Jan 2019 23:28:40 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A0=8D=E4=BB=B7][=E6=96=B0=E5=A2=9E]:?= =?UTF-8?q?=E7=A0=8D=E4=BB=B7=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxCouponController.java | 12 +- .../com/iformall/mapper/WxCouponMapper.java | 1 + .../service/impl/WxCouponServiceImpl.java | 8 +- .../main/resources/mapper/WxCouponMapper.xml | 135 ++++++++++++++++++ 4 files changed, 151 insertions(+), 5 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java index f65759037..ad50854f7 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java @@ -102,7 +102,7 @@ public class WxCouponController extends BaseController { return listType(wxCoupon, pageNum, pageSize, 0); //券列表 } - @ApiOperation("分页列表接口") + @ApiOperation("卡分页列表接口") @GetMapping("listCard") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), @@ -112,6 +112,16 @@ public class WxCouponController extends BaseController { return listType(wxCoupon, pageNum, pageSize, EnumCouponType.CARD_MULTIMCH.getCode()); //卡列表 } + @ApiOperation("砍价分页列表接口") + @GetMapping("listPress") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), + @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) + public ResultData listPress(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { + logger.debug("[" + getIpAddr() + "] WxCouponController::listPress"); + return listType(wxCoupon, pageNum, pageSize, EnumCouponType.COUPON_PRESS.getCode()); //砍价列表 + } + @ApiOperation("分页列表接口") @GetMapping("list") @ApiImplicitParams({ diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java index 49064d20d..58688b440 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java @@ -12,6 +12,7 @@ public interface WxCouponMapper extends CommonMapper { List findList(WxCoupon wxCoupon); List findCardList(WxCoupon wxCoupon); List findCouponList(WxCoupon wxCoupon); + List findPressList(WxCoupon wxCoupon); WxCouponCVo findVoDetail(@Param("id")Long id); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java index 7bdf6f7d5..81791b0ae 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java @@ -51,11 +51,11 @@ public class WxCouponServiceImpl implements WxCouponService { public PageInfo listAsPage(WxCoupon record, Integer pageIndex, Integer pageSize, Integer type) { if (type == null) { return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponMapper.findList(record)); - } - else if (type.equals(EnumCouponType.CARD_MULTIMCH.getCode())) { + } else if (type.equals(EnumCouponType.CARD_MULTIMCH.getCode())) { return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponMapper.findCardList(record)); - } - else { + } else if (type.equals(EnumCouponType.COUPON_PRESS.getCode())) { + return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponMapper.findPressList(record)); + } else { return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponMapper.findCouponList(record)); } } diff --git a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml index 140fcbfbd..0c63828b8 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml @@ -445,6 +445,141 @@ + + where `type` = 8 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + + and `type` = #{type} + + + + and `cover_img` like concat('%', #{coverImg},'%') + + + + and `title` like concat('%', #{title},'%') + + + + and `sub_title` like concat('%', #{subTitle},'%') + + + + and `sale_price` = #{salePrice} + + + + and `use_price` = #{usePrice} + + + + and `use_limit_quantity` = #{useLimitQuantity} + + + + and `send_type` = #{sendType} + + + + and `valid_type` = #{validType} + + + + and `valid_start_date` = #{validStartDate} + + + + and `valid_end_date` = #{validEndDate} + + + + and `valid_days` = #{validDays} + + + + and `detail` like concat('%', #{detail},'%') + + + + and `price` = #{price} + + + + and `unit` = #{unit} + + + + and `remain_inventory` = #{remainInventory} + + + + and `inventory` = #{inventory} + + + + and `remark` like concat('%', #{remark},'%') + + + + and `status` = #{status} + + + + and `create_date` between #{startdate} and #{enddate} + + + + and `update_date` = #{updateDate} + + + + and `business` = #{business} + + + + and `support_transfer` = #{supportTransfer} + + + + and `subsidy_type` = #{subsidyType} + + + + and `subsidy_num` = #{subsidyNum} + + + + and `press_limit_num` = #{pressLimitNum} + + + + and `press_limit_hours` = #{pressLimitHours} + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + +