diff --git a/src/main/java/com/lungcare/dicomfile/dao/impl/UserDAOImp.java b/src/main/java/com/lungcare/dicomfile/dao/impl/UserDAOImp.java index 4ce519b..9e9ca0d 100644 --- a/src/main/java/com/lungcare/dicomfile/dao/impl/UserDAOImp.java +++ b/src/main/java/com/lungcare/dicomfile/dao/impl/UserDAOImp.java @@ -70,8 +70,6 @@ public List getAllUsers(){ public void addUser(String user_account,String user_name,String user_password,int user_age,int user_gender,int user_role,String user_tel,String user_address){ - - User user = new User(); user.setAccount(user_account); user.setPassword(user_password); diff --git a/src/main/java/com/lungcare/dicomfile/entity/User.java b/src/main/java/com/lungcare/dicomfile/entity/User.java index d85609d..80d96a0 100644 --- a/src/main/java/com/lungcare/dicomfile/entity/User.java +++ b/src/main/java/com/lungcare/dicomfile/entity/User.java @@ -31,6 +31,8 @@ public class User { private Date lastLoginTime;//最后一次登陆时间 private int gender;//性别 0表示男 1表示女 + private String email;//用户邮箱 + @ManyToOne(cascade = { CascadeType.PERSIST }, fetch = FetchType.EAGER) private Role ro; @@ -40,6 +42,12 @@ public class User { + public String getEmail() { + return email; + } + public void setEmail(String email) { + this.email = email; + } public int getId() { return id; } diff --git a/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/dao/impl/UserDAOImp.class b/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/dao/impl/UserDAOImp.class index f5a36a5..916d118 100644 Binary files a/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/dao/impl/UserDAOImp.class and b/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/dao/impl/UserDAOImp.class differ diff --git a/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/entity/User.class b/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/entity/User.class index daa1028..970b12e 100644 Binary files a/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/entity/User.class and b/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/entity/User.class differ diff --git a/src/main/webapp/WEB-INF/logs/ssh.log b/src/main/webapp/WEB-INF/logs/ssh.log index 3efcd8d..cc3f82a 100644 --- a/src/main/webapp/WEB-INF/logs/ssh.log +++ b/src/main/webapp/WEB-INF/logs/ssh.log @@ -33940,3 +33940,32 @@ Caused by: org.hibernate.MappingException: Could not determine type for: com.lun 2015-09-08 15:06:32,832 INFO [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] - Building new Hibernate SessionFactory 2015-09-08 15:06:33,677 INFO [org.springframework.orm.hibernate3.HibernateTransactionManager] - Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@1800b96] of Hibernate SessionFactory for HibernateTransactionManager 2015-09-08 15:06:33,683 INFO [org.springframework.web.context.ContextLoader] - Root WebApplicationContext: initialization completed in 1642 ms +2015-09-08 15:21:44,690 INFO [org.springframework.web.context.ContextLoader] - Root WebApplicationContext: initialization started +2015-09-08 15:21:44,921 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Refreshing Root WebApplicationContext: startup date [Tue Sep 08 15:21:44 CST 2015]; root of context hierarchy +2015-09-08 15:21:45,070 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from URL [file:/G:/wjlProgramFiles/local-git-repository/LungCareRestFulAPI/src/main/webapp/WEB-INF/classes/applicationContext.xml] +2015-09-08 15:21:45,551 INFO [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning +2015-09-08 15:21:45,555 INFO [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] - JSR-330 'javax.inject.Named' annotation found and supported for component scanning +2015-09-08 15:21:45,949 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from URL [file:/G:/wjlProgramFiles/local-git-repository/LungCareRestFulAPI/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/config/spring-hibernate.xml] +2015-09-08 15:21:46,109 INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - Loading properties file from URL [file:/G:/wjlProgramFiles/local-git-repository/LungCareRestFulAPI/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/config/jdbc.properties] +2015-09-08 15:21:46,117 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring +2015-09-08 15:21:46,132 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2cd9fa: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,customersResource,remoteFileTransferResource,usersResource,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sessionFactory,transactionManager,transactionBase,localFileService,localFileTransferDAO,remoteFileService,remoteFileTransferDAO,algorithmService,algorithmDAO,receiveEntityService,receiveEntityDAO,sendEntityService,sendEntityDAO,userEntityService,userEntityDAO,dicomFileDAO,fileDAO]; root of factory hierarchy +2015-09-08 15:21:46,275 INFO [org.springframework.jdbc.datasource.DriverManagerDataSource] - Loaded JDBC driver: com.mysql.jdbc.Driver +2015-09-08 15:21:46,779 INFO [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] - Building new Hibernate SessionFactory +2015-09-08 15:21:47,643 INFO [org.springframework.orm.hibernate3.HibernateTransactionManager] - Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@1b812ba] of Hibernate SessionFactory for HibernateTransactionManager +2015-09-08 15:21:47,650 INFO [org.springframework.web.context.ContextLoader] - Root WebApplicationContext: initialization completed in 2960 ms +2015-09-08 15:37:58,903 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Closing Root WebApplicationContext: startup date [Tue Sep 08 15:21:44 CST 2015]; root of context hierarchy +2015-09-08 15:37:58,904 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2cd9fa: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,customersResource,remoteFileTransferResource,usersResource,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sessionFactory,transactionManager,transactionBase,localFileService,localFileTransferDAO,remoteFileService,remoteFileTransferDAO,algorithmService,algorithmDAO,receiveEntityService,receiveEntityDAO,sendEntityService,sendEntityDAO,userEntityService,userEntityDAO,dicomFileDAO,fileDAO]; root of factory hierarchy +2015-09-08 15:37:58,908 INFO [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] - Closing Hibernate SessionFactory +2015-09-08 15:38:06,831 INFO [org.springframework.web.context.ContextLoader] - Root WebApplicationContext: initialization started +2015-09-08 15:38:06,854 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Refreshing Root WebApplicationContext: startup date [Tue Sep 08 15:38:06 CST 2015]; root of context hierarchy +2015-09-08 15:38:06,900 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from URL [file:/G:/wjlProgramFiles/local-git-repository/LungCareRestFulAPI/src/main/webapp/WEB-INF/classes/applicationContext.xml] +2015-09-08 15:38:06,979 INFO [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning +2015-09-08 15:38:06,980 INFO [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] - JSR-330 'javax.inject.Named' annotation found and supported for component scanning +2015-09-08 15:38:07,068 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from URL [file:/G:/wjlProgramFiles/local-git-repository/LungCareRestFulAPI/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/config/spring-hibernate.xml] +2015-09-08 15:38:07,249 INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - Loading properties file from URL [file:/G:/wjlProgramFiles/local-git-repository/LungCareRestFulAPI/src/main/webapp/WEB-INF/classes/com/lungcare/dicomfile/config/jdbc.properties] +2015-09-08 15:38:07,280 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring +2015-09-08 15:38:07,290 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@142636b: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,customersResource,remoteFileTransferResource,usersResource,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sessionFactory,transactionManager,transactionBase,localFileService,localFileTransferDAO,remoteFileService,remoteFileTransferDAO,algorithmService,algorithmDAO,receiveEntityService,receiveEntityDAO,sendEntityService,sendEntityDAO,userEntityService,userEntityDAO,dicomFileDAO,fileDAO]; root of factory hierarchy +2015-09-08 15:38:07,473 INFO [org.springframework.jdbc.datasource.DriverManagerDataSource] - Loaded JDBC driver: com.mysql.jdbc.Driver +2015-09-08 15:38:07,869 INFO [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] - Building new Hibernate SessionFactory +2015-09-08 15:38:08,808 INFO [org.springframework.orm.hibernate3.HibernateTransactionManager] - Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@159fd87] of Hibernate SessionFactory for HibernateTransactionManager +2015-09-08 15:38:08,815 INFO [org.springframework.web.context.ContextLoader] - Root WebApplicationContext: initialization completed in 1982 ms diff --git a/src/main/webapp/htmls/User.html b/src/main/webapp/htmls/User.html index c41cbc6..0732653 100644 --- a/src/main/webapp/htmls/User.html +++ b/src/main/webapp/htmls/User.html @@ -136,7 +136,9 @@ $(function() { - + alert("111"); + findUsersByCurrentPage(); + alert("222"); $('a[data-toggle="tab"]').on('shown.bs.tab', function(e) { // 获取已激活的标签页的名称 var activeTab = $(e.target).text(); @@ -167,7 +169,6 @@ url : '/transfer/rest/user/getAllUsers', data : {}, dataType : 'JSON', - async:false, success : function(result) { if (result == "" || result == null) { alert("there is no data in the table receiveEntity!");