|
|
|
@ -103,22 +103,28 @@ public class HighDiscountPackageController { |
|
|
|
|
if (StringUtils.isBlank(highDiscountPackage.getTitle()) |
|
|
|
|
|| highDiscountPackage.getUsingAttribution() == null |
|
|
|
|
|| highDiscountPackage.getSalesType() == null |
|
|
|
|
|| highDiscountPackage.getEffectiveTiem() == null |
|
|
|
|
|| highDiscountPackage.getPurchaseNum() == null |
|
|
|
|
|| highDiscountPackage.getPrice() == null |
|
|
|
|
|| StringUtils.isBlank(highDiscountPackage.getBannerImg()) |
|
|
|
|
|| StringUtils.isBlank(highDiscountPackage.getListImg()) |
|
|
|
|
|| StringUtils.isBlank(highDiscountPackage.getDetailsImg()) |
|
|
|
|
) { |
|
|
|
|
log.error("HighAgentController -> insertAgent() error!","参数错误"); |
|
|
|
|
log.error("HighAgentController -> insertCouponPackageInfo() error!","参数错误"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (userInfoModel.getBsCompany() == null) { |
|
|
|
|
log.error("highCouponPackage -> highCouponPackageInfo() error!","该主角色没有权限"); |
|
|
|
|
log.error("highCouponPackage -> insertCouponPackageInfo() error!","该主角色没有权限"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (highDiscountPackage.getSalesType() == 1) { |
|
|
|
|
if (highDiscountPackage.getPurchaseNum() == null |
|
|
|
|
|| highDiscountPackage.getPrice() == null |
|
|
|
|
) { |
|
|
|
|
log.error("HighAgentController -> insertCouponPackageInfo() error!","参数错误"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
highDiscountPackage.setCompanyId(userInfoModel.getBsCompany().getId().intValue()); |
|
|
|
|
highDiscountPackage.setStatus(3); |
|
|
|
|
highDiscountPackage.setCreatedTime(new Date()); |
|
|
|
@ -280,7 +286,18 @@ public class HighDiscountPackageController { |
|
|
|
|
|
|
|
|
|
HighDiscountPackageDetails highDiscountPackageDetails = highDiscountPackageDetailsService.findDetailsById(object.getInteger("discountPackageId")); |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(highDiscountPackageDetailsService.getDiscountPackageDetailsList(map)); |
|
|
|
|
if (highDiscountPackageDetails == null || highDiscountPackageDetails.getStatus() == 2) { |
|
|
|
|
log.error("highCouponPackage -> highCouponPackageInfo() error!","状态错误"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.STATUS_ERROR, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
highDiscountPackageDetails.setStatus(2); |
|
|
|
|
highDiscountPackageDetails.setUpdatedTime(new Date()); |
|
|
|
|
highDiscountPackageDetails.setUpdatedUserId(userInfoModel.getSecUser().getId().intValue()); |
|
|
|
|
|
|
|
|
|
highDiscountPackageDetailsService.updateDiscountPackageDetails(highDiscountPackageDetails); |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success("删除成功"); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighOrderController --> getUserOrderList() error!", e); |
|
|
|
|