企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
@EntityTranslate(conditions = "AREA_CODE=#{eparchyCode} and VALIDFLAG='0' ") conditions 里写sql的条件,变量用#{}表示,变量从当前实体类中取值 ``` /** * TdMUser扩展 */ @TranslateEnable public class TdMUserExt extends TdMUser { private static final long serialVersionUID = 1L; /** * 区域信息 */ @EntityTranslate(conditions = "AREA_CODE=#{eparchyCode} and VALIDFLAG='0' ") private TdMArea areaInfo; public TdMArea getAreaInfo() { return areaInfo; } public void setAreaInfo(TdMArea areaInfo) { this.areaInfo = areaInfo; } } ``` @EntityTranslate不仅可以标注实体类,还可以标注List,如: ``` /** * 区域列表 */ @EntityTranslate(conditions = "AREA_CODE=#{eparchyCode} and VALIDFLAG='0'") private List<TdMArea> areaList; ```