|
|
|
@@ -12,6 +12,7 @@ import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.domain.po.tt.TtCoupon; |
|
|
|
import com.iformall.domain.po.tt.TtVideoLibrary; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.WxBusinessService; |
|
|
|
import com.iformall.service.WxFlowService; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
@@ -69,7 +70,7 @@ public class TtCouponController extends BaseController { |
|
|
|
public ResultData list(@ModelAttribute TtCoupon record, Integer pageNum, Integer pageSize, Integer dataType) { |
|
|
|
logger.debug("[" + getIpAddr() + "] TtCouponController::list"); |
|
|
|
if (record == null) record = new TtCoupon(); |
|
|
|
record.updateTenantInfo(ifParentUpdateTenantInfo()); |
|
|
|
record.updateTenantInfo(getTenantInfo()); |
|
|
|
// if(record.getType() == null || record.getType().equals(EnumTtCouponType.COUPON_SINGLE.getCode())){ |
|
|
|
// record.setType(EnumTtCouponType.COUPON_SINGLE.getCode()); |
|
|
|
// }else{ |
|
|
|
@@ -93,7 +94,13 @@ public class TtCouponController extends BaseController { |
|
|
|
if(record == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); |
|
|
|
} |
|
|
|
TenantEntity tenantEntity = ifParentUpdateAloneTenantInfo(); |
|
|
|
TenantEntity tenantEntity; |
|
|
|
try { |
|
|
|
tenantEntity = ifParentUpdateAloneTenantInfo(); |
|
|
|
} catch (MallinkException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
return new ResultData(e.getErrorCode(), e.getMessage()); |
|
|
|
} |
|
|
|
record.updateTenantInfo(tenantEntity); |
|
|
|
|
|
|
|
if(record.getId() != null){ |
|
|
|
@@ -198,7 +205,13 @@ public class TtCouponController extends BaseController { |
|
|
|
if (record.getId() == null) { |
|
|
|
return new ResultData(ResultData.ERROR, "缺少id"); |
|
|
|
} |
|
|
|
TenantEntity tenantEntity = ifParentUpdateAloneTenantInfo(); |
|
|
|
TenantEntity tenantEntity; |
|
|
|
try { |
|
|
|
tenantEntity = ifParentUpdateAloneTenantInfo(); |
|
|
|
} catch (MallinkException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
return new ResultData(e.getErrorCode(), e.getMessage()); |
|
|
|
} |
|
|
|
record.updateTenantInfo(tenantEntity); |
|
|
|
|
|
|
|
TtCoupon coupon = ttCouponService.getById(record.getId()); |
|
|
|
@@ -317,7 +330,12 @@ public class TtCouponController extends BaseController { |
|
|
|
if (id == null) { |
|
|
|
return new ResultData(ResultData.ERROR, "缺少id"); |
|
|
|
} |
|
|
|
ifParentTenantInfoAlone(); |
|
|
|
try { |
|
|
|
ifParentTenantInfoAlone(); |
|
|
|
} catch (MallinkException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
return new ResultData(e.getErrorCode(), e.getMessage()); |
|
|
|
} |
|
|
|
return ttCouponService.auditPass(id); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -330,7 +348,12 @@ public class TtCouponController extends BaseController { |
|
|
|
if (record.getId() == null) { |
|
|
|
return new ResultData(ResultData.ERROR, "缺少id"); |
|
|
|
} |
|
|
|
ifParentTenantInfoAlone(); |
|
|
|
try { |
|
|
|
ifParentTenantInfoAlone(); |
|
|
|
} catch (MallinkException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
return new ResultData(e.getErrorCode(), e.getMessage()); |
|
|
|
} |
|
|
|
return ttCouponService.auditRejected(record.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
|