zjh
2023-10-18 f66407b1a6383aa75060e3b9ecab6195bfbd271a
ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictSfxmController.java
@@ -103,6 +103,7 @@
    @PostMapping
    @ApiOperation(value = "新增")
    public AjaxResult add(@RequestBody DictSfxm dictSfxm) {
        asyncService.getDictSfxms();
        dictSfxm.setWbm(MatchUtils.toWubi(dictSfxm.getXmmc()));
        dictSfxm.setPym(PinyinUtil.getFirstLetter(dictSfxm.getXmmc(),"").toUpperCase(Locale.ROOT));
        return toAjax(dictSfxmService.insertDictSfxm(dictSfxm));
@@ -116,6 +117,7 @@
    @PutMapping
    @ApiOperation(value = "修改")
    public AjaxResult edit(@RequestBody DictSfxm dictSfxm) {
        asyncService.getDictSfxms();
        return toAjax(dictSfxmService.updateDictSfxm(dictSfxm));
    }
@@ -127,6 +129,7 @@
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "删除")
    public AjaxResult remove(@PathVariable Long[] ids) {
        asyncService.getDictSfxms();
        return toAjax(dictSfxmService.deleteDictSfxmByIds(ids));
    }
@@ -134,7 +137,6 @@
    @GetMapping("/getList")
    @ApiOperation(value = "按照项目编码树形查询")
    public AjaxResult getList() {
        asyncService.getDictSfxms();
        if(redisCache.hasKey("getDictSfxms")){
            List<DictSfxm> getDictSfxms = redisCache.getCacheList("getDictSfxms");
            return AjaxResult.success(getDictSfxms);