From 8dcb0edcc2ceaa244501e7ed0c4f363ab4f3a428 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 03 四月 2026 15:29:04 +0800
Subject: [PATCH] Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1
---
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwGatewayCloudController.java | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 105 insertions(+), 0 deletions(-)
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwGatewayCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwGatewayCloudController.java
new file mode 100644
index 0000000..a430616
--- /dev/null
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwGatewayCloudController.java
@@ -0,0 +1,105 @@
+package com.doumee.cloud.admin;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.annotation.excel.ExcelExporter;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
+import com.doumee.dao.business.model.YwGateway;
+import com.doumee.service.business.YwGatewayService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import com.doumee.config.annotation.CloudRequiredPermission;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 缃戝叧绠$悊
+ * @author renkang
+ * @date 2026/04/02
+ */
+@Api(tags = "缃戝叧绠$悊")
+@RestController
+@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX + "/business/ywGateway")
+public class YwGatewayCloudController extends BaseController {
+
+ @Autowired
+ private YwGatewayService ywGatewayService;
+
+ @PreventRepeat
+ @ApiOperation("鏂板缓")
+ @PostMapping("/create")
+ @CloudRequiredPermission("business:ywgateway:create")
+ public ApiResponse create(@RequestBody YwGateway ywGateway, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ ywGateway.setLoginUserInfo(this.getLoginUser(token));
+ return ApiResponse.success(ywGatewayService.create(ywGateway));
+ }
+
+ @ApiOperation("鏍规嵁ID鍒犻櫎")
+ @GetMapping("/delete/{id}")
+ @CloudRequiredPermission("business:ywgateway:delete")
+ public ApiResponse deleteById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ ywGatewayService.deleteById(id, this.getLoginUser(token));
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("鎵归噺鍒犻櫎")
+ @GetMapping("/delete/batch")
+ @CloudRequiredPermission("business:ywgateway:delete")
+ public ApiResponse deleteByIdInBatch(@RequestParam String ids, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ String[] idArray = ids.split(",");
+ List<Integer> idList = new ArrayList<>();
+ for (String id : idArray) {
+ idList.add(Integer.valueOf(id));
+ }
+ ywGatewayService.deleteByIdInBatch(idList, this.getLoginUser(token));
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("鏍规嵁ID淇敼")
+ @PostMapping("/updateById")
+ @CloudRequiredPermission("business:ywgateway:update")
+ public ApiResponse updateById(@RequestBody YwGateway ywGateway, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ ywGateway.setLoginUserInfo(this.getLoginUser(token));
+ ywGatewayService.updateById(ywGateway);
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("绂佸惎鐢�")
+ @PostMapping("/updateStatusById")
+ @CloudRequiredPermission("business:ywgateway:update")
+ public ApiResponse updateStatusById(@RequestBody YwGateway ywGateway, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ ywGateway.setLoginUserInfo(this.getLoginUser(token));
+ ywGatewayService.updateStatusById(ywGateway);
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("鍒嗛〉鏌ヨ")
+ @PostMapping("/page")
+ @CloudRequiredPermission("business:ywgateway:query")
+ public ApiResponse<PageData<YwGateway>> findPage(@RequestBody PageWrap<YwGateway> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token));
+ return ApiResponse.success(ywGatewayService.findPage(pageWrap));
+ }
+
+ @ApiOperation("鏍规嵁ID鏌ヨ")
+ @GetMapping("/{id}")
+ @CloudRequiredPermission("business:ywgateway:query")
+ public ApiResponse findById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ return ApiResponse.success(ywGatewayService.findById(id));
+ }
+
+ @ApiOperation("瀵煎嚭Excel")
+ @PostMapping("/exportExcel")
+ @CloudRequiredPermission("business:ywgateway:exportExcel")
+ public void exportExcel(@RequestBody PageWrap<YwGateway> pageWrap, HttpServletResponse response, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token));
+ ExcelExporter.build(YwGateway.class).export(ywGatewayService.findPage(pageWrap).getRecords(), "缃戝叧绠$悊", response);
+ }
+}
--
Gitblit v1.9.3