puzhibing
2023-06-01 5a56fe238e5f51efe5221b5a376f109cda4b4b72
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgentController.java
@@ -190,6 +190,11 @@
        tAgent.setProvinceName(province.getName());
        tAgent.setProvinceCode(province.getCode());
        TRegion city = tRegionService.selectById(split[1]);
        if(Objects.isNull(city)){
            city = tRegionService.selectOne(new EntityWrapper<TRegion>()
                    .eq("name",split[1])
                    .last("LIMIT 1"));
        }
        tAgent.setCityName(city.getName());
        tAgent.setCityCode(city.getCode());
        tAgentService.insert(tAgent);