| | |
| | | return R.ok(userMap); |
| | | |
| | | } |
| | | |
| | | @GetMapping(value = "/getGunIdsByUserId") |
| | | @ApiOperation(value = "查询当前用户正在充电中的枪id集合", tags = {"小程序-首页-用户充电订单信息"}) |
| | | public R<List<Integer>> getGunIdsByUserId() { |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | List<TChargingOrder> list = chargingOrderService.list(Wrappers.lambdaQuery(TChargingOrder.class) |
| | | .eq(TChargingOrder::getAppUserId, userId) |
| | | .eq(TChargingOrder::getStatus, 3)); |
| | | List<Integer> gunIds = list.stream().map(TChargingOrder::getChargingGunId).collect(Collectors.toList()); |
| | | return R.ok(gunIds); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | // 示例数据 |
| | | List<TChargingOrder> list = getSampleData(); |