From 18a5841c23b5ecfa75c7c4304604743361e30f18 Mon Sep 17 00:00:00 2001 From: hupeng Date: Tue, 28 Aug 2018 14:49:59 +0800 Subject: [PATCH] =?UTF-8?q?[A=E7=AB=AF][=E4=BF=AE=E5=A4=8D]:=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=88=B8=E5=88=97=E8=A1=A8=E5=85=A8=E9=83=A8=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E6=98=BE=E7=A4=BA=E4=BD=9C=E5=BA=9F=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../simple/controller/WxCouponController.java | 9 +- .../com/simple/mapper/WxCouponMapper.java | 1 - .../com/simple/service/WxCouponService.java | 9 -- .../service/impl/WxCouponServiceImpl.java | 5 - .../main/resources/mapper/WxCouponMapper.xml | 142 ------------------ 5 files changed, 4 insertions(+), 162 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/simple/controller/WxCouponController.java b/mallinkAdmin/src/main/java/com/simple/controller/WxCouponController.java index 4e47f2e65..9e85e2383 100644 --- a/mallinkAdmin/src/main/java/com/simple/controller/WxCouponController.java +++ b/mallinkAdmin/src/main/java/com/simple/controller/WxCouponController.java @@ -57,11 +57,10 @@ public class WxCouponController extends BaseController if (null == wxCoupon) wxCoupon = new WxCoupon(); wxCoupon.setTenantId(getTenantId()); PageInfo page = null; - if (wxCoupon.getStatus() != null && wxCoupon.getStatus() == -1) { - page = wxCouponService.findEnableList(wxCoupon, pageNum, pageSize); - }else { - page = wxCouponService.listAsPage(wxCoupon, pageNum, pageSize); - } + if (wxCoupon.getStatus() != null && wxCoupon.getStatus() == -1) + wxCoupon.setStatus(null); + page = wxCouponService.listAsPage(wxCoupon, pageNum, pageSize); + List wxCouponList = page.getList(); if(wxCouponList.isEmpty()){ diff --git a/mallinkService/src/main/java/com/simple/mapper/WxCouponMapper.java b/mallinkService/src/main/java/com/simple/mapper/WxCouponMapper.java index 3ef099724..d4b4b3a7c 100644 --- a/mallinkService/src/main/java/com/simple/mapper/WxCouponMapper.java +++ b/mallinkService/src/main/java/com/simple/mapper/WxCouponMapper.java @@ -11,7 +11,6 @@ public interface WxCouponMapper extends CommonMapper { List findList(WxCoupon wxCoupon); - List findEnableList(WxCoupon wxCoupon); List findCanSendList(WxCoupon wxCoupon); diff --git a/mallinkService/src/main/java/com/simple/service/WxCouponService.java b/mallinkService/src/main/java/com/simple/service/WxCouponService.java index 6dc34f35e..cdfc677c8 100644 --- a/mallinkService/src/main/java/com/simple/service/WxCouponService.java +++ b/mallinkService/src/main/java/com/simple/service/WxCouponService.java @@ -19,15 +19,6 @@ public interface WxCouponService { */ PageInfo listAsPage(WxCoupon record, Integer pageIndex, Integer pageSize); - /** - * 根据实体查询分页列表 - * - * @param record - * @param pageIndex - * @param pageSize - * @return - */ - PageInfo findEnableList(WxCoupon record, Integer pageIndex, Integer pageSize); /** * 不分页 diff --git a/mallinkService/src/main/java/com/simple/service/impl/WxCouponServiceImpl.java b/mallinkService/src/main/java/com/simple/service/impl/WxCouponServiceImpl.java index 4a66b6fdd..bdb0ea010 100644 --- a/mallinkService/src/main/java/com/simple/service/impl/WxCouponServiceImpl.java +++ b/mallinkService/src/main/java/com/simple/service/impl/WxCouponServiceImpl.java @@ -37,11 +37,6 @@ public class WxCouponServiceImpl implements WxCouponService { return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponMapper.findList(record)); } - @Override - public PageInfo findEnableList(WxCoupon record, Integer pageIndex, Integer pageSize) { - return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponMapper.findEnableList(record)); - } - @Override public List findList(WxCoupon record) { return wxCouponMapper.findList(record); diff --git a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml index 27806625e..3a4043c37 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml @@ -171,144 +171,6 @@ order by ${sortColumns} - - where 1 = 1 - - - and `id` = #{id} - - - - - and `tenant_id` like concat('%', #{tenantId},'%') - - - - - and `merchant_id` = #{merchantId} - - - - - 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 `target_ad` = #{targetAd} - - - - - 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 `remain_inventory` = #{remainInventory} - - - - - and `inventory` = #{inventory} - - - - - and `remark` like concat('%', #{remark},'%') - - - - - and `status` =0 - - - - - and `create_date` = #{createDate} - - - - - and `update_date` = #{updateDate} - - - - - and `business` like concat('%', #{business},'%') - - - - and id in - - #{idItem} - - - order by ${sortColumns} - - where 1 = 1 @@ -451,10 +313,6 @@ -