diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/mnt/domain/Deploy.java b/eladmin-system/src/main/java/cn/ysk/cashier/mnt/domain/Deploy.java index 257167b6..e709541a 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/mnt/domain/Deploy.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/mnt/domain/Deploy.java @@ -27,14 +27,14 @@ public class Deploy extends BaseEntity implements Serializable { @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; - @ManyToMany + @ManyToMany(fetch = FetchType.EAGER) @ApiModelProperty(name = "服务器", hidden = true) @JoinTable(name = "mnt_deploy_server", joinColumns = {@JoinColumn(name = "deploy_id",referencedColumnName = "deploy_id")}, inverseJoinColumns = {@JoinColumn(name = "server_id",referencedColumnName = "server_id")}) private Set deploys; - @ManyToOne + @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "app_id") @ApiModelProperty(value = "应用编号") private App app; diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/TbPayServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/TbPayServiceImpl.java index 807ca6d3..f004ce74 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/TbPayServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/TbPayServiceImpl.java @@ -29,6 +29,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import lombok.extern.slf4j.Slf4j; +import org.hibernate.Hibernate; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; @@ -128,13 +129,8 @@ public class TbPayServiceImpl implements TbPayService { for (TbCashierCart cashierCart : cashierCarts) { body.append(cashierCart.getName()); } - - - TbMerchantThirdApply thirdApply = merchantThirdApplyRepository.getById(merchantId); - if (ObjectUtil.isEmpty(thirdApply) || ObjectUtil.isNull(thirdApply)) { - throw new BadRequestException("三方支付信息不存在"); - } - + TbMerchantThirdApply thirdApply = merchantThirdApplyRepository.findById(merchantId) + .orElseThrow(() -> new BadRequestException("三方支付信息不存在")); String payType; String payName; String qpay; diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java index 4e7cf663..95a5c9c7 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java @@ -1608,6 +1608,7 @@ public class TbShopTableServiceImpl implements TbShopTableService { orderDetail.setIsMember(cashierCart.getIsMember()); orderDetail.setIsTemporary(cashierCart.getIsTemporary()); orderDetail.setOrderId(orderInfo == null ? null : orderInfo.getId()); + orderDetail.setIsMember(cashierCart.getIsMember()); priceDTO.getOrderDetailList().add(orderDetail); } return priceDTO; diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/system/domain/Role.java b/eladmin-system/src/main/java/cn/ysk/cashier/system/domain/Role.java index 8afd4b07..8c57bf19 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/system/domain/Role.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/system/domain/Role.java @@ -34,7 +34,7 @@ public class Role extends BaseEntity implements Serializable { private Long id; @JSONField(serialize = false) - @ManyToMany(mappedBy = "roles") + @ManyToMany(mappedBy = "roles", fetch = FetchType.EAGER) @ApiModelProperty(value = "用户", hidden = true) private Set users;