From 5563efcc22438688159dd0a0e2b09a2a965d1da3 Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期四, 27 七月 2023 18:01:24 +0800
Subject: [PATCH] 后台代码  城市管理模块

---
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCompetitionController.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCompetitionController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCompetitionController.java
index 2bc4b7c..61958cd 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCompetitionController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCompetitionController.java
@@ -12,7 +12,9 @@
 import com.dsh.guns.core.common.constant.factory.PageFactory;
 import com.dsh.guns.core.support.HttpKit;
 import com.dsh.guns.core.util.ToolUtil;
+import com.dsh.guns.modular.system.model.TCity;
 import com.dsh.guns.modular.system.model.TStore;
+import com.dsh.guns.modular.system.service.ICityService;
 import com.dsh.guns.modular.system.service.IStoreService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -40,6 +42,9 @@
 
     @Autowired
     private IStoreService storeService;
+
+    @Autowired
+    private ICityService cityService;
 
 
     /**
@@ -146,6 +151,17 @@
         }
     }
 
+    @RequestMapping(value = "/onChange")
+    @ResponseBody
+    public Object onChange(Integer oneId) {
+        try {
+            TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId));
+            return cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId()));
+        }catch (Exception e){
+            e.printStackTrace();
+            return ERROR;
+        }
+    }
 
 
 }

--
Gitblit v1.7.1