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} - - - -