diff --git a/agileboot-api/src/main/java/com/agileboot/api/controller/PaymentController.java b/agileboot-api/src/main/java/com/agileboot/api/controller/PaymentController.java index 5edf391..3ebae7c 100644 --- a/agileboot-api/src/main/java/com/agileboot/api/controller/PaymentController.java +++ b/agileboot-api/src/main/java/com/agileboot/api/controller/PaymentController.java @@ -293,9 +293,9 @@ public class PaymentController { return ResponseDTO.fail(new ApiException(ErrorCode.Client.COMMON_REQUEST_PARAMETERS_INVALID, "无效的openid参数")); } + Ab98UserEntity ab98User = ab98UserApplicationService.getByAb98UserId(qyUser.getAb98UserId()); try { if (qyUser.getAb98UserId()!= null) { - Ab98UserEntity ab98User = ab98UserApplicationService.getByAb98UserId(qyUser.getAb98UserId()); ab98User.setOpenid(openid); ab98User.updateById(); } @@ -309,7 +309,8 @@ public class PaymentController { qyUser.getCorpid(), qyUser.getBalance(), qyUser.getUseBalance(), - qyUser.getBalanceLimit()); + qyUser.getBalanceLimit(), + ab98User); return ResponseDTO.ok(response); } @@ -329,7 +330,8 @@ public class PaymentController { qyUser.getCorpid(), qyUser.getBalance(), qyUser.getUseBalance(), - qyUser.getBalanceLimit()); + qyUser.getBalanceLimit(), + null); return ResponseDTO.ok(response); } diff --git a/agileboot-api/src/main/java/com/agileboot/api/response/GetBalanceResponse.java b/agileboot-api/src/main/java/com/agileboot/api/response/GetBalanceResponse.java index ea7296a..c280ad3 100644 --- a/agileboot-api/src/main/java/com/agileboot/api/response/GetBalanceResponse.java +++ b/agileboot-api/src/main/java/com/agileboot/api/response/GetBalanceResponse.java @@ -1,5 +1,6 @@ package com.agileboot.api.response; +import com.agileboot.domain.ab98.user.db.Ab98UserEntity; import lombok.AllArgsConstructor; import lombok.Data; @@ -13,4 +14,5 @@ public class GetBalanceResponse { private BigDecimal balance; private BigDecimal useBalance; private BigDecimal balanceLimit; + private Ab98UserEntity ab98User; } diff --git a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/cell/db/CabinetCellMapper.java b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/cell/db/CabinetCellMapper.java index 4aa266c..aa7f4bf 100644 --- a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/cell/db/CabinetCellMapper.java +++ b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/cell/db/CabinetCellMapper.java @@ -112,7 +112,7 @@ public interface CabinetCellMapper extends BaseMapper { "${ew.customSqlSegment} ") List selectLatestOrderInfoByCell(@Param(Constants.WRAPPER) Wrapper queryWrapper); - @Select("SELECT cc.* " + + @Select("SELECT DISTINCT cc.* " + "FROM cabinet_cell cc " + "INNER JOIN shop_order_goods sog ON cc.cell_id = sog.cell_id AND sog.deleted = 0 " + "INNER JOIN shop_order so ON sog.order_id = so.order_id AND so.deleted = 0 " + diff --git a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/SmartCabinetApplicationService.java b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/SmartCabinetApplicationService.java index ce0cc67..338facb 100644 --- a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/SmartCabinetApplicationService.java +++ b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/SmartCabinetApplicationService.java @@ -352,6 +352,7 @@ public class SmartCabinetApplicationService { cellInfo.setCellNo(cell.getCellNo()); cellInfo.setPinNo(cell.getPinNo()); cellInfo.setStock(cell.getStock()); + cellInfo.setCellPrice(cell.getCellPrice()); return cellInfo; }).collect(Collectors.toList()); diff --git a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/dto/CabinetDetailDTO.java b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/dto/CabinetDetailDTO.java index 73338b6..452662a 100644 --- a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/dto/CabinetDetailDTO.java +++ b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/dto/CabinetDetailDTO.java @@ -18,6 +18,7 @@ public class CabinetDetailDTO { private Integer cellNo; private Integer pinNo; private Integer stock; + private BigDecimal cellPrice; private ProductInfoDTO product; } diff --git a/agileboot-domain/src/main/java/com/agileboot/domain/shop/order/OrderApplicationService.java b/agileboot-domain/src/main/java/com/agileboot/domain/shop/order/OrderApplicationService.java index 538c10c..b642b10 100644 --- a/agileboot-domain/src/main/java/com/agileboot/domain/shop/order/OrderApplicationService.java +++ b/agileboot-domain/src/main/java/com/agileboot/domain/shop/order/OrderApplicationService.java @@ -528,6 +528,11 @@ public class OrderApplicationService { } List orderGoods = orderGoodsService.list(orderGoodsQueryWrapper); + Set orderIds = orderGoods.stream().map(ShopOrderGoodsEntity::getOrderId).collect(Collectors.toSet()); + orderList = orderList.stream() + .filter(order -> orderIds.contains(order.getOrderId())) + .collect(Collectors.toList()); + QueryWrapper goodsQueryWrapper = new QueryWrapper<>(); goodsQueryWrapper.in("goods_id", orderGoods.stream().map(ShopOrderGoodsEntity::getGoodsId).collect(Collectors.toList())); List goods = goodsService.list(goodsQueryWrapper);