From c743f4413a00fc063bbbd9d851b6d0c3fff10581 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 31 七月 2023 10:04:02 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- 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