Commit 2ab637b7 authored by 雍欢's avatar 雍欢

修复CommonDomainService.saveBaseInfoEntity判断实体是否重复返回类型错误

parent 3f1bc45c
......@@ -438,10 +438,10 @@ public class CommonDomainService {
.append(entity.getClass().getName())
.append(" e where billCode=:billCode")
.toString();
int count = (int) generalRepository.getEntityManager().createQuery(jpql)
Number count = (Number) generalRepository.getEntityManager().createQuery(jpql)
.setParameter("billCode", entity.getBillCode())
.getSingleResult();
Assert.isTrue(count == 0, MessageSourceContext.getMessage(MessageConstants.BILLCODE_NOT_DUPLICATE));
Assert.isTrue(count.intValue() == 0, MessageSourceContext.getMessage(MessageConstants.BILLCODE_NOT_DUPLICATE));
if (entity.getStatusId() == null) {
entity.setStatusId(0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment