|
|
@ -4,6 +4,7 @@ import cn.estsh.i3plus.core.api.iservice.busi.ITestTransService;
|
|
|
|
import cn.estsh.i3plus.core.apiservice.dao.ITestTransDao;
|
|
|
|
import cn.estsh.i3plus.core.apiservice.dao.ITestTransDao;
|
|
|
|
import cn.estsh.i3plus.core.apiservice.dao.ITransDaoSec;
|
|
|
|
import cn.estsh.i3plus.core.apiservice.dao.ITransDaoSec;
|
|
|
|
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
|
|
|
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.util.StringUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.*;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.*;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.repository.SysDepartmentRepository;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.repository.SysDepartmentRepository;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.repository.SysUserInfoRepository;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.repository.SysUserInfoRepository;
|
|
|
@ -19,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.persistence.LockModeType;
|
|
|
|
import javax.persistence.LockModeType;
|
|
|
|
|
|
|
|
import java.util.Hashtable;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Random;
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
|
|
|
@ -546,4 +548,25 @@ public class TestTransService implements ITestTransService {
|
|
|
|
testTransUserRepository.updateByPropertiesWithVal("id",id,"salary",salary);
|
|
|
|
testTransUserRepository.updateByPropertiesWithVal("id",id,"salary",salary);
|
|
|
|
System.out.println("5秒后更新:" + u.getName() + "," + u.getSalary());
|
|
|
|
System.out.println("5秒后更新:" + u.getName() + "," + u.getSalary());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public String GetPkWhere(String pkNames, Hashtable ht, String werk) {
|
|
|
|
|
|
|
|
/*if (pkNames!=null && pkNames.trim()=="")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return " where 1=0";
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long start = System.currentTimeMillis();
|
|
|
|
|
|
|
|
if (StringUtil.isEmpty(pkNames)){
|
|
|
|
|
|
|
|
return " where 1=0";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String[] PkStrings = pkNames.split(",");
|
|
|
|
|
|
|
|
//pkNames.Split(',');
|
|
|
|
|
|
|
|
StringBuilder WhereString = new StringBuilder(" where 1=1 and werks='" + werk + "' ");
|
|
|
|
|
|
|
|
for (String pkString : PkStrings) {
|
|
|
|
|
|
|
|
WhereString.append(" and ").append(pkString).append("='").append(ht.get(pkString.toString())).append("' ");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
System.out.println(System.currentTimeMillis()-start);
|
|
|
|
|
|
|
|
return WhereString.toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|