mybatis使用java实体中定义的常量
示例代码:
<select id="findDealerInfo" parameterType="com.pisen.cloud.luna.ms.dealer.api.beans.DealerInfoBean" resultType="com.pisen.cloud.luna.ms.dealer.api.beans.DealerInfoBean"> SELECT dea.uid uid, dea.enabled_flag enabledFlag, dea.delete_flag deleteFlag, dea.tenement_id tenementId, dea.parent_id parentId, pd.name parentName, con.name contactName, con.mobile mobile FROM dealer AS dea LEFT JOIN (SELECT a.* FROM contact AS a where tenement_id = #{tenementId} and main_contact = ${@[email protected]_MAIN}) con ON dea.uid = con.dealer_id LEFT JOIN dealer pd on pd.uid = dea.parent_id WHERE dea.tenement_id = #{tenementId} </select>
格式:
${@实体包完整路径@常量名}
原文地址:https://www.cnblogs.com/sxdcgaq8080/p/9205495.html
时间: 2024-11-06 07:11:32