diff --git a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue
index ed8a80da3..290e623f3 100644
--- a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue
@@ -176,7 +176,7 @@
ref="drawer"
>
-
+
@@ -191,8 +191,8 @@
-
-
+
+
@@ -438,7 +438,7 @@
-
+
@@ -574,7 +574,7 @@ import {
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, ],
- labelPosition:'left',
+ labelPosition:'right',
pdidlist:[],//判断优惠券id
pddhidlist:[],//判断兑换券id
youhuiquanlist:[],
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/controller/CardCouponController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/controller/CardCouponController.java
index f01a11ade..98b3602cd 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/controller/CardCouponController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/controller/CardCouponController.java
@@ -105,6 +105,17 @@ public class CardCouponController extends BaseController {
return getSuccessResult(this.cardCouponService.updateById(cardCoupon));
}
+ /**
+ * 删除数据
+ *
+ * @param id 主键结合
+ * @return 删除结果
+ */
+ @DeleteMapping("delete/{id}")
+ public ResponseObject deleteById(@PathVariable Serializable id) {
+ return getSuccessResult(this.cardCouponService.removeById(id));
+ }
+
/**
* 删除数据
*
@@ -115,5 +126,15 @@ public class CardCouponController extends BaseController {
public ResponseObject delete(@RequestParam("idList") List idList) {
return getSuccessResult(this.cardCouponService.removeByIds(idList));
}
+
+ /**
+ * 上下架
+ * @param id
+ * @return
+ */
+ @GetMapping("isOnLine/{id}")
+ public ResponseObject isOnLine(@PathVariable Integer id) {
+ return getSuccessResult(cardCouponService.isOnLine(id));
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/CardCouponService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/CardCouponService.java
index 774e56609..7b23fce67 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/CardCouponService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/CardCouponService.java
@@ -13,5 +13,12 @@ import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
*/
public interface CardCouponService extends IService {
IPage pageVo(Page page, CardCoupon cardCoupon);
+
+ /**
+ * 上下架
+ * @param id
+ * @return
+ */
+ int isOnLine(Integer id);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponServiceImpl.java
index 03b0bfc83..8f09a2de7 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponServiceImpl.java
@@ -1,5 +1,6 @@
package com.fuint.business.marketingActivity.cardCoupon.service.impl;
+import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -21,5 +22,15 @@ public class CardCouponServiceImpl extends ServiceImpl pageVo(Page page, CardCoupon cardCoupon) {
return baseMapper.pageVo( page, cardCoupon);
}
+
+ @Override
+ public int isOnLine(Integer id) {
+ CardCoupon cardCoupon = baseMapper.selectById(id);
+ if (ObjectUtil.isEmpty( cardCoupon)) {
+ return 0;
+ }
+ cardCoupon.setStatus(cardCoupon.getStatus().equals("0") ? "1" : "0");
+ return baseMapper.updateById(cardCoupon);
+ }
}