修改优惠券包赠送问题

new-dev
袁野 2 years ago
parent 57fb4be4d2
commit 0ced285dea
  1. 4
      hai-service/src/main/java/com/hai/common/utils/RequestUtils.java
  2. 4
      hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageServiceImpl.java
  3. 2
      hai-user/src/main/java/com/web/controller/TestController.java

@ -45,6 +45,10 @@ public class RequestUtils {
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
if (requestAttributes == null) {
return null;
}
// 从获取RequestAttributes中获取HttpServletRequest的信息 // 从获取RequestAttributes中获取HttpServletRequest的信息
HttpServletRequest request = (HttpServletRequest) requestAttributes.resolveReference(RequestAttributes.REFERENCE_REQUEST); HttpServletRequest request = (HttpServletRequest) requestAttributes.resolveReference(RequestAttributes.REFERENCE_REQUEST);

@ -429,8 +429,8 @@ public class HighDiscountPackageServiceImpl implements HighDiscountPackageServic
deliverUser.setPackageId(packageId); deliverUser.setPackageId(packageId);
deliverUser.setPackageName(discountPackage.getTitle()); deliverUser.setPackageName(discountPackage.getTitle());
deliverUser.setPackageActualId(packageActual.getId().longValue()); deliverUser.setPackageActualId(packageActual.getId().longValue());
deliverUser.setUserId(highUser.getId()); deliverUser.setUserId(user.getId());
deliverUser.setUserPhone(highUser.getPhone()); deliverUser.setUserPhone(user.getPhone());
deliverUser.setStatus(2); deliverUser.setStatus(2);
discountPackageDeliverService.insertDeliverUser(deliverUser); discountPackageDeliverService.insertDeliverUser(deliverUser);
} }

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save