首页 > 其他分享 >Jpa Hql

Jpa Hql

时间:2022-08-17 10:24:17浏览次数:46  
标签:String Jpa companyUUID ss pol Hql pod ssa

直接上代码

@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

相关文章