refactor(system): 重构字典明细查询功能
- 创建 SystemDictDetailVo 视图对象用于数据传输 - 修改控制器返回类型为 SystemDictDetailVo - 重构查询方法使用 LambdaQueryWrapper 替代 XML 配置 - 移除 SystemDictDetailTb 中的 dict 关联字段 - 添加字典名称查询的辅助方法 - 更新前端组件移除搜索功能并简化工具栏
This commit is contained in:
-33
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="cn.odboy.system.dal.mysql.SystemDictDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="cn.odboy.system.dal.dataobject.SystemDictDetailTb">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="label" property="label" jdbcType="VARCHAR"/>
|
||||
<result column="value" property="value" jdbcType="VARCHAR"/>
|
||||
<result column="dict_sort" property="dictSort" jdbcType="INTEGER"/>
|
||||
<result column="create_by" property="createBy" jdbcType="VARCHAR"/>
|
||||
<result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
<!-- 一对一关联 -->
|
||||
<association property="dict" javaType="cn.odboy.system.dal.dataobject.SystemDictTb">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
<select id="selectDictDetailByArgs" resultMap="BaseResultMap">
|
||||
select
|
||||
dd.id, dd.label, dd.`value`, dd.`dict_sort`, dd.create_by, dd.update_by, dd.create_time, dd.update_time,
|
||||
d.id as dict_id, d.name
|
||||
from system_dict_detail dd, system_dict d
|
||||
where dd.dict_id = d.id
|
||||
<if test="criteria.dictName != null and criteria.dictName != ''">
|
||||
and d.name = #{criteria.dictName}
|
||||
</if>
|
||||
<if test="criteria.label != null and criteria.label != ''">
|
||||
and dd.label = #{criteria.label}
|
||||
</if>
|
||||
order by dd.dict_sort
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user