zhupeng 3 лет назад
Родитель
Сommit
b4d9eb68c9

+ 48 - 0
src/main/java/com/charging/chargingparking/modules/backController/BackParkingPayController.java

@@ -0,0 +1,48 @@
+package com.charging.chargingparking.modules.backController;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.charging.chargingparking.dto.MessageResult;
+import com.charging.chargingparking.entity.ParkingPay;
+import com.charging.chargingparking.service.ParkingPayService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * @author qxyzm
+ * @date 2022/6/14 0014 上午 9:34
+ */
+@RestController
+@Slf4j
+@RequestMapping("/backParkingPay")
+public class BackParkingPayController {
+
+    @Autowired
+    private ParkingPayService parkingPayService;
+
+    @PostMapping("parkingPayList")
+    public MessageResult<Object> parkingPayList(String parkingName, @RequestParam Integer pageSize, @RequestParam Integer pageIndex) {
+
+        MessageResult<Object> messageResult = new MessageResult<>();
+
+        try{
+            QueryWrapper<ParkingPay> parkingInfoQueryWrapper = new QueryWrapper<>();
+            parkingInfoQueryWrapper.like("parking_name",parkingName);
+            Page<ParkingPay> page = parkingPayService.page(new Page<>(pageIndex,pageSize),parkingInfoQueryWrapper);
+
+            messageResult.setData(page);
+            messageResult.setResult(true);
+
+        }catch (Exception ex){
+            log.error(ex.getMessage(),ex);
+            messageResult.setResult(false);
+        }
+
+        return messageResult;
+    }
+}

+ 48 - 0
src/main/java/com/charging/chargingparking/modules/backController/BackParkingRecordController.java

@@ -0,0 +1,48 @@
+package com.charging.chargingparking.modules.backController;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.charging.chargingparking.dto.MessageResult;
+import com.charging.chargingparking.entity.ParkingRecord;
+import com.charging.chargingparking.service.ParkingRecordService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * @author qxyzm
+ * @date 2022/6/14 0014 上午 9:34
+ */
+@RestController
+@Slf4j
+@RequestMapping("/backParkingRecord")
+public class BackParkingRecordController {
+
+    @Autowired
+    private ParkingRecordService parkingRecordService;
+
+    @PostMapping("parkingRecordList")
+    public MessageResult<Object> parkingRecordList(String parkingName, @RequestParam Integer pageSize, @RequestParam Integer pageIndex) {
+
+        MessageResult<Object> messageResult = new MessageResult<>();
+
+        try{
+            QueryWrapper<ParkingRecord> parkingInfoQueryWrapper = new QueryWrapper<>();
+            parkingInfoQueryWrapper.like("parking_name",parkingName);
+            Page<ParkingRecord> page = parkingRecordService.page(new Page<>(pageIndex,pageSize),parkingInfoQueryWrapper);
+
+            messageResult.setData(page);
+            messageResult.setResult(true);
+
+        }catch (Exception ex){
+            log.error(ex.getMessage(),ex);
+            messageResult.setResult(false);
+        }
+
+        return messageResult;
+    }
+}