fix(repository): 修复报价模型禁用查询的空值处理问题

- 修改 QuotationModelForbidMapper.xml 中的 isForbid 查询语句
- 使用 IFNULL 函数处理可能的空值情况,避免返回 null 值
- 将 ShoppingSearchVO 中的 moduleName 字段类型从 Integer 改为 String
- 确保模块名称字段能够正确存储字符串类型的值
This commit is contained in:
曹鹏飞 2026-03-17 18:10:36 +08:00
parent 531b3b2932
commit fe88835f05
2 changed files with 7 additions and 4 deletions

View File

@ -11,7 +11,7 @@ public class ShoppingSearchVO {
/**
* 模块名称
*/
private Integer moduleName;
private String moduleName;
/**
* 系列名称

View File

@ -25,8 +25,11 @@
</select>
<select id="isForbid" resultType="boolean">
select is_forbid
from quotation_model_forbid
where model_id=#{modelId} and source_type=#{type} and source_id=#{targetId}
SELECT IFNULL((SELECT is_forbid
FROM quotation_model_forbid
WHERE model_id = #{modelId} AND source_type = #{type} AND source_id = #{targetId}
LIMIT 1),
0
) as is_forbid;
</select>
</mapper>