|
|
@@ -83,6 +83,17 @@ public class TtCouponController extends BaseController { |
|
|
TenantEntity tenantEntity = getTenantInfo(); |
|
|
TenantEntity tenantEntity = getTenantInfo(); |
|
|
record.updateTenantInfo(tenantEntity); |
|
|
record.updateTenantInfo(tenantEntity); |
|
|
|
|
|
|
|
|
|
|
|
if(record.getId() != null){ |
|
|
|
|
|
TtCoupon coupon = ttCouponService.getById(record.getId()); |
|
|
|
|
|
if (null == coupon || EnumDelFlag.YES.getCode().equals(record.getIsDel())) { |
|
|
|
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR,"找不到课程,或课程已删除"); |
|
|
|
|
|
} |
|
|
|
|
|
if(!coupon.getStatus().equals(EnumTtCouponStatus.TTCOUPON_STATUS_DRAFT.getCode()) |
|
|
|
|
|
&& !coupon.getStatus().equals(EnumTtCouponStatus.TTCOUPON_STATUS_REJECT.getCode())){ |
|
|
|
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR,"该课程状态不允许修改"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(record.getMerchantId() == null){ |
|
|
if(record.getMerchantId() == null){ |
|
|
WxMerchant merchantQ = new WxMerchant(); |
|
|
WxMerchant merchantQ = new WxMerchant(); |
|
|
merchantQ.updateTenantInfo(tenantEntity); |
|
|
merchantQ.updateTenantInfo(tenantEntity); |
|
|
@@ -174,9 +185,7 @@ public class TtCouponController extends BaseController { |
|
|
} |
|
|
} |
|
|
TenantEntity tenantEntity = getTenantInfo(); |
|
|
TenantEntity tenantEntity = getTenantInfo(); |
|
|
record.updateTenantInfo(tenantEntity); |
|
|
record.updateTenantInfo(tenantEntity); |
|
|
if(EnumDelFlag.YES.getCode().equals(record.getIsDel())){ |
|
|
|
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR,"找不到课程,或课程已删除"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TtCoupon coupon = ttCouponService.getById(record.getId()); |
|
|
TtCoupon coupon = ttCouponService.getById(record.getId()); |
|
|
if (null == coupon || EnumDelFlag.YES.getCode().equals(record.getIsDel())) { |
|
|
if (null == coupon || EnumDelFlag.YES.getCode().equals(record.getIsDel())) { |
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR,"找不到课程,或课程已删除"); |
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR,"找不到课程,或课程已删除"); |
|
|
@@ -191,6 +200,7 @@ public class TtCouponController extends BaseController { |
|
|
record.setMerchantId(list.get(0).getId()); |
|
|
record.setMerchantId(list.get(0).getId()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(record.getMerchantId() == null){ |
|
|
if(record.getMerchantId() == null){ |
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR,"找不到作者"); |
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR,"找不到作者"); |
|
|
} |
|
|
} |
|
|
|