forked from gzzfw/backEnd/gz-dyh

liyj
2024-09-10 76f4b32326c77b6a3b6742ab5d72f0b02320b62f
dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/controller/web/SyRegionWebController.java
@@ -2,6 +2,8 @@
import cn.huge.base.common.utils.ReturnFailUtils;
import cn.huge.base.common.utils.ReturnSucUtils;
import cn.huge.module.kind.domain.dto.RegionSelectJSDTO;
import cn.huge.module.kind.domain.dto.RegionSelectSaveDTO;
import cn.huge.module.kind.domain.po.SyRegion;
import cn.huge.module.kind.service.SyRegionService;
import com.google.common.collect.Maps;
@@ -167,4 +169,20 @@
        }
    }
    /**
     * js数据入库
     * @url {ctx}/api/web/syRegion/saveByJS
     * @param regionSelectJSDTO 实体对象
     * @return Object
     */
    @PostMapping("/saveByJS")
    public Object saveByJS(@RequestBody RegionSelectSaveDTO regionSelectJSDTO) {
        try {
            service.webSaveByJSTree(regionSelectJSDTO.getRegionList(), regionSelectJSDTO.getStartLevel());
            return ReturnSucUtils.getRepInfo();
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
}