lisy
2023-08-02 d69f9a06fb73f9d5efea882a684d217f12e34a4f
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;
        }
    }
}