后台代码:
HhUserEntity hhUserEntity=super.getEntity(HhUserEntity.class, userId);
if(hhUserEntity!=null){
String ids="";
Object [] couponIds=(Object[])couponJson.toArray();
if(couponIds!=null&&couponIds.length>0){
for(int i=0;i<couponIds.length;i++){
if(i==0){
ids=ids+"'"+couponIds[i]+"'";
}else{
ids=ids+",'"+couponIds[i]+"'";
}
}
}
String hql="from CouponPublishEntity e left join CouponPoolEntity d where d.pubId=e.pubId and d.owner='"+userId+"' and e.pubid in ("+ids+") ";
List<HhCouponsEntity> list = super.findByQueryString(hql);
System.out.println(list);
if(list!=null&&list.size()>0){
super.deleteAllEntitie(list);
}
报错:
[org.jeecgframework.core.common.exception.GlobalExceptionResolver]全局处理异常捕获:
org.hibernate.QueryException: could not resolve property: pubid of: com.sendiy.hh.coupons.entity.CouponPublishEntity [from com.sendiy.hh.coupons.entity.CouponPublishEntity e left join Coupon 。。。
"obj": {
"code": "201",
"msg": "could not resolve property: pubid of: com.sendiy.hh.coupons.entity.CouponPublishEntity [from com.sendiy.hh.coupons.entity.CouponPublishEntity e left join CouponPoolEntity d where d.pubId=e.pubId and d.owner='4028668150c6aedb0150c6ddde750005' and e.pubid in ('2') ]"
},
"attributes": {},
"msg": "操作成功",
"success": true
检查下两个数据库表映射实体,无码,应该出现在id的问题