|
|
@@ -6,7 +6,7 @@ import ltass.staudy.spring.data.jpa.dao.UserJpaDao;
|
|
6
|
6
|
import ltass.staudy.spring.data.jpa.entity.User;
|
|
7
|
7
|
import ltass.staudy.spring.data.jpa.exception.ExceptionHelper;
|
|
8
|
8
|
import ltass.staudy.spring.data.jpa.exception.JpaDaoNoPrimaryException;
|
|
9
|
|
-import ltass.staudy.spring.data.jpa.exception.JpaDaoNoVerionInfoException;
|
|
|
9
|
+import ltass.staudy.spring.data.jpa.exception.JpaDaoNoVersionInfoException;
|
|
10
|
10
|
import ltass.staudy.spring.data.jpa.repo.UserRepository;
|
|
11
|
11
|
import ltass.staudy.spring.data.jpa.utils.IdUtils;
|
|
12
|
12
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -44,7 +44,7 @@ public class UserJpaDaoImpl implements UserJpaDao{
|
|
44
|
44
|
@Override
|
|
45
|
45
|
public User update(User entity) {
|
|
46
|
46
|
if(entity.getId()==null) throw new JpaDaoNoPrimaryException("user","update");
|
|
47
|
|
- if(entity.getVerNo()==null) throw new JpaDaoNoVerionInfoException("user","update");
|
|
|
47
|
+ if(entity.getVerNo()==null) throw new JpaDaoNoVersionInfoException("user","update");
|
|
48
|
48
|
|
|
49
|
49
|
String now = DateUtil.now();
|
|
50
|
50
|
entity.setUpdateDatetime(now);
|