xuhy
2025-04-27 5fa6e6f8410ef9d057174bcff2a3c5038c54a551
ruoyi-system/src/main/resources/mapper/system/TItemTypeMapper.xml
@@ -25,5 +25,20 @@
        where disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        ORDER BY sort_by,create_time DESC
    </select>
    <select id="getItemList" resultType="com.ruoyi.system.vo.TItemTypeVO">
        select <include refid="Base_Column_List"></include>
        from t_item_type
        where id in (
        select
            tit.id
        from t_item_type tit
        left join t_item ti on tit.id = ti.type_id
        where tit.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        <if test="itemName != null and itemName != ''">
            and ti.item_name like concat('%', #{itemName}, '%')
        </if>
        GROUP BY tit.id
        ORDER BY tit.sort_by,tit.create_time DESC)
    </select>
</mapper>