|
@@ -179,7 +179,7 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
|
|
Integer ids = Integer.valueOf(s);
|
|
Integer ids = Integer.valueOf(s);
|
|
CmCoupon coupon = listDao.findCoupon(ids);
|
|
CmCoupon coupon = listDao.findCoupon(ids);
|
|
vipCouponList.setCouponId(ids);
|
|
vipCouponList.setCouponId(ids);
|
|
- vipCouponList.setStatus(0);
|
|
|
|
|
|
+ vipCouponList.setStatus("0");
|
|
coupon.setStatus("2");
|
|
coupon.setStatus("2");
|
|
coupon.setCouponsMode("0");
|
|
coupon.setCouponsMode("0");
|
|
cmCouponDao.update(coupon);
|
|
cmCouponDao.update(coupon);
|
|
@@ -240,7 +240,7 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
|
|
form.setStatus("3");
|
|
form.setStatus("3");
|
|
}
|
|
}
|
|
SvipCouponList vipStatus = listDao.findVipStatus(couponId1);
|
|
SvipCouponList vipStatus = listDao.findVipStatus(couponId1);
|
|
- if (vipStatus.getStatus() != 1) {
|
|
|
|
|
|
+ if (vipStatus.getStatus().equals("0")) {
|
|
form.setStatus("2");
|
|
form.setStatus("2");
|
|
}
|
|
}
|
|
svipCoupon.setSvipCoupons(form);
|
|
svipCoupon.setSvipCoupons(form);
|
|
@@ -291,6 +291,8 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
|
|
}
|
|
}
|
|
if (coupon1.getCouponType() == 3) {
|
|
if (coupon1.getCouponType() == 3) {
|
|
form.setShopId1(coupon1.getShopId());
|
|
form.setShopId1(coupon1.getShopId());
|
|
|
|
+ String shopName = vipDao.findShopName(coupon1.getShopId());
|
|
|
|
+ form.setShopName1(shopName);
|
|
}
|
|
}
|
|
|
|
|
|
if (coupon2.getCouponType() == 0) {
|
|
if (coupon2.getCouponType() == 0) {
|
|
@@ -301,6 +303,8 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
|
|
}
|
|
}
|
|
if (coupon2.getCouponType() == 3) {
|
|
if (coupon2.getCouponType() == 3) {
|
|
form.setShopId2(coupon2.getShopId());
|
|
form.setShopId2(coupon2.getShopId());
|
|
|
|
+ String shopName = vipDao.findShopName(coupon2.getShopId());
|
|
|
|
+ form.setShopName2(shopName);
|
|
}
|
|
}
|
|
|
|
|
|
if (coupon3.getCouponType() == 0) {
|
|
if (coupon3.getCouponType() == 0) {
|
|
@@ -311,6 +315,8 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
|
|
}
|
|
}
|
|
if (coupon3.getCouponType() == 3) {
|
|
if (coupon3.getCouponType() == 3) {
|
|
form.setShopId3(coupon3.getShopId());
|
|
form.setShopId3(coupon3.getShopId());
|
|
|
|
+ String shopName = vipDao.findShopName(coupon3.getShopId());
|
|
|
|
+ form.setShopName3(shopName);
|
|
}
|
|
}
|
|
|
|
|
|
if (coupon4.getCouponType() == 0) {
|
|
if (coupon4.getCouponType() == 0) {
|
|
@@ -321,6 +327,8 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
|
|
}
|
|
}
|
|
if (coupon4.getCouponType() == 3) {
|
|
if (coupon4.getCouponType() == 3) {
|
|
form.setShopId4(coupon4.getShopId());
|
|
form.setShopId4(coupon4.getShopId());
|
|
|
|
+ String shopName = vipDao.findShopName(coupon4.getShopId());
|
|
|
|
+ form.setShopName4(shopName);
|
|
}
|
|
}
|
|
|
|
|
|
return form;
|
|
return form;
|
|
@@ -337,4 +345,22 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
|
|
SvipCouponForm form = getForm(couponIds);
|
|
SvipCouponForm form = getForm(couponIds);
|
|
return form;
|
|
return form;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public void open(Integer couponId) {
|
|
|
|
+ SvipCouponList vip = listDao.findVipStatus(couponId);
|
|
|
|
+ String bindCoupon = vip.getBindCoupon();
|
|
|
|
+ String[] split = bindCoupon.split(",");
|
|
|
|
+ SvipCouponList vipCouponList = new SvipCouponList();
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ Integer ids = Integer.valueOf(s);
|
|
|
|
+ CmCoupon coupon = listDao.findCoupon(ids);
|
|
|
|
+ vipCouponList.setCouponId(ids);
|
|
|
|
+ vipCouponList.setStatus("1");
|
|
|
|
+ coupon.setStatus("0");
|
|
|
|
+ coupon.setCouponsMode("0");
|
|
|
|
+ cmCouponDao.update(coupon);
|
|
|
|
+ listDao.updateVip(vipCouponList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|