From a081e87cf19c327c3aeff232ad4c9e59c2b1f31d Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期三, 21 八月 2024 10:45:26 +0800 Subject: [PATCH] 8.21.1 --- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java | 8 ++++++++ ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java | 39 ++++++++++++++++++++++++++++++++++++--- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java | 2 -- ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java | 2 ++ ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java | 1 + 5 files changed, 47 insertions(+), 5 deletions(-) diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java index 100f547..b5179bc 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java @@ -74,4 +74,6 @@ + + } diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java index f85d2ea..3b89b97 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java @@ -180,8 +180,6 @@ @PostMapping(value = "/auth/pageList") public AjaxResult<PageInfo<TAccountingStrategyVO>> authPageList(@RequestBody TAccountingStrategyQuery query) { - - return AjaxResult.ok(accountingStrategyService.pageList(query)); } diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java index 405cc3f..2b2bbd5 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java @@ -36,6 +36,14 @@ for (TAccountingStrategyVO tAccountingStrategyVO : list) { SysUser data = sysUserClient.getSysUser(tAccountingStrategyVO.getUserId()).getData(); tAccountingStrategyVO.setUserName(data.getNickName()); + if (tAccountingStrategyVO.getFirstUserId()!=null){ + SysUser first = sysUserClient.getSysUser(tAccountingStrategyVO.getUserId()).getData(); + tAccountingStrategyVO.setFirstUserName(first==null?null:first.getNickName()); + } + if (tAccountingStrategyVO.getTwoUserId()!=null){ + SysUser two = sysUserClient.getSysUser(tAccountingStrategyVO.getUserId()).getData(); + tAccountingStrategyVO.setTwoUserName(two==null?null:two.getNickName()); + } } pageInfo.setRecords(list); return pageInfo; diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java index 5f4fb2a..9535840 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java @@ -1,4 +1,5 @@ package com.ruoyi.order.controller; +import java.time.LocalDateTime; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -18,6 +19,7 @@ import com.ruoyi.order.service.TExchangeOrderService; import com.ruoyi.order.service.TShoppingOrderService; import com.ruoyi.order.service.TVipOrderService; +import com.ruoyi.other.api.dto.ExchangeDto; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.util.StringUtils; @@ -144,9 +146,40 @@ return R.ok(strings); } - - - + + + + + @PostMapping("/getById") + public R<Long> getById(@RequestParam("goodId") Integer goodId,@RequestParam("userId") Long userId){ + return R.ok(exchangeOrderService.lambdaQuery().eq(TExchangeOrder::getGoodsId,goodId).eq(TExchangeOrder::getAppUserId,userId).ne(TExchangeOrder::getStatus,4).count()); + } + + @PostMapping("/create") + public R<Long> exchangeCreate(@RequestBody ExchangeDto exchangeDto){ + TExchangeOrder tExchangeOrder = new TExchangeOrder(); + tExchangeOrder.setCode(""); + tExchangeOrder.setAppUserId(exchangeDto.getUserId()); + tExchangeOrder.setOrderType(0); + tExchangeOrder.setGoodsId(0); + tExchangeOrder.setCouponId(0); + tExchangeOrder.setPurchaseQuantity(0); + tExchangeOrder.setAppUserAddressId(0L); + tExchangeOrder.setPoints(0); + tExchangeOrder.setRemark(""); + tExchangeOrder.setStatus(0); + tExchangeOrder.setExpressCompany(""); + tExchangeOrder.setExpressNumber(""); + tExchangeOrder.setConsignerId(0); + tExchangeOrder.setConsignerTime(LocalDateTime.now()); + tExchangeOrder.setReceivingTime(LocalDateTime.now()); + tExchangeOrder.setCancellationTime(LocalDateTime.now()); + tExchangeOrder.setCancellationId(0); + tExchangeOrder.setCreateTime(LocalDateTime.now()); + tExchangeOrder.setDelFlag(false); + return R.ok(); + + } diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java index d91debd..e62316b 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java @@ -122,6 +122,7 @@ //生成消耗积分的记录 + return AjaxResult.success(); } -- Gitblit v1.7.1