peng
2026-03-18 e59a0201057ba67cad425fed804c82ff4ba0c6f1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package com.tievd.cube.modules.system.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tievd.cube.modules.system.model.api.request.DuplicateCheckRequest;
import com.tievd.cube.modules.system.model.TreeSelectModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.tievd.cube.modules.system.model.DictModel;
import com.tievd.cube.modules.system.entity.SysDict;
 
import java.util.List;
import java.util.Map;
 
/**
 * 字典
 *
 * @author 杨欣武
 * @version 2.4.0
 * @since 2022-05-07
 */
public interface SysDictMapper extends BaseMapper<SysDict> {
 
    /**
     * 重复检查SQL
     */
    Long duplicateCheckCountSql(DuplicateCheckRequest duplicateCheckRequest);
 
    List<DictModel> queryDictItemsByCode(@Param("code") String code);
 
    List<DictModel> queryTableDictItemsByCodeAndFilter(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql);
 
    String queryDictTextByKey(@Param("code") String code, @Param("key") String key);
 
    String queryDictKeyByText(@Param("code") String code, @Param("text") String text);
 
    List<DictModel> queryTableDictByKeys(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("keyArray") List<String> keyArray);
 
    String queryTableDictByText(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("value") String value);
 
    /**
     * 查询所有部门 作为字典信息 id -->value,departName -->text
     */
    List<DictModel> queryAllDepartBackDictModel();
 
    /**
     * 根据表名、显示字段名、存储字段名 查询树
     */
    List<TreeSelectModel> queryTreeList(@Param("query") Map<String, String> query, @Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("pidField") String pidField, @Param("pid") String pid, @Param("hasChildField") String hasChildField);
 
    /**
     * 物理删除
     */
    @Select("delete from sys_dict where id = #{id}")
    void physicalDeleteById(@Param("id") String id);
 
    /**
     * 查询被逻辑删除的数据
     */
    @Select("select * from sys_dict where del_flag = 1")
    List<SysDict> queryDeleteList();
 
    /**
     * 修改状态值
     */
    @Update("update sys_dict set del_flag = #{flag,jdbcType=INTEGER} where id = #{id,jdbcType=VARCHAR}")
    void updateDictDelFlag(@Param("flag") int delFlag, @Param("id") String id);
}