From d1f381c7e0a7604ae928676ae8553d2f0189c0e4 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Sat, 29 Jun 2019 10:15:25 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A0=8D=E4=BB=B7=E8=90=A5=E9=94=80=E6=95=B0?= =?UTF-8?q?=E6=8D=AE][=E4=BF=AE=E6=94=B9]:=E5=88=A0=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V201906291010__DROP_COUPON_PRESS_DATA.sql | 1 + .../com/iformall/mapper/WxCouponMapper.java | 8 --- .../main/resources/mapper/WxCouponMapper.xml | 56 ------------------- 3 files changed, 1 insertion(+), 64 deletions(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201906291010__DROP_COUPON_PRESS_DATA.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201906291010__DROP_COUPON_PRESS_DATA.sql b/mallinkAdmin/src/main/resources/db/migration/V201906291010__DROP_COUPON_PRESS_DATA.sql new file mode 100644 index 000000000..06414e281 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201906291010__DROP_COUPON_PRESS_DATA.sql @@ -0,0 +1 @@ +DROP TABLE `wx_coupon_press_data`; \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java index 870f27714..1ee46bedd 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java @@ -10,14 +10,6 @@ import com.iformall.domain.po.WxCoupon; public interface WxCouponMapper extends CommonMapper { List findPressData(WxCoupon wxCoupon); - void delPressData(WxCoupon wxCoupon); - void insertPressData(WxCoupon wxCoupon); - void updatePressData1(WxCoupon wxCoupon); - void updatePressData2(WxCoupon wxCoupon); - void updatePressData3(WxCoupon wxCoupon); - void updatePressData4(WxCoupon wxCoupon); - void updatePressData5(WxCoupon wxCoupon); - List findCouponData(WxCoupon wxCoupon); List findCountData(WxCoupon wxCoupon); diff --git a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml index 7a892ef7a..6c90eab53 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml @@ -685,62 +685,6 @@ order by c.status asc,c.create_date desc - - delete from `wx_coupon_press_data` where tenant_id = #{tenantId} - - - - insert into `wx_coupon_press_data` - (`id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price`) - select `id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price` - from wx_coupon where type = 8 and tenant_id = #{tenantId} - - - - update wx_coupon_press_data cpd set change_rate = - IFNULL(round((select count(o.id) from wx_order o - where o.tenant_id = #{tenantId} and o.order_status = 1 and o.product_id = cpd.id)/ - (select count(wop.id) from wx_order o - left join wx_order_press wop on wop.order_id = o.id - where o.product_id = cpd.id and o.tenant_id = #{tenantId} and wop.first = 1)*100,2),0) - where cpd.tenant_id = #{tenantId} - - - - update wx_coupon_press_data cpd set press_count= (select count(wop.id) from wx_order o - left join wx_order_press wop on wop.order_id = o.id - where o.product_id = cpd.id and o.tenant_id = #{tenantId} and wop.first = 1) - where cpd.tenant_id=#{tenantId} - - - - update wx_coupon_press_data cpd set - press_succ_count = - (select count(o.id) from wx_order o - where o.product_id = cpd.id and o.tenant_id = #{tenantId} and o.order_status = 1) - where cpd.tenant_id=#{tenantId} - - - - update wx_coupon_press_data cpd set join_count = - (select count(wop.id) from wx_order o - left join wx_order_press wop on wop.order_id = o.id - where o.tenant_id = #{tenantId} and o.product_id = cpd.id and o.payment_type = 0) - where cpd.tenant_id=#{tenantId} - - - -