From e226265865e6773cd50477d1f1c9b256b72003c1 Mon Sep 17 00:00:00 2001 From: little-cat-sweet <2116400472@qq.com> Date: Thu, 9 Sep 2021 15:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E7=94=B5=E4=B8=ADC=E7=AB=AF=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=9F=A5=E7=9C=8B=E4=B8=8E=E5=81=9C=E6=AD=A2=E5=85=85?= =?UTF-8?q?=E7=94=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XhpcStopChargingOrderController.java | 49 +++++++++++++++++++ .../mapper/XhpcStopChargingOrderMapper.java | 16 ++++++ .../IXhpcStopChargingOrderService.java | 14 ++++++ .../XhpcStopChargingOrderServiceImpl.java | 28 +++++++++++ .../mapper/XhpcStopChargingMapper.xml | 32 ++++++++++++ 5 files changed, 139 insertions(+) create mode 100644 xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java create mode 100644 xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcStopChargingOrderMapper.java create mode 100644 xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcStopChargingOrderService.java create mode 100644 xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStopChargingOrderServiceImpl.java create mode 100644 xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStopChargingMapper.xml diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java new file mode 100644 index 00000000..3de42e69 --- /dev/null +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java @@ -0,0 +1,49 @@ +package com.xhpc.order.controller; + +import com.xhpc.common.core.web.controller.BaseController; +import com.xhpc.common.core.web.domain.AjaxResult; +import com.xhpc.common.core.web.page.TableDataInfo; +import com.xhpc.order.api.XhpcChargeOrderController; +import com.xhpc.order.service.IXhpcStopChargingOrderService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + + +/** + * program: ruoyi + * User: HongYun + * Date:2021-09-07 15 + */ +@RestController +@RequestMapping(value = "/stopChargingOrder") +public class XhpcStopChargingOrderController extends BaseController { + + @Autowired + private IXhpcStopChargingOrderService iXhpcStopChargingOrderService; + + @Autowired + private XhpcChargeOrderController xhpcChargeOrderController; + + @GetMapping("/list") + public TableDataInfo list(Long userId, Long chargingStationId, Long terminalId){ + + startPage(); + return getDataTable(iXhpcStopChargingOrderService.list(userId, chargingStationId, terminalId)); + } + + /** + * 停止充电 + * @param userId + * @param serialNumber 终端编码 + * @param chargingOrderId 充电id + * @return + */ + @GetMapping("/stopUp") + public AjaxResult stopUp(@RequestParam Long userId, @RequestParam String terminalSerialNumber, @RequestParam Long chargingOrderId){ + + return xhpcChargeOrderController.stopUp(userId, terminalSerialNumber, chargingOrderId); + } +} diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcStopChargingOrderMapper.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcStopChargingOrderMapper.java new file mode 100644 index 00000000..91bc0012 --- /dev/null +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcStopChargingOrderMapper.java @@ -0,0 +1,16 @@ +package com.xhpc.order.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * program: ruoyi + * User: HongYun + * Date:2021-09-07 15 + */ +public interface XhpcStopChargingOrderMapper { + + List> list(@Param("userId")Long userId, @Param("chargingStationId") Long chargingStationId, @Param("terminalId") Long terminalId); +} diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcStopChargingOrderService.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcStopChargingOrderService.java new file mode 100644 index 00000000..edd7273c --- /dev/null +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcStopChargingOrderService.java @@ -0,0 +1,14 @@ +package com.xhpc.order.service; + +import java.util.List; +import java.util.Map; + +/** + * program: ruoyi + * User: HongYun + * Date:2021-09-07 15 + */ +public interface IXhpcStopChargingOrderService { + + List> list(Long userId, Long chargingStationId, Long terminalId); +} diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStopChargingOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStopChargingOrderServiceImpl.java new file mode 100644 index 00000000..6999bfc7 --- /dev/null +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStopChargingOrderServiceImpl.java @@ -0,0 +1,28 @@ +package com.xhpc.order.service.impl; + +import com.xhpc.order.mapper.XhpcStopChargingOrderMapper; +import com.xhpc.order.service.IXhpcStopChargingOrderService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * program: ruoyi + * User: HongYun + * Date:2021-09-07 15 + */ +@Service +public class XhpcStopChargingOrderServiceImpl implements IXhpcStopChargingOrderService { + + + @Autowired + private XhpcStopChargingOrderMapper xhpcStopChargingOrderMapper; + + @Override + public List> list(Long userId, Long chargingStationId, Long terminalId) { + + return xhpcStopChargingOrderMapper.list(userId, chargingStationId, terminalId); + } +} diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStopChargingMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStopChargingMapper.xml new file mode 100644 index 00000000..184168a3 --- /dev/null +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStopChargingMapper.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file