直接上代码
@Data public class SS_Res { public SS_Res(String pol, String pod) { this.pol = pol; this.pod = pod; } private String pol; private String pod; }
Dao
@Query(value="select new com.example.SS_Res(" + " ss.pol " + " ,ss.pod " + " )"+ " from ss_res ss , ssa_res ssa " + " where ss.ssUUID = ssa.ssaUUID " + " and (ifnull(:companyUUID,'')='' or ssa.companyUUID=:companyUUID) " List<SS_Res> findHqlExample(@Param("companyUUID")String companyUUID);
标签:String,Jpa,companyUUID,ss,pol,Hql,pod,ssa From: https://www.cnblogs.com/hanjun0612/p/16594075.html