Commit 695de329 authored by 麻笑宇's avatar 麻笑宇

fix(statistics): 修复自定义过滤器查询返回值类型

- 将 TzsCustomFilterMapper.xml 中 queryEquCategory 方法的 resultType 从 JSONArray 改为 JSONObject- 在 UnitTypeEnum.java 中修正了 value 和 key 的赋值,使用 code 替代 name
parent cfac6ed7
...@@ -43,7 +43,7 @@ public enum UnitTypeEnum { ...@@ -43,7 +43,7 @@ public enum UnitTypeEnum {
for (UnitTypeEnum e : UnitTypeEnum.values()) { for (UnitTypeEnum e : UnitTypeEnum.values()) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("label",e.name); jsonObject.put("label",e.name);
jsonObject.put("value",e.name); jsonObject.put("value",e.code);
jsonObject.put("key",e.code); jsonObject.put("key",e.code);
jsonArray.add(jsonObject); jsonArray.add(jsonObject);
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
where parent_id = #{parentId} where parent_id = #{parentId}
</select> </select>
<select id="queryEquCategory" resultType="com.alibaba.fastjson.JSONArray"> <select id="queryEquCategory" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
code AS value, code AS value,
code AS key, code AS key,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment