Sfoglia il codice sorgente

refactor: move inform strategy service to customer module

linwenhua 3 anni fa
parent
commit
8a58492850

+ 29 - 0
smsb-customer-manager-adapter/src/main/java/com/inspur/customer/web/controller/TenantExceptionInformStrategyController.java

@@ -0,0 +1,29 @@
+package com.inspur.customer.web.controller;
+
+import com.alibaba.cola.dto.SingleResponse;
+import com.inspur.customer.client.tenant.TenantExceptionInformStrategyService;
+import com.inspur.customer.object.tenant.TenantExceptionInformStrategyCO;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author linwenhua
+ * @date 2022-06-08 14:38
+ **/
+@RestController
+public class TenantExceptionInformStrategyController {
+
+    @DubboReference
+    private TenantExceptionInformStrategyService tenantExceptionInformStrategyService;
+
+    @PostMapping("/device/informStrategy")
+    public SingleResponse<TenantExceptionInformStrategyCO> setTenantInformStrategy(@RequestBody TenantExceptionInformStrategyCO informStrategyCo) {
+        return tenantExceptionInformStrategyService.setInformStrategy(informStrategyCo);
+    }
+
+    @GetMapping("/device/informStrategy")
+    public SingleResponse<TenantExceptionInformStrategyCO> setTenantInformStrategy(@RequestParam String tenant) {
+        return tenantExceptionInformStrategyService.getTenantInformStrategy(tenant);
+    }
+
+}