|
|
|
@ -881,7 +881,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
|
|
|
|
|
public int deleteWeaklyByPropertyIn(String propName, Object[] propValues,String username) {
|
|
|
|
|
if(propValues != null && propValues.length > 0){
|
|
|
|
|
String hql = "update " + persistentClass.getName()
|
|
|
|
|
+ " model set model.isValid = :isValid,model.modifyUser= :modifyUser,model.modifyDatetime=:modifyDatetime where model."
|
|
|
|
|
+ " model set model.isDeleted = :isDeleted,model.modifyUser= :modifyUser,model.modifyDatetime=:modifyDatetime where model."
|
|
|
|
|
+ propName + " in(:"+propName+") ";
|
|
|
|
|
Query query = entityManager.createQuery(hql);
|
|
|
|
|
query.setParameter("isDeleted",CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
@ -903,7 +903,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
|
|
|
|
|
public int deleteWeaklyByProperties(String[] propName, Object[] propValue,String username) {
|
|
|
|
|
if ((propName != null) && (propName.length > 0) && (propValue != null) && (propValue.length > 0) && (propValue.length == propName.length)) {
|
|
|
|
|
StringBuffer sb = new StringBuffer("update " + persistentClass.getName()
|
|
|
|
|
+ " model set model.isValid = :isValid,model.modifyUser= :modifyUser,model.modifyDatetime=:modifyDatetime where 1=1 ");
|
|
|
|
|
+ " model set model.isDeleted = :isDeleted,model.modifyUser= :modifyUser,model.modifyDatetime=:modifyDatetime where 1=1 ");
|
|
|
|
|
appendQL(sb,propName,propValue);
|
|
|
|
|
Query query = entityManager.createQuery(sb.toString());
|
|
|
|
|
query.setParameter("modifyUser",username);
|
|
|
|
|