Jelajahi Sumber

Merge branch 'dev-mysql' into yc-spec-0408

# Conflicts:
#	src/main/webapp/resources/js/common/controllers/commonCtrls.js
liusw 7 tahun lalu
induk
melakukan
3df281267a
66 mengubah file dengan 2079 tambahan dan 1314 penghapusan
  1. 710 694
      pom.xml
  2. 14 6
      src/main/java/com/uas/platform/b2c/common/account/api/AuthedWebPageController.java
  3. 17 4
      src/main/java/com/uas/platform/b2c/common/account/api/TokenController.java
  4. 4 4
      src/main/java/com/uas/platform/b2c/common/account/controller/AuthenticationController.java
  5. 66 20
      src/main/java/com/uas/platform/b2c/common/account/controller/EnterpriseController.java
  6. 277 25
      src/main/java/com/uas/platform/b2c/common/account/controller/SecurityController.java
  7. 2 1
      src/main/java/com/uas/platform/b2c/common/account/controller/UserController.java
  8. 1 0
      src/main/java/com/uas/platform/b2c/common/account/dao/UserCacheEnterpriseDao.java
  9. 15 0
      src/main/java/com/uas/platform/b2c/common/account/model/Enterprise.java
  10. 45 1
      src/main/java/com/uas/platform/b2c/common/account/model/User.java
  11. 24 1
      src/main/java/com/uas/platform/b2c/common/account/model/UserInfo.java
  12. 5 0
      src/main/java/com/uas/platform/b2c/common/account/service/EnterpriseService.java
  13. 74 40
      src/main/java/com/uas/platform/b2c/common/account/service/impl/EnterpriseServiceImpl.java
  14. 0 2
      src/main/java/com/uas/platform/b2c/common/account/service/impl/SecQuestionServiceImpl.java
  15. 4 3
      src/main/java/com/uas/platform/b2c/common/account/service/impl/UserQuestionServiceImpl.java
  16. 41 56
      src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java
  17. 54 0
      src/main/java/com/uas/platform/b2c/common/account/support/LocalSSOHelp.java
  18. 10 8
      src/main/java/com/uas/platform/b2c/common/account/v2/controller/EnterpriseController.java
  19. 15 11
      src/main/java/com/uas/platform/b2c/common/account/v2/controller/UserController.java
  20. 9 0
      src/main/java/com/uas/platform/b2c/common/account/v2/service/EnterpriseService.java
  21. 7 3
      src/main/java/com/uas/platform/b2c/common/account/v2/service/UserService.java
  22. 62 0
      src/main/java/com/uas/platform/b2c/common/account/v2/service/impl/EnterpriseServiceImpl.java
  23. 103 78
      src/main/java/com/uas/platform/b2c/common/account/v2/service/impl/UserServiceImpl.java
  24. 11 10
      src/main/java/com/uas/platform/b2c/core/filter/SSOInterceptor.java
  25. 0 1
      src/main/java/com/uas/platform/b2c/external/erp/prod/service/impl/ProdServiceImpl.java
  26. 36 4
      src/main/java/com/uas/platform/b2c/external/erp/product/service/impl/KindServiceImpl.java
  27. 6 0
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductReplaceDao.java
  28. 2 3
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java
  29. 2 1
      src/main/java/com/uas/platform/b2c/prod/product/component/dao/ComponentDao.java
  30. 2 1
      src/main/java/com/uas/platform/b2c/prod/product/component/dao/ComponentInfoDao.java
  31. 15 9
      src/main/java/com/uas/platform/b2c/prod/product/kind/dao/KindDao.java
  32. 9 0
      src/main/java/com/uas/platform/b2c/prod/store/facade/StoreApplyFacade.java
  33. 65 0
      src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreApplyFacadeImpl.java
  34. 1 0
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/QualificationServiceImpl.java
  35. 1 0
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreApplyServiceImpl.java
  36. 14 9
      src/main/resources/dev/account.properties
  37. 14 13
      src/main/resources/prod/account.properties
  38. 1 1
      src/main/resources/spring/context.xml
  39. 13 10
      src/main/resources/test/account.properties
  40. 2 0
      src/main/webapp/WEB-INF/spring/webmvc.xml
  41. 3 3
      src/main/webapp/resources/css/vendor/sell.css
  42. 9 5
      src/main/webapp/resources/js/admin/controllers/help/HelpDetailCtrl.js
  43. 5 3
      src/main/webapp/resources/js/admin/controllers/help/HelpEditCtrl.js
  44. 42 18
      src/main/webapp/resources/js/common/controllers/commonCtrls.js
  45. 88 0
      src/main/webapp/resources/js/common/services.js
  46. 2 1
      src/main/webapp/resources/js/help/controllers/supplyChainCtrl.js
  47. 22 90
      src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js
  48. 6 2
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_home_ctrl.js
  49. 56 50
      src/main/webapp/resources/js/vendor/app.js
  50. 5 65
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js
  51. 7 4
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_index_ctrl.js
  52. 2 0
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js
  53. 2 2
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js
  54. 4 4
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_maintain_ctrl.js
  55. 1 1
      src/main/webapp/resources/view/common/footer.html
  56. 16 14
      src/main/webapp/resources/view/usercenter/forstore/account_manager.html
  57. 19 3
      src/main/webapp/resources/view/usercenter/forstore/home_center.html
  58. 2 2
      src/main/webapp/resources/view/usercenter/left_nav.html
  59. 1 1
      src/main/webapp/resources/view/usercenter/modal/homeCenter_modal.html
  60. 16 14
      src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html
  61. 3 3
      src/main/webapp/resources/view/vendor/forstore/vendor_store.html
  62. 8 3
      src/main/webapp/resources/view/vendor/forstore/vendor_store_apply.html
  63. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_store_info.html
  64. 3 3
      src/main/webapp/resources/view/vendor/forstore/vendor_store_maintain.html
  65. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_upload.html
  66. 2 2
      src/main/webapp/resources/view/vendor/left_nav.html

+ 710 - 694
pom.xml

@@ -1,700 +1,716 @@
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns="http://maven.apache.org/POM/4.0.0"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>platform-b2c</artifactId>
-  <packaging>war</packaging>
-  <name>platform-b2c Maven Webapp</name>
-  <url>http://maven.apache.org</url>
-  <parent>
-    <groupId>com.uas.platform</groupId>
-    <artifactId>platform</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
-  </parent>
-  <profiles>
-    <profile>
-      <!-- 开发环境 -->
-      <id>dev</id>
-      <properties>
-        <profile>dev</profile>
-        <!-- static plugin -->
-        <static-path>static</static-path>
-      </properties>
-      <!-- 默认 -->
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-    </profile>
-    <profile>
-      <!-- 测试环境 -->
-      <id>test</id>
-      <properties>
-        <profile>test</profile>
-        <!-- static plugin -->
-        <static-path>static</static-path>
-      </properties>
-    </profile>
-    <profile>
-      <!-- 生产环境 -->
-      <id>prod</id>
-      <properties>
-        <profile>prod</profile>
-        <!-- static plugin -->
-        <static-path>https://static.usoftmall.com</static-path>
-      </properties>
-    </profile>
-  </profiles>
-  <dependencies>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>javax.servlet-api</artifactId>
-      <version>3.0.1</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-    </dependency>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>platform-b2c</artifactId>
+	<packaging>war</packaging>
+	<name>platform-b2c Maven Webapp</name>
+	<url>http://maven.apache.org</url>
+	<parent>
+		<groupId>com.uas.platform</groupId>
+		<artifactId>platform</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
+	</parent>
+	<profiles>
+		<profile>
+			<!-- 开发环境 -->
+			<id>dev</id>
+			<properties>
+				<profile>dev</profile>
+				<!-- static plugin -->
+				<static-path>static</static-path>
+			</properties>
+			<!-- 默认 -->
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+		</profile>
+		<profile>
+			<!-- 测试环境 -->
+			<id>test</id>
+			<properties>
+				<profile>test</profile>
+				<!-- static plugin -->
+				<static-path>static</static-path>
+			</properties>
+		</profile>
+		<profile>
+			<!-- 生产环境 -->
+			<id>prod</id>
+			<properties>
+				<profile>prod</profile>
+				<!-- static plugin -->
+				<static-path>https://static.usoftmall.com</static-path>
+			</properties>
+		</profile>
+	</profiles>
+	<dependencies>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+			<version>3.0.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+		</dependency>
 
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.uas.platform</groupId>
-      <artifactId>platform-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.uas.api</groupId>
-      <artifactId>b2c-erp-api</artifactId>
-      <version>0.0.2-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>com.uas.api</groupId>
-      <artifactId>b2c-manage-api</artifactId>
-      <version>0.0.1</version>
-    </dependency>
-    <dependency>
-      <groupId>com.caucho</groupId>
-      <artifactId>hessian</artifactId>
-    </dependency>
-    <!-- spring -->
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context-support</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-jdbc</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-tx</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-aop</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-aspects</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-      <version>4.1.6.RELEASE</version>
-    </dependency>
-    <!-- jpa -->
-    <dependency>
-      <groupId>org.springframework.data</groupId>
-      <artifactId>spring-data-jpa</artifactId>
-    </dependency>
-    <!-- mongodb spring -->
-    <dependency>
-      <groupId>org.springframework.data</groupId>
-      <artifactId>spring-data-mongodb</artifactId>
-      <version>1.5.2.RELEASE</version>
-    </dependency>
-    <!-- xstream -->
-    <dependency>
-      <groupId>com.thoughtworks.xstream</groupId>
-      <artifactId>xstream</artifactId>
-      <version>1.3.1</version>
-    </dependency>
-    <!-- fileupload -->
-    <dependency>
-      <groupId>commons-fileupload</groupId>
-      <artifactId>commons-fileupload</artifactId>
-      <version>1.3.1</version>
-    </dependency>
-    <!-- hibernate -->
-    <dependency>
-      <groupId>org.hibernate</groupId>
-      <artifactId>hibernate-core</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>xml-apis</groupId>
-          <artifactId>xml-apis</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.hibernate</groupId>
-      <artifactId>hibernate-entitymanager</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>cglib</groupId>
-          <artifactId>cglib</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>dom4j</groupId>
-          <artifactId>dom4j</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.hibernate.javax.persistence</groupId>
-      <artifactId>hibernate-jpa-2.1-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.hibernate</groupId>
-      <artifactId>hibernate-validator</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jcl-over-slf4j</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.aspectj</groupId>
-      <artifactId>aspectjrt</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.aspectj</groupId>
-      <artifactId>aspectjweaver</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-lang3</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.validation</groupId>
-      <artifactId>validation-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.transaction</groupId>
-      <artifactId>jta</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.hibernate</groupId>
-      <artifactId>hibernate-ehcache</artifactId>
-    </dependency>
-    <!-- mysql -->
-    <dependency>
-      <groupId>mysql</groupId>
-      <artifactId>mysql-connector-java</artifactId>
-      <version>5.1.21</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-orm</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-pool</groupId>
-      <artifactId>commons-pool</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-dbcp</groupId>
-      <artifactId>commons-dbcp</artifactId>
-    </dependency>
-    <!-- redis -->
-    <dependency>
-      <groupId>redis.clients</groupId>
-      <artifactId>jedis</artifactId>
-      <version>2.7.3</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.data</groupId>
-      <artifactId>spring-data-redis</artifactId>
-      <version>1.6.0.RELEASE</version>
-    </dependency>
-    <!-- spring mobile -->
-    <dependency>
-      <groupId>org.springframework.mobile</groupId>
-      <artifactId>spring-mobile-device</artifactId>
-    </dependency>
-    <!--json-lib -->
-    <dependency>
-      <groupId>net.sf.json-lib</groupId>
-      <artifactId>json-lib</artifactId>
-      <classifier>jdk15</classifier>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-core-asl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-databind</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-annotations</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.alibaba</groupId>
-      <artifactId>fastjson</artifactId>
-    </dependency>
-    <!-- velocity -->
-    <dependency>
-      <groupId>org.apache.velocity</groupId>
-      <artifactId>velocity</artifactId>
-    </dependency>
-    <!-- mail -->
-    <dependency>
-      <groupId>javax.mail</groupId>
-      <artifactId>mail</artifactId>
-    </dependency>
-    <!-- jxls -->
-    <dependency>
-      <groupId>net.sf.jxls</groupId>
-      <artifactId>jxls-core</artifactId>
-      <version>1.0.4</version>
-    </dependency>
-    <dependency>
-      <groupId>net.sf.jxls</groupId>
-      <artifactId>jxls-reader</artifactId>
-      <version>1.0.4</version>
-    </dependency>
-    <!-- poi -->
-    <dependency>
-      <groupId>org.apache.poi</groupId>
-      <artifactId>poi</artifactId>
-      <version>3.17</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.poi</groupId>
-      <artifactId>poi-ooxml</artifactId>
-      <version>3.17</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.poi</groupId>
-          <artifactId>poi</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!-- BeeCloud支付集成SDK -->
-    <dependency>
-      <groupId>cn.beecloud</groupId>
-      <artifactId>beecloud-java-sdk</artifactId>
-      <version>3.1.0</version>
-    </dependency>
-    <dependency>
-      <groupId>jaxen</groupId>
-      <artifactId>jaxen</artifactId>
-      <version>1.1.6</version>
-      <exclusions>
-        <exclusion>
-          <groupId>dom4j</groupId>
-          <artifactId>dom4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>xml-apis</groupId>
-          <artifactId>xml-apis</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>xerces</groupId>
-          <artifactId>xmlParserAPIs</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>xerces</groupId>
-          <artifactId>xercesImpl</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>xerces</groupId>
-          <artifactId>xercesImpl</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.ibm.icu</groupId>
-          <artifactId>icu4j</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!-- kafka消息中间件 -->
-    <dependency>
-      <groupId>org.springframework.kafka</groupId>
-      <artifactId>spring-kafka</artifactId>
-      <version>1.2.2.RELEASE</version>
-    </dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.uas.platform</groupId>
+			<artifactId>platform-core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.uas.api</groupId>
+			<artifactId>b2c-erp-api</artifactId>
+			<version>0.0.2-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>com.uas.api</groupId>
+			<artifactId>b2c-manage-api</artifactId>
+			<version>0.0.1</version>
+		</dependency>
+		<dependency>
+			<groupId>com.caucho</groupId>
+			<artifactId>hessian</artifactId>
+		</dependency>
+		<!-- spring -->
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-core</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context-support</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-webmvc</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-jdbc</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-tx</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-aop</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-aspects</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-test</artifactId>
+			<version>4.1.6.RELEASE</version>
+		</dependency>
+		<!-- jpa -->
+		<dependency>
+			<groupId>org.springframework.data</groupId>
+			<artifactId>spring-data-jpa</artifactId>
+		</dependency>
+		<!-- mongodb spring -->
+		<dependency>
+			<groupId>org.springframework.data</groupId>
+			<artifactId>spring-data-mongodb</artifactId>
+			<version>1.5.2.RELEASE</version>
+		</dependency>
+		<!-- xstream -->
+		<dependency>
+			<groupId>com.thoughtworks.xstream</groupId>
+			<artifactId>xstream</artifactId>
+			<version>1.3.1</version>
+		</dependency>
+		<!-- fileupload -->
+		<dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload</artifactId>
+			<version>1.3.1</version>
+		</dependency>
+		<!-- hibernate -->
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-core</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>xml-apis</groupId>
+					<artifactId>xml-apis</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-entitymanager</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>cglib</groupId>
+					<artifactId>cglib</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>dom4j</groupId>
+					<artifactId>dom4j</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate.javax.persistence</groupId>
+			<artifactId>hibernate-jpa-2.1-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-validator</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jcl-over-slf4j</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjrt</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjweaver</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>javax.validation</groupId>
+			<artifactId>validation-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>javax.transaction</groupId>
+			<artifactId>jta</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-ehcache</artifactId>
+		</dependency>
+		<!-- jdbc -->
+		<dependency>
+			<groupId>com.oracle</groupId>
+			<artifactId>ojdbc6</artifactId>
+		</dependency>
+		<!-- mysql -->
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+			<version>5.1.21</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-orm</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>commons-pool</groupId>
+			<artifactId>commons-pool</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>commons-dbcp</groupId>
+			<artifactId>commons-dbcp</artifactId>
+		</dependency>
+		<!-- redis -->
+		<dependency>
+			<groupId>redis.clients</groupId>
+			<artifactId>jedis</artifactId>
+			<version>2.7.3</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.data</groupId>
+			<artifactId>spring-data-redis</artifactId>
+			<version>1.6.0.RELEASE</version>
+		</dependency>
+		<!-- spring mobile -->
+		<dependency>
+			<groupId>org.springframework.mobile</groupId>
+			<artifactId>spring-mobile-device</artifactId>
+		</dependency>
+		<!--json-lib -->
+		<dependency>
+			<groupId>net.sf.json-lib</groupId>
+			<artifactId>json-lib</artifactId>
+			<classifier>jdk15</classifier>
+		</dependency>
+		<dependency>
+			<groupId>org.codehaus.jackson</groupId>
+			<artifactId>jackson-core-asl</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.codehaus.jackson</groupId>
+			<artifactId>jackson-mapper-asl</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-databind</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-annotations</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+		</dependency>
+		<!-- velocity -->
+		<dependency>
+			<groupId>org.apache.velocity</groupId>
+			<artifactId>velocity</artifactId>
+		</dependency>
+		<!-- mail -->
+		<dependency>
+			<groupId>javax.mail</groupId>
+			<artifactId>mail</artifactId>
+		</dependency>
+		<!-- jxls -->
+		<dependency>
+			<groupId>net.sf.jxls</groupId>
+			<artifactId>jxls-core</artifactId>
+			<version>1.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.jxls</groupId>
+			<artifactId>jxls-reader</artifactId>
+			<version>1.0.4</version>
+		</dependency>
+		<!-- poi -->
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi</artifactId>
+			<version>3.17</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml</artifactId>
+			<version>3.17</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.apache.poi</groupId>
+					<artifactId>poi</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<!-- BeeCloud支付集成SDK -->
+		<dependency>
+			<groupId>cn.beecloud</groupId>
+			<artifactId>beecloud-java-sdk</artifactId>
+			<version>3.1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>jaxen</groupId>
+			<artifactId>jaxen</artifactId>
+			<version>1.1.6</version>
+			<exclusions>
+				<exclusion>
+					<groupId>dom4j</groupId>
+					<artifactId>dom4j</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>xml-apis</groupId>
+					<artifactId>xml-apis</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>xerces</groupId>
+					<artifactId>xmlParserAPIs</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>xerces</groupId>
+					<artifactId>xercesImpl</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>xerces</groupId>
+					<artifactId>xercesImpl</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>com.ibm.icu</groupId>
+					<artifactId>icu4j</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<!-- kafka消息中间件 -->
+		 <dependency>
+			 <groupId>org.springframework.kafka</groupId>
+			 <artifactId>spring-kafka</artifactId>
+			<version>1.2.2.RELEASE</version>
+		 </dependency>
 
-    <!-- service on dubbo -->
-    <dependency>
-      <groupId>com.uas.dfs</groupId>
-      <artifactId>dfs-api</artifactId>
-    </dependency>
-    <!-- search -->
-    <dependency>
-      <groupId>com.uas.search</groupId>
-      <artifactId>search-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.uas.message</groupId>
-      <artifactId>message-mail-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.uas.message</groupId>
-      <artifactId>message-sms-api</artifactId>
-    </dependency>
+		<!-- service on dubbo -->
+		<dependency>
+			<groupId>com.uas.dfs</groupId>
+			<artifactId>dfs-api</artifactId>
+		</dependency>
+		<!-- search -->
+		<dependency>
+			<groupId>com.uas.search</groupId>
+			<artifactId>search-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.uas.message</groupId>
+			<artifactId>message-mail-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.uas.message</groupId>
+			<artifactId>message-sms-api</artifactId>
+		</dependency>
 
-    <dependency>
-      <groupId>com.uas.account</groupId>
-      <artifactId>account-common</artifactId>
-    </dependency>
+		<dependency>
+		<groupId>com.uas.account</groupId>
+		<artifactId>account-common</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>com.uas.sso</groupId>
+			<artifactId>sso-common</artifactId>
+			<version>0.0.1-SNAPSHOT</version>
+			<exclusions>
+				<exclusion>
+					<artifactId>tomcat-embed-core</artifactId>
+					<groupId>org.apache.tomcat.embed</groupId>
+				</exclusion>
+			</exclusions>
+		</dependency>
 
-    <dependency>
-      <groupId>net.sourceforge.pinyin4j</groupId>
-      <artifactId>pinyin4j</artifactId>
-      <version>1.1.0</version>
-    </dependency>
-    <!-- security -->
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-config</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-web</artifactId>
-    </dependency>
+        <dependency>
+            <groupId>net.sourceforge.pinyin4j</groupId>
+            <artifactId>pinyin4j</artifactId>
+			<version>1.1.0</version>
+        </dependency>
+        <!-- security -->
+		<dependency>
+			<groupId>org.springframework.security</groupId>
+			<artifactId>spring-security-core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.security</groupId>
+			<artifactId>spring-security-config</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.security</groupId>
+			<artifactId>spring-security-web</artifactId>
+		</dependency>
 
-    <!-- swagger-springmvc -->
-    <dependency>
-      <groupId>com.mangofactory</groupId>
-      <artifactId>swagger-springmvc</artifactId>
-      <version>1.0.2</version>
-    </dependency>
-    <dependency>
-      <groupId>com.mangofactory</groupId>
-      <artifactId>swagger-models</artifactId>
-      <version>1.0.2</version>
-    </dependency>
-    <dependency>
-      <groupId>com.wordnik</groupId>
-      <artifactId>swagger-annotations</artifactId>
-      <version>1.3.11</version>
-    </dependency>
-    <!-- swagger-springmvc dependencies -->
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-      <version>15.0</version>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml</groupId>
-      <artifactId>classmate</artifactId>
-      <version>1.1.0</version>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.uas.ps</groupId>
-      <artifactId>ps-core</artifactId>
-      <version>0.0.1-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>com.uas.ps</groupId>
-      <artifactId>ps-entity</artifactId>
-      <version>0.0.1-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>com.uas.ps</groupId>
-      <artifactId>ps-entity</artifactId>
-      <version>0.0.1-SNAPSHOT</version>
-    </dependency>
-    <!--Hutool POI工具类(对MS Office操作)-->
-    <!--<dependency>
-      <groupId>org.apache.poi</groupId>
-      <artifactId>poi-ooxml</artifactId>
-      <version>3.17</version>
-    </dependency>-->
-    <dependency>
-      <groupId>com.xiaoleilu</groupId>
-      <artifactId>hutool-poi</artifactId>
-      <version>3.2.2</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.poi</groupId>
-          <artifactId>poi-ooxml</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-  </dependencies>
-  <build>
-    <finalName>platform-b2c</finalName>
-    <!-- 受profile影响的目录 -->
-    <resources>
-      <resource>
-        <directory>${basedir}/src/main/resources</directory>
-        <filtering>true</filtering>
-        <excludes>
-          <exclude>**/*.xls</exclude>
-        </excludes>
-      </resource>
-      <!-- xls文件不能filter处理,需区分出来 -->
-      <resource>
-        <directory>${basedir}/src/main/resources</directory>
-        <filtering>false</filtering>
-        <includes>
-          <include>**/*.xls</include>
-        </includes>
-      </resource>
-    </resources>
-    <!-- 在maven生命周期validate阶段生成timestamp -->
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>buildnumber-maven-plugin</artifactId>
-        <version>1.3</version>
-        <executions>
-          <execution>
-            <phase>validate</phase>
-            <goals>
-              <goal>create-timestamp</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
-          <items>
-            <item>timestamp</item>
-          </items>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.7</source>
-          <target>1.7</target>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>com.samaxes.maven</groupId>
-        <artifactId>minify-maven-plugin</artifactId>
-        <version>1.7.4</version>
-        <!-- 静态文件压缩 -->
-        <executions>
-          <execution>
-            <id>default-minify</id>
-            <phase>prepare-package</phase>
-            <configuration>
-              <charset>UTF-8</charset>
-              <skipMerge>true</skipMerge>
-              <closureLanguage>ECMASCRIPT5</closureLanguage>
-              <closureAngularPass>true</closureAngularPass>
-              <nosuffix>true</nosuffix>
-              <webappTargetDir>${project.build.directory}/minify</webappTargetDir>
-              <cssSourceDir>resources</cssSourceDir>
-              <cssEngine>YUI</cssEngine>
-              <jsSourceDir>resources</jsSourceDir>
-              <jsEngine>YUI</jsEngine>
-              <cssSourceIncludes>
-                <cssSourceInclude>css/**/*.css</cssSourceInclude>
-                <cssSourceInclude>data/**/*.json</cssSourceInclude>
-              </cssSourceIncludes>
-              <cssSourceExcludes>
-                <cssSourceExclude>css/**/*.min.css</cssSourceExclude>
-              </cssSourceExcludes>
-              <jsSourceIncludes>
-                <jsSourceInclude>js/**/*.js</jsSourceInclude>
-              </jsSourceIncludes>
-              <jsSourceExcludes>
-                <jsSourceExclude>js/**/*.min.js</jsSourceExclude>
-              </jsSourceExcludes>
-            </configuration>
-            <goals>
-              <goal>minify</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>copy-resources</id>
-            <phase>prepare-package</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>${project.build.directory}/minify</outputDirectory>
-              <overwrite>false</overwrite>
-              <resources>
-                <resource>
-                  <directory>${basedir}/src/main/webapp</directory>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>com.uas.plugins</groupId>
-        <artifactId>static-maven-plugin</artifactId>
-        <version>0.0.2-SNAPSHOT</version>
-        <!-- 静态资源分离 -->
-        <executions>
-          <execution>
-            <id>default-static</id>
-            <phase>prepare-package</phase>
-            <configuration>
-              <pathMatcher>static</pathMatcher>
-              <staticUrl>${static-path}</staticUrl>
-              <webappDir>${project.build.directory}/minify</webappDir>
-              <sourceDir>/</sourceDir>
-              <targetDir>${project.build.directory}/statics</targetDir>
-              <staticDir>/</staticDir>
-              <sourceIncludes>
-                <sourceInclude>resources/js/**/*.js</sourceInclude>
-                <sourceInclude>resources/data/**/*.json</sourceInclude>
-                <sourceInclude>resources/view/**/*.html</sourceInclude>
-                <sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
-              </sourceIncludes>
-              <!-- http://static.ubtoc.com/css/index.css?_v=1450321871828 -->
-              <versionSuffix>
-                <suffix>?_v=${timestamp}</suffix>
-                <exclude>*/require.js,*.min.js,*.min.css</exclude>
-              </versionSuffix>
-            </configuration>
-            <goals>
-              <goal>static</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-war-plugin</artifactId>
-        <version>2.4</version>
-        <configuration>
-          <webResources>
-            <resource>
-              <directory>${project.build.directory}/statics</directory>
-            </resource>
-            <resource>
-              <directory>${project.build.directory}/minify</directory>
-            </resource>
-          </webResources>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.tomcat.maven</groupId>
-        <artifactId>tomcat7-maven-plugin</artifactId>
-        <version>2.2</version>
-        <configuration>
-          <port>8080</port>
-          <path>/platform-b2c</path>
-          <uriEncoding>utf-8</uriEncoding>
-        </configuration>
-      </plugin>
-    </plugins>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.eclipse.m2e</groupId>
-          <artifactId>lifecycle-mapping</artifactId>
-          <version>1.0.0</version>
-          <configuration>
-            <lifecycleMappingMetadata>
-              <pluginExecutions>
-                <pluginExecution>
-                  <pluginExecutionFilter>
-                    <groupId>
-                      org.codehaus.mojo
-                    </groupId>
-                    <artifactId>
-                      buildnumber-maven-plugin
-                    </artifactId>
-                    <versionRange>
-                      [1.3,)
-                    </versionRange>
-                    <goals>
-                      <goal>
-                        create-timestamp
-                      </goal>
-                    </goals>
-                  </pluginExecutionFilter>
-                  <action>
-                    <ignore></ignore>
-                  </action>
-                </pluginExecution>
-              </pluginExecutions>
-            </lifecycleMappingMetadata>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-  <distributionManagement>
-    <!-- 发布release仓库 -->
-    <repository>
-      <id>platform-release</id>
-      <name>platform-release</name>
-      <url>http://113.105.74.141:8081/artifactory/libs-release-local</url>
-    </repository>
-    <!-- 发布快照版本 -->
-    <snapshotRepository>
-      <id>platform-snapshots</id>
-      <name>platform-snapshots</name>
-      <url>http://113.105.74.141:8081/artifactory/libs-snapshot-local</url>
-    </snapshotRepository>
-  </distributionManagement>
+		<!-- swagger-springmvc -->
+		<dependency>
+			<groupId>com.mangofactory</groupId>
+			<artifactId>swagger-springmvc</artifactId>
+			<version>1.0.2</version>
+		</dependency>
+		<dependency>
+			<groupId>com.mangofactory</groupId>
+			<artifactId>swagger-models</artifactId>
+			<version>1.0.2</version>
+		</dependency>
+		<dependency>
+			<groupId>com.wordnik</groupId>
+			<artifactId>swagger-annotations</artifactId>
+			<version>1.3.11</version>
+		</dependency>
+		<!-- swagger-springmvc dependencies -->
+		<dependency>
+			<groupId>com.google.guava</groupId>
+			<artifactId>guava</artifactId>
+			<version>15.0</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml</groupId>
+			<artifactId>classmate</artifactId>
+			<version>1.1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.uas.ps</groupId>
+			<artifactId>ps-core</artifactId>
+			<version>0.0.1-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>com.uas.ps</groupId>
+			<artifactId>ps-entity</artifactId>
+			<version>0.0.1-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>com.uas.ps</groupId>
+			<artifactId>ps-entity</artifactId>
+			<version>0.0.1-SNAPSHOT</version>
+		</dependency>
+		<!--Hutool POI工具类(对MS Office操作)-->
+		<!--<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml</artifactId>
+			<version>3.17</version>
+		</dependency>-->
+		<dependency>
+			<groupId>com.xiaoleilu</groupId>
+			<artifactId>hutool-poi</artifactId>
+			<version>3.2.2</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.apache.poi</groupId>
+					<artifactId>poi-ooxml</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+	</dependencies>
+	<build>
+		<finalName>platform-b2c</finalName>
+		<!-- 受profile影响的目录 -->
+		<resources>
+			<resource>
+				<directory>${basedir}/src/main/resources</directory>
+				<filtering>true</filtering>
+				<excludes>
+					<exclude>**/*.xls</exclude>
+				</excludes>
+			</resource>
+			<!-- xls文件不能filter处理,需区分出来 -->
+			<resource>
+				<directory>${basedir}/src/main/resources</directory>
+				<filtering>false</filtering>
+				<includes>
+					<include>**/*.xls</include>
+				</includes>
+			</resource>
+		</resources>
+		<!-- 在maven生命周期validate阶段生成timestamp -->
+		<plugins>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>buildnumber-maven-plugin</artifactId>
+				<version>1.3</version>
+				<executions>
+					<execution>
+						<phase>validate</phase>
+						<goals>
+							<goal>create-timestamp</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
+					<items>
+						<item>timestamp</item>
+					</items>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.7</source>
+					<target>1.7</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>com.samaxes.maven</groupId>
+				<artifactId>minify-maven-plugin</artifactId>
+				<version>1.7.4</version>
+				<!-- 静态文件压缩 -->
+				<executions>
+					<execution>
+						<id>default-minify</id>
+						<phase>prepare-package</phase>
+						<configuration>
+							<charset>UTF-8</charset>
+							<skipMerge>true</skipMerge>
+							<closureLanguage>ECMASCRIPT5</closureLanguage>
+							<closureAngularPass>true</closureAngularPass>
+							<nosuffix>true</nosuffix>
+							<webappTargetDir>${project.build.directory}/minify</webappTargetDir>
+							<cssSourceDir>resources</cssSourceDir>
+							<cssEngine>YUI</cssEngine>
+							<jsSourceDir>resources</jsSourceDir>
+							<jsEngine>YUI</jsEngine>
+							<cssSourceIncludes>
+								<cssSourceInclude>css/**/*.css</cssSourceInclude>
+								<cssSourceInclude>data/**/*.json</cssSourceInclude>
+							</cssSourceIncludes>
+							<cssSourceExcludes>
+								<cssSourceExclude>css/**/*.min.css</cssSourceExclude>
+							</cssSourceExcludes>
+							<jsSourceIncludes>
+								<jsSourceInclude>js/**/*.js</jsSourceInclude>
+							</jsSourceIncludes>
+							<jsSourceExcludes>
+								<jsSourceExclude>js/**/*.min.js</jsSourceExclude>
+							</jsSourceExcludes>
+						</configuration>
+						<goals>
+							<goal>minify</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-resources-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy-resources</id>
+						<phase>prepare-package</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>${project.build.directory}/minify</outputDirectory>
+							<overwrite>false</overwrite>
+							<resources>
+								<resource>
+									<directory>${basedir}/src/main/webapp</directory>
+								</resource>
+							</resources>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>com.uas.plugins</groupId>
+				<artifactId>static-maven-plugin</artifactId>
+				<version>0.0.2-SNAPSHOT</version>
+				<!-- 静态资源分离 -->
+				<executions>
+					<execution>
+						<id>default-static</id>
+						<phase>prepare-package</phase>
+						<configuration>
+							<pathMatcher>static</pathMatcher>
+							<staticUrl>${static-path}</staticUrl>
+							<webappDir>${project.build.directory}/minify</webappDir>
+							<sourceDir>/</sourceDir>
+							<targetDir>${project.build.directory}/statics</targetDir>
+							<staticDir>/</staticDir>
+							<sourceIncludes>
+								<sourceInclude>resources/js/**/*.js</sourceInclude>
+								<sourceInclude>resources/data/**/*.json</sourceInclude>
+								<sourceInclude>resources/view/**/*.html</sourceInclude>
+								<sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
+							</sourceIncludes>
+							<!-- http://static.ubtoc.com/css/index.css?_v=1450321871828 -->
+							<versionSuffix>
+								<suffix>?_v=${timestamp}</suffix>
+								<exclude>*/require.js,*.min.js,*.min.css</exclude>
+							</versionSuffix>
+						</configuration>
+						<goals>
+							<goal>static</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.4</version>
+				<configuration>
+					<webResources>
+						<resource>
+							<directory>${project.build.directory}/statics</directory>
+						</resource>
+						<resource>
+							<directory>${project.build.directory}/minify</directory>
+						</resource>
+					</webResources>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.tomcat.maven</groupId>
+				<artifactId>tomcat7-maven-plugin</artifactId>
+				<version>2.2</version>
+				<configuration>
+					<port>8080</port>
+					<path>/platform-b2c</path>
+					<uriEncoding>utf-8</uriEncoding>
+				</configuration>
+			</plugin>
+		</plugins>
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<groupId>org.eclipse.m2e</groupId>
+					<artifactId>lifecycle-mapping</artifactId>
+					<version>1.0.0</version>
+					<configuration>
+						<lifecycleMappingMetadata>
+							<pluginExecutions>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>
+											org.codehaus.mojo
+										</groupId>
+										<artifactId>
+											buildnumber-maven-plugin
+										</artifactId>
+										<versionRange>
+											[1.3,)
+										</versionRange>
+										<goals>
+											<goal>
+												create-timestamp
+											</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<ignore></ignore>
+									</action>
+								</pluginExecution>
+							</pluginExecutions>
+						</lifecycleMappingMetadata>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
+	<distributionManagement>
+		<!-- 发布release仓库 -->
+		<repository>
+			<id>platform-release</id>
+			<name>platform-release</name>
+			<url>http://113.105.74.141:8081/artifactory/libs-release-local</url>
+		</repository>
+		<!-- 发布快照版本 -->
+		<snapshotRepository>
+			<id>platform-snapshots</id>
+			<name>platform-snapshots</name>
+			<url>http://113.105.74.141:8081/artifactory/libs-snapshot-local</url>
+		</snapshotRepository>
+	</distributionManagement>
 </project>

+ 14 - 6
src/main/java/com/uas/platform/b2c/common/account/api/AuthedWebPageController.java

@@ -1,6 +1,6 @@
+/*
 package com.uas.platform.b2c.common.account.api;
 
-import com.uas.account.util.AccountUtils;
 import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.common.account.model.ResourceItem;
 import com.uas.platform.b2c.common.account.model.Role;
@@ -14,6 +14,7 @@ import com.uas.platform.b2c.core.support.TrustedAuthenticationToken;
 import com.uas.platform.core.exception.SystemError;
 import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.util.AgentUtils;
+import com.uas.sso.util.AccountUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.authority.SimpleGrantedAuthority;
@@ -32,12 +33,14 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 
+*/
 /**
  * 认证信息跳转界面
  * 
  * @author yingp
  * 
- */
+ *//*
+
 @RequestMapping("/api")
 @Controller
 public class AuthedWebPageController {
@@ -51,7 +54,8 @@ public class AuthedWebPageController {
 	@Autowired
 	private UserService userService;
 
-	/**
+	*/
+/**
 	 * 用token信息自动登录并打开web页面
 	 * 
 	 * @param request
@@ -59,7 +63,8 @@ public class AuthedWebPageController {
 	 * @param access_token
 	 * @param redirect_page
 	 * @throws IOException
-	 */
+	 *//*
+
 	@RequestMapping(value = "/webpage", method = RequestMethod.GET)
 	public void getWebPageAccessToken(HttpServletRequest request, HttpServletResponse response,
 			@RequestParam(value = "access_token", required = true) String access_token,
@@ -92,11 +97,13 @@ public class AuthedWebPageController {
 		throw new SystemError(AuthenErrors.ACCESS_TOKEN_EXPIRES);
 	}
 
-	/**
+	*/
+/**
 	 * 根据用户获取权限集合
 	 * @param user
 	 * @return
-	 */
+	 *//*
+
 	private Set<GrantedAuthority> getGrantedAuthorities(User user) {
 		Set<GrantedAuthority> authSet = new HashSet<GrantedAuthority>();
 		Set<Role> roles = user.getRoles();
@@ -118,3 +125,4 @@ public class AuthedWebPageController {
 	}
 
 }
+*/

+ 17 - 4
src/main/java/com/uas/platform/b2c/common/account/api/TokenController.java

@@ -10,12 +10,11 @@ import com.uas.platform.b2c.common.base.service.AccessTokenService;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.core.exception.SystemError;
 import com.uas.platform.core.util.AgentUtils;
+import com.uas.sso.SSOHelper;
+import com.uas.sso.entity.UserSpaceView;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 
@@ -106,4 +105,18 @@ public class TokenController {
 		return map;
 	}
 
+	@RequestMapping("/test")
+	public ModelMap test(HttpServletRequest request) {
+		SSOHelper.getToken(request);
+		return new ModelMap("success", true);
+	}
+
+
+	@RequestMapping("/userSpaceViewTest")
+	@ResponseBody
+	public ModelMap test(UserSpaceView userSpaceView) {
+		return new ModelMap("success", true);
+	}
+
+
 }

+ 4 - 4
src/main/java/com/uas/platform/b2c/common/account/controller/AuthenticationController.java

@@ -47,7 +47,7 @@ public class AuthenticationController {
 			return null;
 		}
 		User sysUser = SystemSession.getUser();
-		List<UserQuestion> userQuestion = userQuestionService.findUserQuestionByUserUUOrderBySortAsc(sysUser.getUserUU());
+		//List<UserQuestion> userQuestion = userQuestionService.findUserQuestionByUserUUOrderBySortAsc(sysUser.getUserUU());
 		User user = userService.findUserByUserUU(sysUser.getUserUU());
 		user.setEnterprise(sysUser.getEnterprise());
 		try{
@@ -55,11 +55,11 @@ public class AuthenticationController {
 				user.setIssys(Constant.YES);
 			}
 		} catch (NullPointerException e) { }
-
 		UserInfo userInfo = new UserInfo(user);
-		if (!CollectionUtils.isEmpty(userQuestion)) {
+		Integer hasQuestion = user.getHasQuestion();
+		if (hasQuestion != null && hasQuestion ==1) {
 			userInfo.setHaveUserQuestion(true);
-			userInfo.setSecLevel((short)(1+userInfo.getSecLevel()));
+			userInfo.setSecLevel((short) (1 + userInfo.getSecLevel()));
 		}
 		return userInfo;
 	}

+ 66 - 20
src/main/java/com/uas/platform/b2c/common/account/controller/EnterpriseController.java

@@ -1,9 +1,5 @@
 package com.uas.platform.b2c.common.account.controller;
 
-import com.uas.account.entity.ApplyUserSpace;
-import com.uas.account.entity.UserSpaceDetail;
-import com.uas.account.support.Page;
-import com.uas.account.util.AccountUtils;
 import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.account.model.UserBaseInfo;
@@ -12,8 +8,16 @@ import com.uas.platform.b2c.common.account.service.EnterpriseService;
 import com.uas.platform.b2c.common.account.service.UserService;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.fa.payment.utils.StringUtils;
+import com.uas.platform.b2c.prod.store.model.StoreIn;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
+import com.uas.platform.b2c.trade.support.CodeType;
 import com.uas.platform.b2c.trade.support.ResultMap;
+import com.uas.sso.entity.ApplyUserSpaceView;
+import com.uas.sso.entity.UserSpaceDetail;
+import com.uas.sso.entity.UserSpaceView;
+import com.uas.sso.entity.UserView;
+import com.uas.sso.support.Page;
+import com.uas.sso.util.AccountUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -45,7 +49,8 @@ public class EnterpriseController {
 	 */
 	@RequestMapping(value = "/{enuu}/info", method = RequestMethod.GET)
 	public Enterprise getEnterpriseInfo(@PathVariable Long enuu){
-		return enterpriseService.getEnterpriseInfo(enuu);
+		Enterprise enterpriseInfo = enterpriseService.getEnterpriseInfo(enuu);
+		return enterpriseInfo;
 	}
 
 	/**
@@ -54,9 +59,9 @@ public class EnterpriseController {
 	 * @return 完整的企业信息
 	 */
 	@RequestMapping(value = "/{enuu}/detailInfo", method = RequestMethod.GET)
-	public UserSpaceDetail getUserSpaceDetailByEnuu(@PathVariable Long enuu){
+	public UserSpaceView getUserSpaceDetailByEnuu(@PathVariable Long enuu){
 		try {
-			return AccountUtils.findByBusinessCode(enterpriseService.getEnterpriseInfo(enuu).getEnBussinessCode()) ;
+			return AccountUtils.findBySpaceUU(enuu) ;
 		}catch (Exception e){
 			return null;
 		}
@@ -78,12 +83,17 @@ public class EnterpriseController {
 	 * @return
 	 */
 	@RequestMapping(value = "/{enuu}/info", method = RequestMethod.POST)
-	public Enterprise updateEnterprise(@PathVariable Long enuu , @RequestBody Enterprise enterprise) {
+	public Enterprise updateEnterprise(@PathVariable Long enuu, @RequestBody Enterprise enterprise) {
+		Enterprise enterpriseInfo = enterpriseService.getEnterpriseInfo(enuu);
+		if (enterpriseInfo.getEnAdminuu() == null) {
+			throw new IllegalArgumentException("企业数据异常,管理员缺失!");
+		}
 		enterprise = enterpriseService.save(enterprise);
 		SystemSession.getUser().setCurrentEnterprise(enterprise.getUu());
 		return enterprise;
 	}
 
+
 	/**
 	 * 根据注册地址返回币别信息
 	 * @return 企业的币别信息 USD/RMB
@@ -108,7 +118,7 @@ public class EnterpriseController {
 	 */
 	@RequestMapping(value = "/register", method = RequestMethod.POST)
 	public ResultMap registerEnterprise(@RequestBody FormEnterprise enterprise, String filePath) {
-		return enterpriseService.registerEnterprise(enterprise,filePath,SystemSession.getUser());
+		return enterpriseService.registerEnterprise(enterprise, filePath, SystemSession.getUser());
 	}
 
 	/**
@@ -167,18 +177,46 @@ public class EnterpriseController {
 	 */
 	@RequestMapping(value = "/findByName/{enName}", method = RequestMethod.GET)
 	public UserSpaceDetail findByName(@PathVariable("enName") String enName) {
-		UserSpaceDetail userSpaceDetail = null;
+		UserSpaceView userSpaceView =null;
 		if (StringUtils.isEmpty(enName)) {
 			throw new IllegalArgumentException("信息未填写完整!");
 		}
 		try {
-			userSpaceDetail = AccountUtils.findByName(enName);
+			userSpaceView = AccountUtils.findBySpaceName(enName);
 		} catch (Exception e) {
 			throw new IllegalArgumentException("账户中心异常!");
 		}
+		UserSpaceDetail userSpaceDetail = null ;
+		if (userSpaceView != null) {
+			userSpaceDetail = new UserSpaceDetail();
+			userSpaceDetail.setUu(userSpaceView.getSpaceUU());
+			userSpaceDetail.setName(userSpaceView.getSpaceName());
+			userSpaceDetail.setCorporation(userSpaceView.getCorporation());
+			userSpaceDetail.setRegisterDate(userSpaceView.getRegisterDate());
+			Long adminUU = userSpaceView.getAdminUU();
+			if (adminUU == null) {
+				throw new IllegalArgumentException("账户中心管理员数据缺失!");
+			}
+			User admin = userService.findUserByUserUU(userSpaceView.getAdminUU());
+			userSpaceDetail.setAdminEmail(admin.getUserEmail());
+			userSpaceDetail.setAdminName(admin.getUserName());
+			userSpaceDetail.setAdminTel(admin.getUserTel());
+			userSpaceDetail.setBusinessCode(userSpaceView.getBusinessCode());
+			userSpaceDetail.setBusinessCodeImage(userSpaceView.getBusinessCodeImage());
+			userSpaceDetail.setAddress(userSpaceView.getRegAddress());
+			//userSpaceView.getValidCode();
+			userSpaceDetail.setLogoImage(userSpaceView.getLogoImage());
+			userSpaceDetail.setTel(userSpaceView.getTelephone());
+			userSpaceDetail.setProfession(userSpaceView.getProfession());
+			userSpaceDetail.setTags(userSpaceView.getTags());
+			//userSpaceView.getArea();
+		}
 		return userSpaceDetail;
 	}
 
+
+	/*UserSpaceDetailConvertuserSpaceView*/
+
 	/**
 	 * 发起绑定个人到企业的申请
 	 * @param phone
@@ -191,7 +229,9 @@ public class EnterpriseController {
 			return ResultMap.success("信息缺失");
 		}
 		try {
-			AccountUtils.applyUserSpace(phone,enName,businessCode);
+			User user = userService.findUserByUserTel(phone);
+			Enterprise enterprise = enterpriseService.findByEnBussinessCode(businessCode).get(0);
+			AccountUtils.applyUserSpace(user.getUserUU(),enterprise.getUu());
 		} catch (Exception e) {
 			return ResultMap.success(e.getMessage());
 		}
@@ -207,14 +247,15 @@ public class EnterpriseController {
 		if (StringUtils.isEmpty(phone)) {
 			throw new IllegalArgumentException("信息未填写完整!");
 		}
-		Page<ApplyUserSpace> applyUserSpacePage= null;
+		Page<ApplyUserSpaceView> applyUserSpacePage= null;
 		List<Map<String,Object>> mapList = new ArrayList<>();
 		try {
-			applyUserSpacePage = AccountUtils.findApplyInfo(phone,1,1024*1024*1024);
+			User user = userService.findUserByUserTel(phone);
+			applyUserSpacePage = AccountUtils.findApplyInfo(user.getUserUU(),1,10);
 			if (!CollectionUtils.isEmpty(applyUserSpacePage.getContent())) {
-				List<ApplyUserSpace> applyUserSpaceList = applyUserSpacePage.getContent();
-				for (ApplyUserSpace applyUserSpace : applyUserSpaceList) {
-					List<Enterprise> e = enterpriseService.findByEnBussinessCode(applyUserSpace.getBusinessCode());
+				List<ApplyUserSpaceView> applyUserSpaceList = applyUserSpacePage.getContent();
+				for (ApplyUserSpaceView applyUserSpace : applyUserSpaceList) {
+					List<Enterprise> e = enterpriseService.findByEnBussinessCode(applyUserSpace.getUserspace().getBusinessCode());
 					User admin = null;
 					if (!CollectionUtils.isEmpty(e) && e.get(0).getEnAdminuu() != null) {
 						admin = userService.findUserByUserUU(e.get(0).getEnAdminuu());
@@ -235,8 +276,12 @@ public class EnterpriseController {
 			public int compare(Object o1, Object o2) {
 				Map<String,Object> s1 = (Map<String,Object>) o1;
 				Map<String,Object> s2 = (Map<String,Object>)o2;
-				Long timeA = Long.parseLong(s1.get("date").toString());
-				Long timeB = Long.parseLong(s2.get("date").toString());
+				/*Long timeA = s1.get("date").toString());*/
+				Date dateA = (Date)s1.get("date");
+				Long timeA = dateA.getTime();
+				Date dateB = (Date)s2.get("date");
+				Long timeB = dateB.getTime();
+				/*Long timeB = Long.parseLong(s2.get("date").toString());*/
 				return timeA.compareTo(timeB);
 			}
 		});
@@ -254,7 +299,8 @@ public class EnterpriseController {
 		}
 		Map<String, Integer> result= null;
 		try {
-			result = AccountUtils.applyCount(businessCode);
+			Enterprise enterprise = enterpriseService.findByEnBussinessCode(businessCode).get(0);
+			result = AccountUtils.applyCount(enterprise.getUu());
 		} catch (Exception e) {
 			throw new IllegalArgumentException("系统异常");
 		}

+ 277 - 25
src/main/java/com/uas/platform/b2c/common/account/controller/SecurityController.java

@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
 import com.uas.account.entity.UserSpace;
 import com.uas.account.entity.UserSpaceDetail;
 import com.uas.account.entity.UserView;
-import com.uas.account.util.AccountUtils;
 import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
 import com.uas.platform.b2c.common.account.dao.UserDao;
 import com.uas.platform.b2c.common.account.dao.UserLoginTimeDao;
@@ -14,6 +13,7 @@ import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.account.model.UserLoginTime;
 import com.uas.platform.b2c.common.account.service.SigninLogService;
 import com.uas.platform.b2c.common.account.service.UserService;
+import com.uas.platform.b2c.common.account.support.LocalSSOHelp;
 import com.uas.platform.b2c.common.account.v2.service.EnterpriseService;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.core.util.AgentUtils;
@@ -22,6 +22,9 @@ import com.uas.sso.AuthToken;
 import com.uas.sso.SSOConfig;
 import com.uas.sso.SSOHelper;
 import com.uas.sso.SSOToken;
+import com.uas.sso.entity.UserAccount;
+import com.uas.sso.entity.UserSpaceView;
+import com.uas.sso.util.AccountUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,12 +36,15 @@ import org.springframework.mobile.device.site.SitePreference;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.WebDataBinder;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
+import java.beans.PropertyEditorSupport;
 import java.io.IOException;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -57,16 +63,24 @@ public class SecurityController {
 	private SigninLogService signinLogService;
 	@Autowired
 	private UserLoginTimeDao userLoginTimeDao;
-
 	@Autowired
 	private EnterpriseService enterpriseService;
 
+
+
 	@Autowired
 	private EnterpriseDao enterpriseDao;
 
+	@Autowired
+	private LocalSSOHelp localSSOServicImpl;
+
 	@Autowired
 	private UserDao userDao;
 
+	@Autowired
+	private LocalSSOHelp localSSOHelp;
+
+
 	private final DeviceResolver deviceResolver = new LiteDeviceResolver();
 
 	/**
@@ -128,7 +142,7 @@ public class SecurityController {
 			redirectUrl = request.getContextPath() + "/login/proxy";
 		}*/
 		ModelMap map = new ModelMap("content", redirectUrl);
-		map.put("baseUrl","/login/other");
+		map.put("baseUrl","/newLogin/other");
 		return map;
 	}
 	/**
@@ -153,6 +167,105 @@ public class SecurityController {
 		return new ModelMap("content", redirectUrl);
 	}
 
+
+	/**
+	 *
+	 * @Description: 在登陆状态下修改密码;
+	 * @author pengzh
+	 * @date 2018/3/12 16:43
+	 * @param request, response, returnUrl
+	 * @return org.springframework.ui.ModelMap
+	 * @throws
+	 */
+	@RequestMapping(value = "/mPassWord/page")
+	@ResponseBody
+	public ModelMap updatePassWord(HttpServletRequest request, HttpServletResponse response, String returnUrl) throws IOException {
+		request.getSession().setAttribute(SSOConfig.SSOReferer, returnUrl );
+		//SSOHelper.clearLogin(request, response);
+		String updatePasswordUrl = SSOHelper.getUpdatePasswordUrl(request, returnUrl);
+		ModelMap map = new ModelMap("content", updatePasswordUrl);
+		return map;
+	}
+
+
+
+
+
+	/**
+	 *
+	 * @Description: 修改邮箱;
+	 * @author pengzh
+	 * @date 2018/3/12 16:43
+	 * @param request, response, returnUrl
+	 * @return org.springframework.ui.ModelMap
+	 * @throws
+	 */
+	@RequestMapping(value = "/mEmail/page")
+	@ResponseBody
+	public ModelMap updateEmail(HttpServletRequest request, HttpServletResponse response, String returnUrl) throws IOException {
+		request.getSession().setAttribute(SSOConfig.SSOReferer, returnUrl );
+		//SSOHelper.clearLogin(request, response);
+		String updateEmailUrl = SSOHelper.getUpdateEmailUrl(request, returnUrl);
+		ModelMap map = new ModelMap("content", updateEmailUrl);
+		return map;
+	}
+
+	/**
+	 *
+	 * @Description: 修改电话;
+	 * @author pengzh
+	 * @date 2018/3/12 16:43
+	 * @param request, response, returnUrl
+	 * @return org.springframework.ui.ModelMap
+	 * @throws
+	 */
+	@RequestMapping(value = "/mPhone/page")
+	@ResponseBody
+	public ModelMap updateMobilePhone(HttpServletRequest request, HttpServletResponse response, String returnUrl) throws IOException {
+		request.getSession().setAttribute(SSOConfig.SSOReferer, returnUrl );
+		//SSOHelper.clearLogin(request, response);
+		String updateMobileUrl = SSOHelper.getUpdateMobileUrl(request, returnUrl);
+		return new ModelMap("content", updateMobileUrl);
+	}
+
+
+	/**
+	 *
+	 * @Description: 修改密保问题;
+	 * @author pengzh
+	 * @date 2018/3/12 16:43
+	 * @param request, response, returnUrl
+	 * @return org.springframework.ui.ModelMap
+	 * @throws
+	 */
+	@RequestMapping(value = "/mQuestion/page")
+	@ResponseBody
+	public ModelMap updateSecurityQuestion(HttpServletRequest request, HttpServletResponse response, String returnUrl) throws IOException {
+		request.getSession().setAttribute(SSOConfig.SSOReferer, returnUrl );
+		//SSOHelper.clearLogin(request, response);
+		String updateQuestionUrl = SSOHelper.getUpdateQuestionUrl(request, returnUrl);
+		return new ModelMap("content", updateQuestionUrl);
+	}
+
+
+	/**
+	 *
+	 * @Description: 设置实名认证;
+	 * @author pengzh
+	 * @date 2018/3/12 16:43
+	 * @param request, response, returnUrl
+	 * @return org.springframework.ui.ModelMap
+	 * @throws
+	 */
+	@RequestMapping(value = "/realNameAuth/page")
+	@ResponseBody
+	public ModelMap RealNameAuth(HttpServletRequest request, HttpServletResponse response, String returnUrl) throws IOException {
+		request.getSession().setAttribute(SSOConfig.SSOReferer, returnUrl );
+		String realNameAuthUrl = localSSOHelp.getRealNameAuthUrl(request,returnUrl);
+		return new ModelMap("content", realNameAuthUrl);
+	}
+
+
 	/**
 	 * 获取跨域登录的参数
 	 * 
@@ -218,6 +331,73 @@ public class SecurityController {
 		return null;
 	}
 
+	@InitBinder
+	public void InitBinder(WebDataBinder dataBinder) {
+		/*SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		dateFormat.setLenient(false);
+		dataBinder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));*/
+		dataBinder.registerCustomEditor(Date.class, new PropertyEditorSupport() {
+			@Override
+			public void setAsText(String value) {
+				setValue(new Date(Long.valueOf(value)));
+			}
+		});
+	}
+
+	/**
+	 * 其他地点登录后 同步登录状态
+	 * @param request
+	 * @param response
+	 */
+	@RequestMapping(value = "/newLogin/other", produces = {"application/javascript"})
+	@ResponseBody
+	public String afterCrossLogin(HttpServletRequest request, HttpServletResponse response, UserAccount userAccount, Integer maxage) {
+		if (userAccount != null && userAccount.getMobile() != null) {
+			SSOToken tk = new SSOToken();
+			tk.setUid(userAccount.getMobile());
+			tk.setTime(System.currentTimeMillis());
+			tk.setData(JSON.toJSONString(userAccount));
+			if (null != maxage) {
+				request.setAttribute("sso_cookie_maxage", maxage);
+			}
+			SSOHelper.setSSOCookie(request, response, tk, true);
+			response.setHeader("P3P","CP='IDCDSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'");
+
+			response.setHeader("P3P","CP=\"CURaADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSPCOR\"");
+			User user = getUserByToken(tk);
+			User currentUser = null;
+			if (userAccount.getMobile() != null) {
+				// UID表示所有系统公认的唯一标识,这里统一使用手机号
+				currentUser = userService.findUserByUserTel(userAccount.getMobile());
+			} else if (userAccount.getUserUU() != null) {
+				// dialectUID表示client系统自己的唯一标识,比如user_uu,手机号没设置的情况下使用
+				currentUser = userService.findUserByUserUU(userAccount.getUserUU());
+			} else {
+				logger.error(String.format("invalid user %s, please set uid or dialectUID", userAccount.getVipName()));
+			}
+			if (userAccount.getLastLoginTime() != null) {
+				currentUser.setLastLoginTime(userAccount.getLastLoginTime().getTime());
+			}
+			if (currentUser != null) {
+				userDao.save(currentUser);
+			}
+			if (user != null) {
+				/*if (!user.getUserPwd().equals(FlexJsonUtils.fromJson(tk.getData(), com.uas.account.entity.User.class).getPassword())){
+					return "successCallback({success:'0'})";
+				}*/
+				user.setIp(AgentUtils.getIp(request));
+				request.getSession().setAttribute("user", user);
+				SystemSession.setUser(user);
+				log(request, user);
+			}
+
+			return "successCallback({success:'1'})";
+		}
+		return "successCallback({success:'0'})";
+	}
+
+
+
 	/**
 	 * 其他地点登录后 同步登录状态
 	 * @param request
@@ -225,31 +405,31 @@ public class SecurityController {
 	 */
 	@RequestMapping(value = "/login/other")
 	@ResponseBody
-	public String afterCrossLogin(HttpServletRequest request, HttpServletResponse response, UserView userView, Integer maxage) {
+	public String afterCrossOldLogin(HttpServletRequest request, HttpServletResponse response, UserView userView, Integer maxage) {
 		String callback =request.getParameter("jsoncallback");
 		response.setContentType("text/html;charset=UTF-8");
 		if (userView != null && userView.getUid() != null) {
- 				SSOToken tk = new SSOToken();
-				tk.setUid(userView.getUid());
-				tk.setTime(System.currentTimeMillis());
-				tk.setData(JSON.toJSONString(userView));
-				if (null != maxage) {
-					request.setAttribute("sso_cookie_maxage", maxage);
-				}
-				SSOHelper.setSSOCookie(request, response, tk, true);
-				response.setHeader("P3P","CP='IDCDSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'");
+			SSOToken tk = new SSOToken();
+			tk.setUid(userView.getUid());
+			tk.setTime(System.currentTimeMillis());
+			tk.setData(JSON.toJSONString(userView));
+			if (null != maxage) {
+				request.setAttribute("sso_cookie_maxage", maxage);
+			}
+			SSOHelper.setSSOCookie(request, response, tk, true);
+			response.setHeader("P3P","CP='IDCDSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'");
 
-				response.setHeader("P3P","CP=\"CURaADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSPCOR\"");
-				User user = getUserByToken(tk);
-				if (user != null) {
-					if (!user.getUserPwd().equals(FlexJsonUtils.fromJson(tk.getData(), com.uas.account.entity.User.class).getPassword())){
-						return "successCallback({success:'0'})";
-					}
-					user.setIp(AgentUtils.getIp(request));
-					request.getSession().setAttribute("user", user);
-					SystemSession.setUser(user);
-					log(request, user);
+			response.setHeader("P3P","CP=\"CURaADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSPCOR\"");
+			User user = getOldUserByToken(tk);
+			if (user != null) {
+				if (!user.getUserPwd().equals(FlexJsonUtils.fromJson(tk.getData(), com.uas.account.entity.User.class).getPassword())){
+					return "successCallback({success:'0'})";
 				}
+				user.setIp(AgentUtils.getIp(request));
+				request.getSession().setAttribute("user", user);
+				SystemSession.setUser(user);
+				log(request, user);
+			}
 
 			return "successCallback({success:'1'})";
 		}
@@ -287,6 +467,79 @@ public class SecurityController {
 	}
 
 	private User getUserByToken(SSOToken token) {
+		User authedUser = null;
+		if (token.getData() != null) {
+			//com.uas.account.entity.User
+			UserAccount tokenUser = FlexJsonUtils.fromJson(token.getData(), UserAccount.class);
+			if (tokenUser.getMobile() != null) {
+				// UID表示所有系统公认的唯一标识,这里统一使用手机号
+				authedUser = userService.findUserByUserTel(tokenUser.getMobile());
+			} else if (tokenUser.getUserUU() != null) {
+				// dialectUID表示client系统自己的唯一标识,比如user_uu,手机号没设置的情况下使用
+				authedUser = userService.findUserByUserUU(tokenUser.getUserUU());
+			} else {
+				logger.error(String.format("invalid user %s, please set uid or dialectUID", tokenUser.getVipName()));
+			}
+			if (authedUser != null && authedUser.getEnterprises() != null) {
+
+				// 企业资料在client系统自己的唯一标识,比如en_uu
+				if (tokenUser.getSpaceUU() != null) {
+					// 如果企业不存在则更新该企业
+					for (Enterprise enterprise : authedUser.getEnterprises()) {
+						if (enterprise.getUu().equals(tokenUser.getSpaceUU())){
+							authedUser.setEnterprise(enterprise);
+						}
+					}
+					if (null == authedUser.getEnterprise()) {
+						Enterprise newEnterprise = enterpriseDao.findByUu(tokenUser.getSpaceUU());
+						if (null == newEnterprise) {
+							UserSpaceView userSpaceDetail = null;
+							try {
+								userSpaceDetail = AccountUtils.findByBusinessCode(tokenUser.getBusinessCode());
+							} catch (Exception e) { }
+							if (null != userSpaceDetail) {
+								enterpriseService.update(userSpaceDetail);
+							}
+							newEnterprise = enterpriseDao.findByUu(tokenUser.getSpaceUU());
+							authedUser.setEnterprise(newEnterprise);
+						} else {
+							authedUser.getEnterprises().add(newEnterprise);
+							userDao.save(authedUser);
+							authedUser.setEnterprise(newEnterprise);
+						}
+					}
+				} else if (tokenUser.getBusinessCode() != null) {
+					for (Enterprise enterprise : authedUser.getEnterprises()) {
+						// 企业资料在所有系统公认的唯一标识,这里使用商业登记证号
+						if (tokenUser.getBusinessCode().equals(enterprise.getEnBussinessCode())) {
+							authedUser.setEnterprise(enterprise);
+							//保存登录时间
+							List<UserLoginTime> userLoginTimeList = userLoginTimeDao.findByUserUUAndEnUU(authedUser.getUserUU(),enterprise.getUu());
+							UserLoginTime userLoginTime;
+							if (!CollectionUtils.isEmpty(userLoginTimeList)){
+								userLoginTime = userLoginTimeList.get(0);
+							}else {
+								userLoginTime = new UserLoginTime();
+								userLoginTime.setUserUU(authedUser.getUserUU());
+								userLoginTime.setEnUU(enterprise.getUu());
+							}
+							userLoginTime.setLoginTime(System.currentTimeMillis());
+							try {
+								userLoginTimeDao.save(userLoginTime);
+							}catch (Exception e){}
+							break;
+						}
+					}
+				}
+			}
+		}
+		return authedUser;
+	}
+
+
+
+
+	private User getOldUserByToken(SSOToken token) {
 		User authedUser = null;
 		if (token.getData() != null) {
 			com.uas.account.entity.User tokenUser = FlexJsonUtils.fromJson(token.getData(), com.uas.account.entity.User.class);
@@ -313,7 +566,7 @@ public class SecurityController {
 						if (null == newEnterprise) {
 							UserSpaceDetail userSpaceDetail = null;
 							try {
-								userSpaceDetail = AccountUtils.findByBusinessCode(tokenUser.getSpaceUID());
+								userSpaceDetail = com.uas.account.util.AccountUtils.findByBusinessCode(tokenUser.getSpaceUID());
 							} catch (Exception e) { }
 							UserSpace userSpace = new UserSpace();
 							userSpace.setDialectUID(tokenUser.getSpaceDialectUID());
@@ -355,7 +608,6 @@ public class SecurityController {
 		}
 		return authedUser;
 	}
-
 	/**
 	 * 记录登录日志
 	 * @param request

+ 2 - 1
src/main/java/com/uas/platform/b2c/common/account/controller/UserController.java

@@ -191,7 +191,8 @@ public class UserController {
 	 * @param newUserEmail 用户输入新邮箱地址
 	 */
 	@RequestMapping(value = "/sendCheckCode", method = RequestMethod.GET)
-	public ResponseEntity<String> sendCheckCode(final String newUserEmail, final HttpSession session) {
+	public ResponseEntity<String>
+	sendCheckCode(final String newUserEmail, final HttpSession session) {
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		Long checkTime = (Long)session.getAttribute("checkTime");

+ 1 - 0
src/main/java/com/uas/platform/b2c/common/account/dao/UserCacheEnterpriseDao.java

@@ -10,4 +10,5 @@ import org.springframework.stereotype.Repository;
  */
 @Repository
 public interface UserCacheEnterpriseDao extends JpaSpecificationExecutor<UserCacheEnterprise>, JpaRepository<UserCacheEnterprise, Long> {
+
 }

+ 15 - 0
src/main/java/com/uas/platform/b2c/common/account/model/Enterprise.java

@@ -156,6 +156,13 @@ public class Enterprise implements Serializable {
 	@Column(name = "en_accesssecret")
 	private String accessSecret;
 
+	/**
+	 * 企业认证状态;
+	 */
+	@Column(name = "en_validcode")
+	private Short enValidCode;
+
+
 	@Transient
 	private Integer receiptStatus;
 
@@ -345,6 +352,14 @@ public class Enterprise implements Serializable {
 		this.receiptStatus = receiptStatus;
 	}
 
+	public Short getEnValidCode() {
+		return enValidCode;
+	}
+
+	public void setEnValidCode(Short enValidCode) {
+		this.enValidCode = enValidCode;
+	}
+
 	@Override
 	public int hashCode() {
 		final int prime = 31;

+ 45 - 1
src/main/java/com/uas/platform/b2c/common/account/model/User.java

@@ -171,7 +171,7 @@ public class User implements Serializable {
 	private String idImgUrl;
 
 	/**
-	 * 是否通过审核  1:通过  0:未认证  2:正在审核
+	 * 是否通过审核  1:正在审核  0:未认证  2.已认证;
 	 */
 	@Column(name = "user_idenable")
 	private Short idEnable;
@@ -206,6 +206,26 @@ public class User implements Serializable {
 	@Column(name = "user_idRemarks")
 	private String idRemarks;
 
+
+	/**
+	 * 用户是否设置密保问题
+	 */
+	@Column(name = "user_has_question")
+	private Integer hasQuestion;
+
+
+	/**
+	 * 手机认证状态
+	 */
+	@Column(name = "user_telstatus")
+	private Integer mobileValidCode;
+
+	/**
+	 * 邮箱认证状态
+	 */
+	@Column(name = "user_emlstatus")
+	private Integer emailValidCode;
+
 	public Long getLastLoginTime() {
 		return lastLoginTime;
 	}
@@ -487,6 +507,30 @@ public class User implements Serializable {
 		return idRemarks;
 	}
 
+	public Integer getHasQuestion() {
+		return hasQuestion;
+	}
+
+	public void setHasQuestion(Integer hasQuestion) {
+		this.hasQuestion = hasQuestion;
+	}
+
+	public Integer getMobileValidCode() {
+		return mobileValidCode;
+	}
+
+	public void setMobileValidCode(Integer mobileValidCode) {
+		this.mobileValidCode = mobileValidCode;
+	}
+
+	public Integer getEmailValidCode() {
+		return emailValidCode;
+	}
+
+	public void setEmailValidCode(Integer emailValidCode) {
+		this.emailValidCode = emailValidCode;
+	}
+
 	public void setIdRemarks(String idRemarks) {
 		this.idRemarks = idRemarks;
 	}

+ 24 - 1
src/main/java/com/uas/platform/b2c/common/account/model/UserInfo.java

@@ -38,6 +38,7 @@ public class UserInfo {
 			for (Enterprise enterprise : user.getEnterprises()) {
 				SimpleEnterpriseInfo simpleEnterpriseInfo= new SimpleEnterpriseInfo();
 				simpleEnterpriseInfo.setEnName(enterprise.getEnName());
+				simpleEnterpriseInfo.setEnValidCode(enterprise.getEnValidCode());
 				simpleEnterpriseInfo.setUu(enterprise.getUu());
 				simpleEnterpriseInfo.setIsVendor(enterprise.getEnMallVendorStatus());
 				simpleEnterpriseInfo.setEnBussinessCode(enterprise.getEnBussinessCode());
@@ -71,11 +72,13 @@ public class UserInfo {
 		this.haveUserQuestion = haveUserQuestion;
 		this.lastLoginTime = user.getLastLoginTime();
 		this.secLevel = countSecLevel();
+		this.emailValidCode = user.getEmailValidCode();
+
 	}
 
 	private Short countSecLevel(){
 		Short count = 0;
-		if(getIdEnable()!=null && getIdEnable()==1){
+		if(getIdEnable()!=null && getIdEnable()==2){
 			count++;
 		}
 		if(isPwdEnable()){
@@ -136,6 +139,16 @@ public class UserInfo {
 
 	private Set<UserLoginTime> userLoginTimeSet;
 
+	public Integer getEmailValidCode() {
+		return emailValidCode;
+	}
+
+	public void setEmailValidCode(Integer emailValidCode) {
+		this.emailValidCode = emailValidCode;
+	}
+
+	private  Integer emailValidCode;
+
 	public Long getLastLoginTime() {
 		return lastLoginTime;
 	}
@@ -216,6 +229,7 @@ public class UserInfo {
 		this.userTel = userTel;
 	}
 
+
 	public String getUserSex() {
 		return userSex;
 	}
@@ -270,6 +284,7 @@ class SimpleEnterpriseInfo{
 	String enBussinessCode;
 	Long lastLoginTime;
 	Long enAdminuu;
+	Short enValidCode;
 
 	public SimpleEnterpriseInfo(){
 		this.setLastLoginTime(0L);
@@ -338,4 +353,12 @@ class SimpleEnterpriseInfo{
 	public void setEnAdminuu(Long enAdminuu) {
 		this.enAdminuu = enAdminuu;
 	}
+
+	public Short getEnValidCode() {
+		return enValidCode;
+	}
+
+	public void setEnValidCode(Short enValidCode) {
+		this.enValidCode = enValidCode;
+	}
 }

+ 5 - 0
src/main/java/com/uas/platform/b2c/common/account/service/EnterpriseService.java

@@ -33,6 +33,9 @@ public interface EnterpriseService {
 	 * @return
 	 */
 	public Enterprise save(Enterprise enterprise);
+
+
+
 	/**
 	 * 根据注册地址确定币别
 	 * @return
@@ -69,4 +72,6 @@ public interface EnterpriseService {
 	 * @return 企业
 	 */
 	Enterprise openVendor(Long enUU , boolean isRead , boolean isOpen);
+
+
 }

+ 74 - 40
src/main/java/com/uas/platform/b2c/common/account/service/impl/EnterpriseServiceImpl.java

@@ -1,8 +1,7 @@
 package com.uas.platform.b2c.common.account.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.uas.account.entity.UserSpaceDetail;
-import com.uas.account.util.AccountUtils;
 import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
 import com.uas.platform.b2c.common.account.dao.UserBaseInfoDao;
 import com.uas.platform.b2c.common.account.model.Enterprise;
@@ -13,18 +12,29 @@ import com.uas.platform.b2c.common.account.service.EnterpriseService;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.logistics.dao.ReceiptDao;
 import com.uas.platform.b2c.logistics.model.Receipt;
+import com.uas.platform.b2c.prod.store.dao.StoreInDao;
+import com.uas.platform.b2c.prod.store.model.EnterpriseSimple;
+import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.b2c.trade.aftersale.model.ReturnFB2c;
 import com.uas.platform.b2c.trade.support.CodeType;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.exception.SystemException;
 import com.uas.platform.core.model.Status;
+import com.uas.sso.entity.UserSpaceDetail;
+import com.uas.sso.entity.UserSpaceView;
+import com.uas.sso.entity.UserView;
+import com.uas.sso.util.AccountUtils;
 import org.apache.commons.collections.CollectionUtils;
+import org.hibernate.loader.custom.Return;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.stereotype.Service;
+import org.springframework.ui.ModelMap;
 import org.springframework.util.StringUtils;
 
 import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 
 @Service
 public class EnterpriseServiceImpl implements EnterpriseService{
@@ -37,11 +47,13 @@ public class EnterpriseServiceImpl implements EnterpriseService{
 
 	@Autowired
 	private UserBaseInfoDao userBaseInfoDao;
+	@Autowired
+	private StoreInDao storeInDao;
+
 
-	
 	@Override
 	public Enterprise getEnterpriseInfo(Long uu) {
-		
+
 		return enterpriseDao.findByUu(uu);
 	}
 
@@ -110,6 +122,13 @@ public class EnterpriseServiceImpl implements EnterpriseService{
 	@Override
 	public Enterprise save(Enterprise enterprise) {
 		Enterprise existEnterprise = enterpriseDao.findOne(enterprise.getUu());
+		//更新店铺中的企业信息
+		List<StoreIn> storeIns = storeInDao.findByEnUU(enterprise.getUu());
+		for (StoreIn storeIn : storeIns) {
+            EnterpriseSimple enterpriseSimple = EnterpriseSimple.translateSimple(enterprise);
+			storeIn.setEnterprise(enterpriseSimple);
+			storeInDao.save(storeIn);
+		}
 		if (existEnterprise == null)
 			throw new IllegalArgumentException();
 		try {
@@ -121,67 +140,82 @@ public class EnterpriseServiceImpl implements EnterpriseService{
 		return enterpriseDao.save(enterprise);
 	}
 
+
+
 	private void postToAccountCenter(Enterprise enterprise) throws Exception {
-		UserSpaceDetail detail = new UserSpaceDetail();
+	/*	UserSpaceDetail detail = new UserSpaceDetail();
 		detail.setAddress(enterprise.getEnAddress());
-		/*detail.setArea(enterprise.getEnArea());
+		*//*detail.setArea(enterprise.getEnArea());
 		detail.setCorporation(enterprise.getEnCorporation());
 		detail.setFax(enterprise.getEnFax());
-		detail.setIndustry(enterprise.getEnIndustry());*/
+		detail.setIndustry(enterprise.getEnIndustry());*//*
 		detail.setName(enterprise.getEnName());
 		detail.setShortName(enterprise.getEnShortname());
-		/*enterprise.setEnType(detail.getType());
-		detail.setType(enterprise.getEnType());*/
+		*//*enterprise.setEnType(detail.getType());
+		detail.setType(enterprise.getEnType());*//*
 		detail.setUrl(enterprise.getEnUrl());
 		detail.setBusinessCode(enterprise.getEnBussinessCode());
 		UserBaseInfo user = userBaseInfoDao.findUserByUserUU(enterprise.getEnAdminuu());
 		detail.setAdminName(user.getUserName());
 		detail.setAdminEmail(user.getUserEmail());
 		detail.setAdminTel(user.getUserTel());
-		AccountUtils.saveUserSpace(enterprise.getUu(), detail);
+		AccountUtils.saveUserSpace(enterprise.getUu(), detail);*/
 	}
 
 	@Override
-	public ResultMap registerEnterprise(FormEnterprise enterprise, String filePath,  User user) {
-		UserSpaceDetail detail = new UserSpaceDetail();
-		detail.setName(enterprise.getName());
-		detail.setShortName(null);
+	public ResultMap registerEnterprise(FormEnterprise enterprise, String filePath, User user) {
+		//封装注册时的个人账户信息;
+		if (user == null) {
+			throw new RuntimeException("登录异常:用户不存在!");
+		}
+		UserSpaceView detail = new UserSpaceView();
+		UserView userView = new UserView();
+		userView.setUserUU(user.getUserUU());
+		userView.setVipName(user.getUserName());
+		userView.setSex(user.getUserSex());
+		userView.setPassword(user.getUserPwd());
+		userView.setMobile(user.getUserTel());
+		userView.setEmail(user.getUserEmail());
+		userView.setIdCard(user.getUserIdcode());
+		Long imid = user.getUserIMId();
+		if (imid != null) {
+			userView.setImId(imid.toString());
+		}
+		//封装注册企业信息;
+		detail.setSpaceName(enterprise.getName());
+		detail.setCorporation(enterprise.getLawPerson());
+		detail.setAdmin(userView);
+		detail.setAdminUU(userView.getUserUU());
 		detail.setBusinessCode(enterprise.getLicenceId());
 		detail.setBusinessCodeImage(enterprise.getUrl());
-		if (null == detail.getName()|| null==detail.getBusinessCode() || null==detail.getBusinessCodeImage()){
+		detail.setRegAddress(enterprise.getAddress());
+		detail.setLogoImage(enterprise.getLogoUrl());
+		detail.setTelephone(user.getUserTel());
+		detail.setProfession(enterprise.getProfession());
+		if (null == detail.getSpaceName() || null == detail.getBusinessCode() || null == detail.getRegAddress()) {
 			return new ResultMap(CodeType.SYSTEM_NOT_EXIST, "参数不能为空");
 		}
-		detail.setArea("中国大陆");
-		detail.setCorporation(enterprise.getLawPerson());
-		detail.setAddress(enterprise.getAddress());
-		detail.setUrl(enterprise.getWebsite());
-		detail.setContactMan(enterprise.getLinkman());
-		detail.setContactTel(enterprise.getPhone());
-		detail.setContactEmail(enterprise.getEmail());
-		detail.setFax(enterprise.getFax());
-        detail.setLogoImage(enterprise.getLogoUrl());
-		detail.setProfession(enterprise.getProfession());
-		if (null != enterprise.getTagsData() || enterprise.getTagsData().length>0){
+		if (null != enterprise.getTagsData() && enterprise.getTagsData().length > 0) {
 			String str = Arrays.toString(enterprise.getTagsData());
-			str = str.substring(1, str.length()-1);
+			str = str.substring(1, str.length() - 1);
 			detail.setTags(str);
 		} else {
 			detail.setTags(null);
 		}
-		detail.setAdminName(user.getUserName());
-		detail.setAdminEmail(user.getUserEmail());
-		detail.setAdminTel(user.getUserTel());
-		String result = null;
+
 		try {
-			result = AccountUtils.applyAppForMall(detail);
-		}catch (Exception e){
-			return new ResultMap(CodeType.SYSTEM_ERROR, "账户中心异常,注册失败");
-		}
-		if (result.contains("errMsg") || !result.contains("enuu")){
-			return new ResultMap(CodeType.SYSTEM_ERROR, "注册失败");
+			JSONObject data = JSON.parseObject(JSON.toJSONString(detail));
+			String userSpa = data.toJSONString();
+			// 调用账户中心的接口注册企业
+			detail = AccountUtils.register(detail, userView);
+		} catch (Exception e) {
+			return new ResultMap(CodeType.SYSTEM_ERROR, e.getMessage());
 		}
 
-		return ResultMap.success(JSONObject.parseObject(result));
+		// 将新注册的企业UU号返回
+		Map<String, Object> result = new HashMap<String, Object>();
+		result.put("enuu", detail.getSpaceUU());
+		return ResultMap.success(result);
 	}
 
 	@Override

+ 0 - 2
src/main/java/com/uas/platform/b2c/common/account/service/impl/SecQuestionServiceImpl.java

@@ -1,7 +1,5 @@
 package com.uas.platform.b2c.common.account.service.impl;
 
-import com.uas.account.entity.UserDetail;
-import com.uas.account.util.AccountUtils;
 import com.uas.platform.b2c.common.account.dao.SecQuestionDao;
 import com.uas.platform.b2c.common.account.model.SecQuestion;
 import com.uas.platform.b2c.common.account.model.User;

+ 4 - 3
src/main/java/com/uas/platform/b2c/common/account/service/impl/UserQuestionServiceImpl.java

@@ -1,6 +1,5 @@
 package com.uas.platform.b2c.common.account.service.impl;
 
-import com.uas.account.util.AccountUtils;
 import com.uas.platform.b2c.common.account.dao.UserDao;
 import com.uas.platform.b2c.common.account.dao.UserQuestionDao;
 import com.uas.platform.b2c.common.account.model.User;
@@ -8,6 +7,8 @@ import com.uas.platform.b2c.common.account.model.UserQuestion;
 import com.uas.platform.b2c.common.account.service.UserQuestionService;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import java.util.List;
+
+import com.uas.sso.util.AccountUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -36,7 +37,7 @@ public class UserQuestionServiceImpl implements UserQuestionService {
     }
 
     private void postToAccountCenter(UserQuestion question) {
-        com.uas.account.entity.UserQuestion accountUserQuestion = new com.uas.account.entity.UserQuestion();
+        /*com.uas.account.entity.UserQuestion accountUserQuestion = new com.uas.account.entity.UserQuestion();
         accountUserQuestion.setAnswer(question.getAnswer());
         accountUserQuestion.setQuestion(question.getQuestion());
         accountUserQuestion.setId(question.getId());
@@ -46,6 +47,6 @@ public class UserQuestionServiceImpl implements UserQuestionService {
             AccountUtils.saveUserQuestion(accountUserQuestion);
         } catch (Exception e) {
             e.printStackTrace();
-        }
+        }*/
     }
 }

+ 41 - 56
src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java

@@ -1,7 +1,5 @@
 package com.uas.platform.b2c.common.account.service.impl;
 
-import com.uas.account.entity.UserDetail;
-import com.uas.account.util.AccountUtils;
 import com.uas.message.mail.service.MailService;
 import com.uas.platform.b2c.common.account.dao.UserCacheEnterpriseDao;
 import com.uas.platform.b2c.common.account.dao.UserDao;
@@ -31,6 +29,8 @@ import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 import javax.servlet.http.HttpServletRequest;
+
+import com.uas.sso.util.AccountUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.jpa.domain.Specification;
@@ -301,29 +301,30 @@ public class UserServiceImpl implements UserService {
 
 	@Override
 	public User updatePassword(User user, String password, String newPassword) {
-		boolean result = user.getUserPwd().equals(Md5Utils.encode(password, user.getUserUU()));
-		if (result) {
-			User user1 = userDao.findOne(user.getUserUU());
-			user1.setUserPwd(Md5Utils.encode(newPassword, user1.getUserUU()));
-			user1.setPwdSecLevel(user.getPwdSecLevel());
-			if (user1.getEnterprise() == null)
-				user1.setCurrentEnterprise();// 随便绑定一个用户所属企业
-			Enterprise enterprise = user1.getEnterprise();
-			try {
-					//判断是否为个人账户
-					if (enterprise == null){
-							AccountUtils.resetPassword(user1.getUserUU(), null, newPassword);
-					}else {
-							AccountUtils.resetPassword(user1.getUserUU(), enterprise.getUu(), newPassword);
-					}
-				user1 = userDao.save(user1);
-			} catch (Exception e) {
-				throw new SystemException(e.getMessage());
-			}
-			return user1;
-		} else {
-			throw new IllegalOperatorException("原密码验证错误");
-		}
+//		boolean result = user.getUserPwd().equals(Md5Utils.encode(password, user.getUserUU()));
+//		if (result) {
+//			User user1 = userDao.findOne(user.getUserUU());
+//			user1.setUserPwd(Md5Utils.encode(newPassword, user1.getUserUU()));
+//			user1.setPwdSecLevel(user.getPwdSecLevel());
+//			if (user1.getEnterprise() == null)
+//				user1.setCurrentEnterprise();// 随便绑定一个用户所属企业
+//			Enterprise enterprise = user1.getEnterprise();
+//			try {
+//					//判断是否为个人账户
+//					if (enterprise == null){
+//							//AccountUtils.resetPassword(user1.getUserUU(), null, newPassword);
+//					}else {
+//							//AccountUtils.resetPassword(user1.getUserUU(), enterprise.getUu(), newPassword);
+//					}
+//				user1 = userDao.save(user1);
+//			} catch (Exception e) {
+//				throw new SystemException(e.getMessage());
+//			}
+//			return user1;
+//		} else {
+//			throw new IllegalOperatorException("原密码验证错误");
+//		}
+		return null;
 	}
 
 
@@ -370,52 +371,36 @@ public class UserServiceImpl implements UserService {
 		return user;
 	}
 
+	//添加未注册
 	public void postToAccountCenter(User user, String password) throws Exception {
-		UserDetail detail = new UserDetail();
+		/*UserDetail detail = new UserDetail();
 		detail.setEmail(user.getUserEmail());
 		detail.setIdCode(user.getUserIdcode());
 		detail.setMobile(user.getUserTel());
 		detail.setName(user.getUserName());
 		detail.setSex(user.getUserSex());
 		AccountUtils.addUser(user.getUserUU(), SystemSession.getUser().getEnterprise().getUu(), detail, password);
+		//.uas.sso.util.AccountUtils.addUser();*/
 	}
 	public void postToAccountCenter(User user) throws Exception {
-		UserDetail detail = new UserDetail();
-		detail.setEmail(user.getUserEmail());
-		detail.setIdCode(user.getUserIdcode());
-		detail.setMobile(user.getUserTel());
-		detail.setName(user.getUserName());
-		detail.setSex(user.getUserSex());
 		//判断是否个人用户
 		if(SystemSession.getUser().getEnterprise()==null){
-			AccountUtils.saveUser(user.getUserUU(), null, detail);
+			throw new RuntimeException("个人账户不能新增企业用户");
 		}else{
-			AccountUtils.saveUser(user.getUserUU(), SystemSession.getUser().getEnterprise().getUu(), detail);
+			AccountUtils.addUser(user.getUserUU(),SystemSession.getUser().getEnterprise().getUu());
 		}
 	}
 	@Override
 	public void removeUser(Long uu) {
 		User user = userDao.findOne(uu);
-		com.uas.account.entity.User userInfo = new com.uas.account.entity.User();
-		userInfo.setAppId("b2b");
-		userInfo.setName(user.getUserName());
-		userInfo.setSalt(String.valueOf(uu));
-		userInfo.setSpaceUID(SystemSession.getUser().getEnterprise().getEnBussinessCode());
-		userInfo.setUid(user.getUserTel());
-		userInfo.setSecondUID(user.getUserEmail());
-		userInfo.setDialectUID(String.valueOf(uu));
 		if (user.getEnterprises().contains(SystemSession.getUser().getEnterprise())) {
-			user.removeEnterprise(SystemSession.getUser().getEnterprise());
-			if (user.getEnterprises().size() == 0)
-				user.setEnable((short) Status.DISABLED.value());
-			userDao.save(user);
-			if (user.getEnterprises().size() == 0) {
-				//userDao.delete(user);
-			}
+//			user.removeEnterprise(SystemSession.getUser().getEnterprise());
+//			if (user.getEnterprises().size() == 0)
+//				user.setEnable((short) Status.DISABLED.value());
+//			userDao.save(user);
 			try {
-				AccountUtils.unbindUser(userInfo);// 同步数据到账户中心
+				com.uas.sso.util.AccountUtils.removeUser(uu,SystemSession.getUser().getEnterprise().getUu());
 			} catch (Exception e) {
-				// 尝试删除,存在关联的单据则不删
 			}
 		} else {
 			throw new IllegalArgumentException();
@@ -440,7 +425,7 @@ public class UserServiceImpl implements UserService {
 
 	@Override
 	public void deleteUserCacheEnterprise(User user) {
-		userCacheEnterpriseDao.delete(userCacheEnterpriseDao.findOne(user.getUserUU()));
+		userCacheEnterpriseDao.delete(user.getUserUU());
         userCacheEnterpriseDao.flush();
 	}
 	@Override
@@ -492,7 +477,7 @@ public class UserServiceImpl implements UserService {
 
 	@Override
 	public User updateUserTel(String oldTel, String newTel,Long uu) {
-		// 旧手机号是否正确
+		/*// 旧手机号是否正确
 		User user = userDao.findOne(uu);
 			if(!user.getUserTel().equals(oldTel)){
 				throw new IllegalOperatorException("旧手机号错误");
@@ -509,13 +494,13 @@ public class UserServiceImpl implements UserService {
 				}
 			} catch (Exception e) {
 				e.printStackTrace();
-			}
+			}*/
 			return null;
 		}
 
 	@Override
 	public User updateUserEmail(String tel, String newEmail, Long uu) {
-
+/*
 		try {
 			if(!StringUtils.isEmpty(tel) && !StringUtils.isEmpty(newEmail)) {
 				User user = userDao.findOne(uu);
@@ -530,7 +515,7 @@ public class UserServiceImpl implements UserService {
 			}
 		} catch (Exception e) {
 			e.printStackTrace();
-		}
+		}*/
 		throw new IllegalOperatorException("数据更新失败...");
 	}
 }

+ 54 - 0
src/main/java/com/uas/platform/b2c/common/account/support/LocalSSOHelp.java

@@ -0,0 +1,54 @@
+package com.uas.platform.b2c.common.account.support;
+
+import com.alibaba.fastjson.JSON;
+import com.uas.sso.*;
+import com.uas.sso.common.CookieHelper;
+import com.uas.sso.common.SSOProperties;
+import com.uas.sso.common.util.HttpUtil;
+import com.uas.sso.common.util.RandomUtil;
+import com.uas.sso.service.SSOService;
+import com.uas.sso.service.SSOServiceSupport;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Map;
+@Service
+public class LocalSSOHelp extends SSOServiceSupport  {
+    protected SSOProperties properties = null;
+    private String realNameAuthUrl = "";
+
+    public LocalSSOHelp() {
+    }
+
+    /**
+     * 获取realNameAuthority
+     * @param request
+     * @param retUrl
+     * @return
+     * @throws IOException
+     */
+    public String getRealNameAuthUrl(HttpServletRequest request, String retUrl) throws IOException {
+        String url = getRealNameAuthUrl();
+        if ("".equals(url)) {
+            return null;
+        } else {
+            retUrl = URLEncoder.encode(retUrl, SSOHelper.getSSOService().getConfig().getEncoding());
+            Map<String, String> data = new HashMap();
+            data.put("appId", SSOConfig.getInstance().getAppName());
+            return HttpUtil.encodeRetURL(url, "returnURL", retUrl, data);
+        }
+    }
+
+
+    public String getRealNameAuthUrl() {
+        properties = SSOHelper.getSSOService().getConfig().getProperties();
+        return   properties == null ? this.realNameAuthUrl : this.properties.get(
+                "sso.realNameAuth.url", this.realNameAuthUrl);
+    }
+
+
+}

+ 10 - 8
src/main/java/com/uas/platform/b2c/common/account/v2/controller/EnterpriseController.java

@@ -1,9 +1,11 @@
 package com.uas.platform.b2c.common.account.v2.controller;
 
-import com.uas.account.entity.UserSpace;
-import com.uas.account.entity.UserSpaceDetail;
 import com.uas.platform.b2c.common.account.model.ChangeAdminDetail;
 import com.uas.platform.b2c.common.account.v2.service.EnterpriseService;
+import com.uas.platform.b2c.common.account.v2.service.UserService;
+import com.uas.platform.b2c.fa.payment.utils.StringUtils;
+import com.uas.sso.entity.UserSpaceView;
+import com.uas.sso.entity.UserView;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -17,17 +19,17 @@ public class EnterpriseController {
 	@Autowired
 	private EnterpriseService enterpriseService;
 
+
     /**
      * 企业信息更新
-     *
-     * @param userSpace
-     * @param userSpaceDetail
+     * @param userSpaceView
      */
 	@RequestMapping(method = RequestMethod.POST)
 	@ResponseBody
-	public void update(UserSpace userSpace, UserSpaceDetail userSpaceDetail) {
-		if (null != userSpace && null != userSpaceDetail) {
-			 enterpriseService.update(userSpace, userSpaceDetail);
+	public void update(UserSpaceView userSpaceView, UserView userView) {
+		if (null != userSpaceView) {
+			userSpaceView.setAdmin(userView);
+			enterpriseService.update(userSpaceView);
 		}
 	}
 

+ 15 - 11
src/main/java/com/uas/platform/b2c/common/account/v2/controller/UserController.java

@@ -1,7 +1,7 @@
 package com.uas.platform.b2c.common.account.v2.controller;
-
-import com.uas.account.entity.User;
 import com.uas.platform.b2c.common.account.v2.service.UserService;
+import com.uas.platform.b2c.fa.payment.utils.StringUtils;
+import com.uas.sso.entity.UserView;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -16,29 +16,33 @@ public class UserController {
 	private UserService userService;
 
     /**
-     * b2b修改用户信息
+     * 账户中心保存用户信息接口
      *
      * @param user
      */
 	@RequestMapping(method = RequestMethod.POST)
 	@ResponseBody
-	public void save(User user) {
+	public void save(UserView user) {
 		if (user != null) {
-			 userService.save(user);
+			userService.save(user);
 		}
 	}
 
     /**
-     * 删除用户
+     * 账户中心用户 绑定/解绑
      *
      * @param
      */
-	@RequestMapping(value = "/removeUser", method = RequestMethod.POST)
+	@RequestMapping(value = "/bindUser", method = RequestMethod.POST)
     @ResponseBody
-    public void removeUser(User user) {
-		Long uu = Long.valueOf(user.getDialectUID());
-		Long enuu = Long.valueOf(user.getSpaceDialectUID());
-        userService.delete(uu, enuu);
+    public void bindUser(Long userUU, Long spaceUU, String type) {
+		Integer integerType = null;//1为绑定,0为解绑
+		if (!StringUtils.isEmpty(type) && type.equals("bind")) {
+			integerType = 1;
+		} else {
+			integerType = 0;
+		}
+		userService.bindOrUnbind(userUU, spaceUU, integerType);
     }
 
 }

+ 9 - 0
src/main/java/com/uas/platform/b2c/common/account/v2/service/EnterpriseService.java

@@ -3,9 +3,18 @@ package com.uas.platform.b2c.common.account.v2.service;
 import com.uas.account.entity.UserSpace;
 import com.uas.account.entity.UserSpaceDetail;
 import com.uas.platform.b2c.common.account.model.ChangeAdminDetail;
+import com.uas.sso.entity.UserSpaceView;
 
 public interface EnterpriseService {
 
+    /**
+     * 更新企业信息
+     *
+     * @param userSpaceView
+     */
+    void update(UserSpaceView userSpaceView);
+
+
     /**
      * 更新企业信息
      *

+ 7 - 3
src/main/java/com/uas/platform/b2c/common/account/v2/service/UserService.java

@@ -1,7 +1,8 @@
 package com.uas.platform.b2c.common.account.v2.service;
 
+import com.uas.platform.b2c.common.account.model.User;
+import com.uas.sso.entity.UserView;
 
-import com.uas.account.entity.User;
 
 public interface UserService {
 
@@ -10,12 +11,15 @@ public interface UserService {
      *
      * @param user
      */
-	void save(User user);
+    void save(UserView user);
 
     /**
      * 删除用户
      *
      * @param uu
      */
-    void delete(Long uu, Long enuu);
+    void bindOrUnbind(Long uu, Long enuu, Integer type);
+
+
+
 }

+ 62 - 0
src/main/java/com/uas/platform/b2c/common/account/v2/service/impl/EnterpriseServiceImpl.java

@@ -10,6 +10,7 @@ import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.account.v2.service.EnterpriseService;
 import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
 import com.uas.platform.core.logging.BufferedLoggerManager;
+import com.uas.sso.entity.UserSpaceView;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -33,6 +34,64 @@ public class EnterpriseServiceImpl implements EnterpriseService {
 
     private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
 
+    @Override
+    public void update(UserSpaceView userSpaceView) {
+      /*  List<User> admins = userDao.findUserByUserUU(userSpaceView.getAdminUU());
+        if (admins.size() != 1) {
+            logger.log("更新企业信息出错,管理员有且仅有一个", "当前管理员数量:" + admins.size());
+            return;
+        }*/
+        if (null == userSpaceView.getSpaceUU() && "".equals(userSpaceView.getSpaceUU())){
+            logger.log("更新企业信息出错,uu为空", "值为null", null,0L);
+            return;
+        }
+        Enterprise enterprise;
+        Enterprise oldenterprise;
+        enterprise = enterpriseDao.findByUu(Long.valueOf(userSpaceView.getSpaceUU()));
+        oldenterprise = enterprise;
+        if (enterprise == null || enterprise.getUu() == null) {
+            enterprise = new Enterprise();
+        }
+        enterprise.setEnAddress(userSpaceView.getRegAddress());
+        //enterprise.setEnArea(userSpaceView.get());
+        enterprise.setEnCorporation(userSpaceView.getCorporation());
+        enterprise.setEnBussinessCode(userSpaceView.getBusinessCode());
+       // enterprise.setEnFax(userSpaceView.);
+        enterprise.setEnTel(userSpaceView.getTelephone());
+        //enterprise.setEnEmail(userSpaceView.get());
+        //enterprise.setEnIndustry(userSpaceView.());
+        enterprise.setEnName(userSpaceView.getSpaceName());
+        enterprise.setEnLogoUrl(userSpaceView.getBusinessCodeImage());
+        enterprise.setUu(Long.valueOf(userSpaceView.getSpaceUU()));
+        //Long userUU = admins.get(0).getUserUU();
+        enterprise.setEnAdminuu(userSpaceView.getAdminUU());
+        enterprise.setEnValidCode(userSpaceView.getValidCode());
+        Enterprise newEn = enterpriseDao.save(enterprise);
+
+        User adminUser = null;
+        if (null == userSpaceView.getAdminUU()) {
+            adminUser = userDao.findOne(newEn.getEnAdminuu());
+        } else {
+            List<User> users = userDao.findUserByUserTel(userSpaceView.getTelephone());
+            if (CollectionUtils.isNotEmpty(users)) {
+                adminUser = users.get(0);
+            }
+        }
+
+        // 保存新注册企业与用户的关联关系
+        if (adminUser != null) {
+            adminUser.addEnterprise(newEn);
+            userDao.save(adminUser);
+        }
+
+        if(oldenterprise != null && oldenterprise.getUu() != null) {
+            logger.log("更新企业信息", enterprise.getUu()+"time: " + sdf.format(new Date()), enterprise.getUu(), 0L);
+        } else {
+            logger.log("新增企业信息", enterprise.getUu()+"time: " + sdf.format(new Date()), enterprise.getUu(), 0L);
+        }
+    }
+
+
     @Override
     public void update(UserSpace userSpace, UserSpaceDetail userSpaceDetail) {
         Enterprise enterprise = new Enterprise();
@@ -92,4 +151,7 @@ public class EnterpriseServiceImpl implements EnterpriseService {
             }
         }
     }
+
+
+
 }

+ 103 - 78
src/main/java/com/uas/platform/b2c/common/account/v2/service/impl/UserServiceImpl.java

@@ -1,20 +1,21 @@
+
 package com.uas.platform.b2c.common.account.v2.service.impl;
 
-import com.uas.account.entity.User;
 import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
 import com.uas.platform.b2c.common.account.dao.UserDao;
 import com.uas.platform.b2c.common.account.model.Enterprise;
+import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.account.v2.service.UserService;
+import com.uas.platform.b2c.core.constant.IntegerConstant;
 import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
 import com.uas.platform.core.logging.BufferedLoggerManager;
-import com.uas.platform.core.model.Status;
+import com.uas.sso.entity.UserView;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.List;
 
 
 @Service("v2.UserService")
@@ -31,8 +32,13 @@ public class UserServiceImpl implements UserService {
     private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
 
     @Override
-    public void save(User user) {
-        com.uas.platform.b2c.common.account.model.User u = null;
+    public void save(UserView user) {
+        User oldUser = userDao.findOne(user.getUserUU());
+        if (null == oldUser) {
+            oldUser = new User();
+        }
+        oneSave(user, oldUser);
+       /* com.uas.platform.b2c.common.account.model.User u = null;
         if (!StringUtils.isEmpty(user.getDialectUID())) {
             u = userDao.findOne(Long.parseLong(user.getDialectUID()));
         }
@@ -49,92 +55,88 @@ public class UserServiceImpl implements UserService {
         if (null == u) {
             u = new com.uas.platform.b2c.common.account.model.User();
         }
-        oneSave(user,u);
-//        if (null == user.getDialectUID() || "".equals(user.getDialectUID())){
-//            List<com.uas.platform.b2c.common.account.model.User> users = userDao.findUserByUserTel(user.getUid());
-//            if (!CollectionUtils.isEmpty(users)){
-//                for (com.uas.platform.b2c.common.account.model.User u:users){
-//                    oneSave(user,u);
-//                }
-//            }
-//        }else {
-//            com.uas.platform.b2c.common.account.model.User u = userDao.findOne(Long.parseLong(user.getDialectUID()));
-//            if (null == u) {
-//                u = new com.uas.platform.b2c.common.account.model.User();
-//                oneSave(user,u);
-//            }
-//        }
-
+        oneSave(user,u);*/
     }
-    private void oneSave(User user , com.uas.platform.b2c.common.account.model.User u) {
-        if (user.getPassword() != null) {
-            u.setUserPwd(user.getPassword());
-        }
-        if (user.getName() != null) {
-            u.setUserName(user.getName());
-        }
-        if (user.getUid() != null) {
-            u.setUserTel(user.getUid());
-        }
-        u.setEnable((short) 1);
-        if (user.getSecondUID() != null) {
-            u.setUserEmail(user.getSecondUID());
-        }
-        if (!StringUtils.isEmpty(user.getDialectUID())) {
-            u.setUserUU(Long.valueOf(user.getDialectUID()));
+
+    private void oneSave(UserView user, com.uas.platform.b2c.common.account.model.User u) {
+        Long userUU = user.getUserUU();
+        if (userUU != null) {
+            u.setUserUU(userUU);
+        }
+        //是否有密保
+        Boolean hasQuestion = user.getHasQuestion();
+        if (hasQuestion != null) {
+            if (hasQuestion) {
+                u.setHasQuestion(1);
+            } else {
+                u.setHasQuestion(0);
+            }
         }
-        if (user.getPwdSecLevel() != null) {
-            u.setPwdSecLevel(user.getPwdSecLevel());
+
+        //设置密码强度;
+        Integer passwordLevel = user.getPasswordLevel();
+        if (passwordLevel != null) {
+            u.setPwdSecLevel(passwordLevel.shortValue());
+        }
+        //安全强度;
+        String name = user.getVipName();
+        if (!StringUtils.isEmpty(name)) {
+            u.setUserName(name);
+        }
+        String sex = user.getSex();
+        if (!StringUtils.isEmpty(sex)) {
+            u.setUserSex(sex);
+        }
+        String password = user.getPassword();
+        if (!StringUtils.isEmpty(password)) {
+            u.setUserPwd(password);
+        }
+        String mobile = user.getMobile();
+        if (!StringUtils.isEmpty(mobile)) {
+            u.setUserTel(mobile);
+        }
+       /* String mobileArea = user.getMobileArea();
+        Short mobileValidCode = user.getMobileValidCode();*/
+        String email = user.getEmail();
+        if (!StringUtils.isEmpty(email)) {
+            u.setUserEmail(email);
+        }
+        Short emailValidCode = user.getEmailValidCode();
+        if (emailValidCode != null) {
+            u.setEmailValidCode((int) emailValidCode);
+
         }
-        if (user.getLastLoginTime() != null) {
-            u.setLastLoginTime(user.getLastLoginTime());
+        String idCard = user.getIdCard();
+        if (!StringUtils.isEmpty(idCard)) {
+            u.setUserIdcode(idCard);
         }
-        Enterprise enterprise = null;
-        if (user.getSpaceDialectUID() != null){
-            enterprise = enterpriseDao.findByUu(Long.valueOf(user.getSpaceDialectUID()));
+        Short identityValidCode = user.getIdentityValidCode();
+        if (identityValidCode != null) {
+            u.setIdEnable(identityValidCode);
         }
-        if (null != enterprise) {
-            u.setEnterprise(enterprise);
-            if (null == enterprise.getEnAdminuu()) {
-                enterprise.setEnAdminuu(u.getUserUU());
-                enterpriseDao.save(enterprise);
-                logger.log("设置管理员", enterprise.getEnName() + ":" + enterprise.getUu() + ";" + u.getUserName() + ":" + u.getUserUU());
-            }
+        String imId = user.getImId();
+        if (!StringUtils.isEmpty(imId)) {
+            u.setUserIMId(Long.parseLong(imId.trim()));
         }
-        boolean isMember = false;
-        //将该成员添加至企业
-        Set<Enterprise> ens = u.getEnterprises();
-        if (!CollectionUtils.isEmpty(ens)){
-            Iterator<Enterprise> it = ens.iterator();
-            while (it.hasNext()) {
-                if (it.next().getUu().equals(enterprise.getUu())) {
-                    isMember = true;
-                }
-            }
-        }
-        if (!isMember) {
-            Set<Enterprise> enterprises = null;
-            if (null == u.getEnterprises()) {
-                enterprises = new HashSet<Enterprise>();
-            } else {
-                enterprises = u.getEnterprises();
-            }
-            if (null != enterprise) {
-                u.setEnterprise(enterprise);
-                enterprises.add(enterprise);
-            }
-            u.setEnterprises(enterprises);
+        Short lock = user.getLock();
+        if (lock != null && lock == 0) {
+            u.setEnable((short) 1);
         }
         List<com.uas.platform.b2c.common.account.model.User> oldUsers = userDao.findUserByUserUU(u.getUserUU());
         userDao.save(u);
         if (oldUsers.size() > 0) {
-            logger.log("更新用户信息", user.getDialectUID() + "" + (enterprise==null?"":enterprise.getUu()));
+            logger.log("更新用户信息", user.getMobile());
         } else {
-            logger.log("新增用户信息", user.getDialectUID() + ", " + (enterprise==null?"":enterprise.getUu()) );
+            logger.log("新增用户信息", user.getMobile());
         }
     }
 
-    @Override
+
+
+
+
+
+    /*@Override
     public void delete(Long uu, Long enuu) {
         com.uas.platform.b2c.common.account.model.User user = userDao.findOne(uu);
         Enterprise enterprise = enterpriseDao.findByUu(enuu);
@@ -152,5 +154,28 @@ public class UserServiceImpl implements UserService {
                 }
             }
         }
+    }*/
+
+    @Override
+    public void bindOrUnbind(Long uu, Long enuu, Integer type) {
+        User user = userDao.findOne(uu);
+        Enterprise enterprise = enterpriseDao.findByUu(enuu);
+        if (null == user) {
+            logger.log("绑定用户", uu + "用户不存在!");
+            return;
+        }
+        if (null == enterprise) {
+            logger.log("绑定用户", uu + "企业不存在!");
+            return;
+        }
+        if (null != type) {
+            if (type.equals(IntegerConstant.YES_SHORT)) { //1为绑定,0为解绑
+                user.addEnterprise(enterprise);
+                userDao.save(user);
+            } else {
+                user.removeEnterprise(enterprise);
+                userDao.save(user);
+            }
+        }
     }
 }

+ 11 - 10
src/main/java/com/uas/platform/b2c/core/filter/SSOInterceptor.java

@@ -14,6 +14,7 @@ import com.uas.sso.SSOHelper;
 import com.uas.sso.SSOToken;
 import com.uas.sso.common.SSOProperties;
 import com.uas.sso.common.util.HttpUtil;
+import com.uas.sso.entity.UserAccount;
 import com.uas.sso.web.spring.AbstractSSOInterceptor;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.log4j.Logger;
@@ -66,24 +67,24 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
     private User getUserByToken(SSOToken token) {
         User authedUser = null;
         if (token.getData() != null) {
-            com.uas.account.entity.User tokenUser = FlexJsonUtils.fromJson(token.getData(), com.uas.account.entity.User.class);
-            if (!StringUtils.isEmpty(tokenUser.getDialectUID())) {
+            UserAccount tokenUser = FlexJsonUtils.fromJson(token.getData(), UserAccount.class);
+            if (!StringUtils.isEmpty(tokenUser.getUserUU())) {
                 // dialectUID表示client系统自己的唯一标识,比如user_uu,手机号没设置的情况下使用
-                authedUser = userService.findUserByUserUU(Long.parseLong(tokenUser.getDialectUID()));
-            } else if (!StringUtils.isEmpty(tokenUser.getUid())) {
+                authedUser = userService.findUserByUserUU(tokenUser.getUserUU());
+            } else if (!StringUtils.isEmpty(tokenUser.getMobile())) {
                 // UID表示所有系统公认的唯一标识,这里统一使用手机号
-                authedUser = userService.findUserByUserTel(tokenUser.getUid());
+                authedUser = userService.findUserByUserTel(tokenUser.getMobile());
             } else {
-                logger.error(String.format("invalid user %s, please set uid or dialectUID", tokenUser.getName()));
+                logger.error(String.format("invalid user %s, please set uid or dialectUID", tokenUser.getVipName()));
             }
             if (authedUser != null && authedUser.getEnterprises() != null) {
                 // 企业资料在client系统自己的唯一标识,比如en_uu
-                if (tokenUser.getSpaceDialectUID() != null) {
-                    authedUser.setCurrentEnterprise(Long.parseLong(tokenUser.getSpaceDialectUID()));
-                } else if (tokenUser.getSpaceUID() != null) {
+                if (tokenUser.getSpaceUU() != null) {
+                    authedUser.setCurrentEnterprise(tokenUser.getSpaceUU());
+                } else if (tokenUser.getBusinessCode() != null) {
                     for (Enterprise enterprise : authedUser.getEnterprises()) {
                         // 企业资料在所有系统公认的唯一标识,这里使用商业登记证号
-                        if (tokenUser.getSpaceUID().equals(enterprise.getEnBussinessCode())) {
+                        if (tokenUser.getBusinessCode().equals(enterprise.getEnBussinessCode())) {
                             authedUser.setEnterprise(enterprise);
                             break;
                         }

+ 0 - 1
src/main/java/com/uas/platform/b2c/external/erp/prod/service/impl/ProdServiceImpl.java

@@ -160,7 +160,6 @@ public class ProdServiceImpl implements ProdService {
         return url;
     }
 
-    @Override
     public String setB2cEnable(String pr_code, Integer isEnable) {
         List<Product> productList = productDao.getProductByEnUUAndProdNum(SystemSession.getUser().getEnterprise().getUu(),pr_code);
         if (!CollectionUtils.isEmpty(productList)) {

+ 36 - 4
src/main/java/com/uas/platform/b2c/external/erp/product/service/impl/KindServiceImpl.java

@@ -17,10 +17,7 @@ import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 @Transactional
 public class KindServiceImpl implements KindService {
@@ -69,6 +66,7 @@ public class KindServiceImpl implements KindService {
         return null;
     }
 
+
     public List<Kind> getParentsByChildId(Long childId) {
         List<Kind> kinds = new ArrayList<Kind>();
         kinds = getParentsByChildId(childId, kinds);
@@ -110,4 +108,38 @@ public class KindServiceImpl implements KindService {
         }
         return kindPropertyUas;
     }
+
+    @Override
+    public Map<String, List<KindUas>> getParentsByKindCode(String kindCode) {
+        Map<Long, Kind> maps = new HashMap<>();
+        // 第一步是模糊查询所有的叶子节点
+        Map<String, List<KindUas>> kindMaps = new HashMap<>();
+        List<Kind> kinds = kindDao.findByKindCode(kindCode);
+        for (Kind kind : kinds) {
+            List<Kind> list = getParentsByChildId(kind.getId());
+            List<KindUas> kindUass = new ArrayList<>();
+            for (Kind k : list) {
+                kindUass.add(ModelConverter.convertUas(k));
+            }
+            if (kindMaps.size() > 0 && kindMaps.containsKey(list.get(0).getId())) {
+                Map<Long, KindUas> map = new HashMap<>();
+                for (KindUas k : kindUass) {
+                    map.put(k.getId(), k);
+                }
+                List<KindUas> oldList = kindMaps.get(list.get(0).getId());
+                for (KindUas k : oldList) {
+                    map.put(k.getId(), k);
+                }
+                List<KindUas> newList = new ArrayList<>();
+                for (KindUas k : map.values()) {
+                    newList.add(k);
+                }
+                kindMaps.put(list.get(0).getId().toString(), newList);
+            } else {
+                kindMaps.put(list.get(0).getId().toString(), kindUass);
+            }
+        }
+        return kindMaps;
+    }
+
 }

+ 6 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductReplaceDao.java

@@ -3,9 +3,11 @@ package com.uas.platform.b2c.prod.commodity.dao;
 import com.uas.platform.b2c.prod.commodity.model.ProductReplace;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
 
+import javax.transaction.Transactional;
 import java.util.List;
 
 public interface ProductReplaceDao extends JpaRepository<ProductReplace, Long>, JpaSpecificationExecutor<ProductReplace> {
@@ -14,4 +16,8 @@ public interface ProductReplaceDao extends JpaRepository<ProductReplace, Long>,
     List<ProductReplace> findByUserUUAndProductId(@Param("userUU") Long userUU, @Param("prid") Long prId);
 
     List<ProductReplace> findByProductIdOrderByDetno(Long productId);
+
+    @Transactional
+    @Modifying
+    void deleteByProductId(Long productId);
 }

+ 2 - 3
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -344,7 +344,7 @@ public class ProductServiceImpl implements ProductService {
                     product.setProductDetail(productDetail);
                 }
             }
-            List<ProductReplace> productReplaceList = productReplaceDao.findByUserUUAndProductId(SystemSession.getUser().getUserUU(),product.getId());
+            List<ProductReplace> productReplaceList = productReplaceDao.findByProductIdOrderByDetno(product.getId());
             product.setProductReplaceList(productReplaceList);
         }
         return new PageImpl<V_ProductPerson>(productList, page, productPage.getTotalElements());
@@ -383,8 +383,7 @@ public class ProductServiceImpl implements ProductService {
         }
         Date date = new Date();
         // 删除原有的替代料数据
-        List<ProductReplace> productReplacesOld = productReplaceDao.findByUserUUAndProductId(SystemSession.getUser().getUserUU(), productId);
-        productReplaceDao.delete(productReplacesOld);
+        productReplaceDao.deleteByProductId(productId);
         for (ProductReplace productReplace : productReplaceList) {
             if (productReplace.getUserUU() == null) {
                 productReplace.setUserUU(SystemSession.getUser().getUserUU());

+ 2 - 1
src/main/java/com/uas/platform/b2c/prod/product/component/dao/ComponentDao.java

@@ -46,8 +46,9 @@ public interface ComponentDao extends JpaSpecificationExecutor<Component>, JpaRe
 	 * @param code 原厂型号
 	 * @return 器件信息
 	 */
+	@Query("select c from Component c where c.code like %:code%")
 	@QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value = "true") })
-	public List<Component> findByCode(String code);
+	public List<Component> findByCode(@Param("code") String code);
 
 	/**
 	 * 根据原厂型号code和品牌id(brandId)查找器件

+ 2 - 1
src/main/java/com/uas/platform/b2c/prod/product/component/dao/ComponentInfoDao.java

@@ -73,7 +73,8 @@ public interface ComponentInfoDao extends JpaSpecificationExecutor<ComponentInfo
 	 * @param code 原厂型号
 	 * @return 器件简易信息
 	 */
-	public List<ComponentInfo> findByKindidAndCode(Long kindid, String code);
+	@Query("select c from ComponentInfo c where c.kindid = :kindid and c.code like %:code%")
+	public List<ComponentInfo> findByKindidAndCode(@Param("kindid") Long kindid, @Param("code") String code);
 
 	/**
 	 * 获取一页有图片的器件

+ 15 - 9
src/main/java/com/uas/platform/b2c/prod/product/kind/dao/KindDao.java

@@ -1,9 +1,6 @@
 package com.uas.platform.b2c.prod.product.kind.dao;
 
-import java.util.List;
-
-import javax.persistence.QueryHint;
-
+import com.uas.platform.b2c.prod.product.kind.model.Kind;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Query;
@@ -11,7 +8,8 @@ import org.springframework.data.jpa.repository.QueryHints;
 import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
-import com.uas.platform.b2c.prod.product.kind.model.Kind;
+import javax.persistence.QueryHint;
+import java.util.List;
 
 @Repository
 public interface KindDao extends JpaSpecificationExecutor<Kind>, JpaRepository<Kind, Long> {
@@ -56,10 +54,18 @@ public interface KindDao extends JpaSpecificationExecutor<Kind>, JpaRepository<K
 	public List<Kind> findByNameCn(String nameCn);
 
 	/**
-	* 根据批次号获取类目信息
-	* @param batchIds id批次号
-	* @return
-	*/
+	 * 根据批次号获取类目信息
+	 * @param batchIds id批次号
+	 * @return
+	 */
 	@Query(nativeQuery = true, value = "select * from product$kind where ki_id in :batchIds")
 	public List<Kind> findByBatchIds(@Param("batchIds") List<Long> batchIds);
+
+	/**
+	 * 根据类目名模糊查询对应所有的当前类目和父级类目(兄弟类目不用)
+	 * @param nameCn 类目中文名
+	 * @return
+	 */
+	@Query("select k from Kind k where k.nameCn like %:nameCn% and k.isLeaf = 1")
+	public List<Kind> findByKindCode(@Param("nameCn") String nameCn);
 }

+ 9 - 0
src/main/java/com/uas/platform/b2c/prod/store/facade/StoreApplyFacade.java

@@ -29,6 +29,15 @@ public interface StoreApplyFacade {
 	 */
 	ResultMap confirmOpenStore(String uuid, StoreApply storeApply);
 
+
+	/**
+	 * 自动确认开铺
+	 *
+	 * @param uuid			店铺申请信息编号
+	 * @param storeApply	更新的店铺信息
+	 */
+	ResultMap autoConfirmOpenStore(String uuid, StoreApply storeApply);
+
 	/**
 	 * 保存店铺申请信息
 	 *

+ 65 - 0
src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreApplyFacadeImpl.java

@@ -34,6 +34,7 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 
 	private final StoreApplyService storeApplyService;
 
+
 	@Autowired
 	public StoreApplyFacadeImpl(StoreInService storeService, StoreApplyService storeApplyService) {
 		this.storeService = storeService;
@@ -114,6 +115,10 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 		storeApply.setBrands(apply.getBrands());
 
 		storeApplyService.handlerApply(storeApply);
+		//自动确认开通店铺;
+	/*	if (StoreApply.ApplyStatus.PASS == status) {
+			this.autoConfirmOpenStore(uuid, storeApply);
+		}*/
 		return ResultMap.success(null);
 	}
 
@@ -172,6 +177,66 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 		return ResultMap.success(storeIn.getUuid());
 	}
 
+
+
+	public ResultMap autoConfirmOpenStore(String uuid, StoreApply storeApply) {
+		Date date = new Date();
+		// 验证
+		if (StringUtils.isEmpty(uuid) || storeApply == null) {
+			return new ResultMap(CodeType.NO_INFO, "开铺申请和编号信息不能为空");
+		}
+		storeApply.setBannerUrl("http://dfs.ubtob.com/group1/M00/19/BF/CgpkyFlSBRmAcascAANK5vkByag940.jpg");
+		storeApply.setLogoUrl("https://dfs.ubtob.com/group1/M00/88/4D/CgpkyFrMEHeAbmFgAAAVUSwA8go871.png");
+		if ( StringUtils.isEmpty(storeApply.getLogoUrl())
+				|| StringUtils.isEmpty(storeApply.getBannerUrl())) {
+			return new ResultMap(CodeType.NOT_COMPLETE_INFO, "LOGO或横幅广告不能为空");
+		}
+		// 更新店铺申请信息
+		StoreApply apply = storeApplyService.findByUuid(uuid);
+		if (apply == null) {
+			return new ResultMap(CodeType.NOT_EXiST, "该店铺申请信息不存在");
+		}
+		if (StringUtils.hasText(storeApply.getStoreUuid())) {
+			apply.setStoreUuid(storeApply.getStoreUuid().toLowerCase());
+		}
+		apply.setLogoUrl(storeApply.getLogoUrl());
+		apply.setBannerUrl(storeApply.getBannerUrl());
+/*		if (storeApply.getEnterprise() != null) {
+			EnterpriseSimple enterprise = apply.getEnterprise();
+			enterprise.setEnUrl(storeApply.getEnterprise().getEnUrl());
+			enterprise.setAddress(storeApply.getEnterprise().getAddress());
+			enterprise.setEnTel(storeApply.getEnterprise().getEnTel());
+			enterprise.setEnFax(storeApply.getEnterprise().getEnFax());
+			// 更新企业信息JSON字符串
+			apply.setEnterprise(enterprise);
+		}
+
+		User user  = SystemSession.getUser();
+		if (user == null || user.getEnterprise() == null) {
+			return new ResultMap(CodeType.ERROR_STATE, "用户没有登录或账户信息异常");
+		}
+
+		// 添加资质信息
+		List<Qualification> qualifications = storeApply.getQualifications();
+		List<Qualification> existQualifications = apply.getQualifications();
+		for (Qualification qualification : qualifications) {
+			qualification.setEnUU(user.getEnterprise().getUu());
+			qualification.setUploaderUU(user.getUserUU());
+			qualification.setCreateTime(date);
+			qualification.setUpdateTime(date);
+			existQualifications.add(qualification);
+		}
+		// 更新资质信息JSON字符串
+		apply.setQualifications(existQualifications);*/
+		User user  = SystemSession.getUser();
+		if (user == null || user.getEnterprise() == null) {
+			return new ResultMap(CodeType.ERROR_STATE, "用户没有登录或账户信息异常");
+		}
+		storeApply = storeApplyService.handlerApply(apply);
+		StoreIn storeIn = storeService.createByStoreApplyAndSave(storeApply);
+		return ResultMap.success(storeIn.getUuid());
+	}
+
 	@Override
 	public ResultMap saveUpdateOfApply(String uuid, StoreApply apply) {
 		// 验证参数合法性

+ 1 - 0
src/main/java/com/uas/platform/b2c/prod/store/service/impl/QualificationServiceImpl.java

@@ -102,6 +102,7 @@ public class QualificationServiceImpl implements QualificationService {
 		qualification.setUploaderUU(user.getUserUU());
 		qualification.setCreateTime(date);
 		qualification.setUpdateTime(date);
+		qualificationDao.save(qualification);
 		return qualification;
 	}
 }

+ 1 - 0
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreApplyServiceImpl.java

@@ -122,6 +122,7 @@ public class StoreApplyServiceImpl implements StoreApplyService {
 		storeApply.setUserUU(user.getUserUU());
 		storeApply.setUserName(user.getUserName());
 		storeApply.setCreateTime(date);
+		//将storeApply设置为预审核状态;
 		storeApply.setStatus(StoreApply.ApplyStatus.PREPARE);
 		// 设置店铺基础信息
 		storeApply.setEnUU(user.getEnterprise().getUu());

+ 14 - 9
src/main/resources/dev/account.properties

@@ -1,20 +1,25 @@
 ### account center config, 
-account.us.save.url=http://113.105.74.135:8001/api/userspace
-account.user.save.url=http://113.105.74.135:8001/api/user
-
+account.us.save.url=http://192.168.253.6:32323/api/userspace
+account.user.save.url=http://192.168.253.6:32323/api/user
+account.user.getPartners.url=http://192.168.253.6:32323/api/partners
+### ÍôÃ÷»ª±¾µØ:
 ### sso config
 sso.app=mall
 # token secretkey
 sso.secretkey=0taQcW073Z7G628g5H
 sso.cookie.secure=false
 sso.cookie.browser=false
-sso.login.url=http://113.105.74.135:8001/sso/login
-sso.logout.url=http://113.105.74.135:8001/sso/logout
-sso.register.url=http://113.105.74.135:8001/sso/register_p
-
+sso.login.url=http://192.168.253.6:32323
+sso.logout.url=http://192.168.253.6:32323/logquit
+sso.register.url=http://192.168.253.6:32323/register/personalRegistration
+sso.updatePassword.url=http://192.168.253.6:32323/reset/changePasswordChooseStyle
+sso.updateMobile.url=http://192.168.253.6:32323/validation/phoneValidation
+sso.updateEmail.url=http://192.168.253.6:32323/validation/emailValidation
+sso.updateQuestion.url=http://192.168.253.6:32323/encrypted-setting/EncryptedSetting
+sso.realNameAuth.url=http://192.168.253.6:32323/certification/realNameCertification
 #cross domain
-sso.ask.url=http://113.105.74.135:8001/sso/login/ask
-sso.askout.url=http://113.105.74.135:8001/sso/logout/ask
+sso.ask.url=http://192.168.253.6:32323/sso/login/ask
+sso.askout.url=http://192.168.253.6:32323/sso/logout/ask
 
 sso.authcookie.secretkey=Z318866alN6gA0piuO
 sso.client.private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAIquTH9rOygR1iyMzU1CSQDXG+lJpMQgWkRWMwO3lzS+UJ3GRq1yxxD8mPFZCuItMRxP4Mvu3nvxDvsJx8lfRXk4MGswROIBPcdBAnasphN7wS5mDvDe/VBIKv+fg4j4VEnak9VUAQhS1gDtp+ZmQpCc9/gz8vueF1ueIXspAoUhAgMBAAECgYBfMP8PY1KK0Zt6nvd5NauYqQ7elg9EFJUBXU3NGmLu8Eez1NrEygk8braoy57921lffrDmKsOKvc+zn2YEoqGzbHCOuYsTDBXFCGLkj8oPeHyrs02+XuJe9j2ejhq2N04oP/TMxerFeyWnHdRCNXECrthqhwTRmGitnj2/+FLVAQJBAM93HY/5HoFlfRv9zjFy72ft/ZC60jHERXwyumbFs8z/x8sHCY1GWfgGhm1ShE1bDWAPY3W9WCFsx6nOETsHajECQQCrH8Dl7IIIHJ5D0TDisFkePnYELxpmOGlPwPOQ7hyLAdW4aB1fVIpjsWmgGOyPvmhK+b99XeLUbwpxVU7AAB3xAkAJNxJCFd+sAbUH7EMfYSqPJDwSFKpHeZ9Yf+xVqkxtO6NFOl/LPae7Y5bO/k5QHU4/yQ8y6KEkgu9vdG7Bf3fRAkEAiDlX6vDytphpmN0PyHXQC9Z3Rm9k2ZjwpM+aVXZn/HSyeQFQ2JHJNQGHby5IK0nNZloYiSlTJ/9ZVc0uSoQNUQJBAJFix2tD7b0Zq82xpeGt81rhXsofuerq1x9WM5UyYILCKJMHZw5lt58snINVzA7JxV+l60dbIgJjmRYm0yxQIAY=

+ 14 - 13
src/main/resources/prod/account.properties

@@ -1,23 +1,24 @@
 ### account center config, 
-account.us.save.url=https://account.ubtob.com/api/userspace
-account.user.save.url=https://account.ubtob.com/api/user
-
+account.us.save.url=https://sso.ubtob.com/api/userspace
+account.user.save.url=https://sso.ubtob.com/api/user
+account.user.getPartners.url=https://sso.ubtob.com/api/partners
 ### sso config
 sso.app=mall
-sso.cookie.domain=usoftmall.com
 # token secretkey
 sso.secretkey=0taQcW073Z7G628g5H
-sso.cookie.secure=true
-sso.cookie.httponly=true
+sso.cookie.secure=false
 sso.cookie.browser=false
-sso.login.url=https://account.ubtob.com/sso/login
-sso.logout.url=https://account.ubtob.com/sso/logout
-sso.register.url=https://account.ubtob.com/sso/register_p
-
+sso.login.url=https://sso.ubtob.com
+sso.logout.url=https://sso.ubtob.com/logquit
+sso.register.url=https://sso.ubtob.com/register/personalRegistration
+sso.updatePassword.url=https://sso.ubtob.com/reset/changePasswordChooseStyle
+sso.updateMobile.url=https://sso.ubtob.com/validation/phoneValidation
+sso.updateEmail.url=https://sso.ubtob.com/validation/emailValidation
+sso.updateQuestion.url=https://sso.ubtob.com/encrypted-setting/EncryptedSetting
+sso.realNameAuth.url=https://sso.ubtob.com/certification/realNameCertification
 #cross domain
-sso.ask.url=https://account.ubtob.com/sso/login/ask
-sso.askout.url=https://account.ubtob.com/sso/logout/ask
-sso.return.url=https://www.usoftmall.com
+sso.ask.url=https://sso.ubtob.com/sso/login/ask
+sso.askout.url=https://sso.ubtob.com/sso/logout/ask
 
 sso.authcookie.secretkey=Z318866alN6gA0piuO
 sso.client.private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAIquTH9rOygR1iyMzU1CSQDXG+lJpMQgWkRWMwO3lzS+UJ3GRq1yxxD8mPFZCuItMRxP4Mvu3nvxDvsJx8lfRXk4MGswROIBPcdBAnasphN7wS5mDvDe/VBIKv+fg4j4VEnak9VUAQhS1gDtp+ZmQpCc9/gz8vueF1ueIXspAoUhAgMBAAECgYBfMP8PY1KK0Zt6nvd5NauYqQ7elg9EFJUBXU3NGmLu8Eez1NrEygk8braoy57921lffrDmKsOKvc+zn2YEoqGzbHCOuYsTDBXFCGLkj8oPeHyrs02+XuJe9j2ejhq2N04oP/TMxerFeyWnHdRCNXECrthqhwTRmGitnj2/+FLVAQJBAM93HY/5HoFlfRv9zjFy72ft/ZC60jHERXwyumbFs8z/x8sHCY1GWfgGhm1ShE1bDWAPY3W9WCFsx6nOETsHajECQQCrH8Dl7IIIHJ5D0TDisFkePnYELxpmOGlPwPOQ7hyLAdW4aB1fVIpjsWmgGOyPvmhK+b99XeLUbwpxVU7AAB3xAkAJNxJCFd+sAbUH7EMfYSqPJDwSFKpHeZ9Yf+xVqkxtO6NFOl/LPae7Y5bO/k5QHU4/yQ8y6KEkgu9vdG7Bf3fRAkEAiDlX6vDytphpmN0PyHXQC9Z3Rm9k2ZjwpM+aVXZn/HSyeQFQ2JHJNQGHby5IK0nNZloYiSlTJ/9ZVc0uSoQNUQJBAJFix2tD7b0Zq82xpeGt81rhXsofuerq1x9WM5UyYILCKJMHZw5lt58snINVzA7JxV+l60dbIgJjmRYm0yxQIAY=

+ 1 - 1
src/main/resources/spring/context.xml

@@ -196,7 +196,7 @@
 		<property name="defaultEncoding" value="utf-8"></property>
 	</bean>
 	<!-- 账户中心配置 -->
-	<bean id="accountConfigurer" class="com.uas.account.web.AccountConfigurer"
+	<bean id="accountConfigurer" class="com.uas.sso.web.AccountConfigurer"
 		init-method="init">
 		<property name="configPath" value="classpath:${profile}/account.properties" />
 	</bean>

+ 13 - 10
src/main/resources/test/account.properties

@@ -1,21 +1,24 @@
 ### account center config, 
-account.us.save.url=http://113.105.74.135:8001/api/userspace
-account.user.save.url=http://113.105.74.135:8001/api/user
-
+account.us.save.url=http://192.168.253.6:32323/api/userspace
+account.user.save.url=http://192.168.253.6:32323/api/user
+account.user.getPartners.url=http://192.168.253.6:32323/api/partners
 ### sso config
 sso.app=mall
 # token secretkey
 sso.secretkey=0taQcW073Z7G628g5H
 sso.cookie.secure=false
 sso.cookie.browser=false
-sso.login.url=http://113.105.74.135:8001/sso/login
-sso.logout.url=http://113.105.74.135:8001/sso/logout
-sso.register.url=http://113.105.74.135:8001/sso/register_p
-
+sso.login.url=http://192.168.253.6:32323
+sso.logout.url=http://192.168.253.6:32323/logquit
+sso.register.url=http://192.168.253.6:32323/register/personalRegistration
+sso.updatePassword.url=http://192.168.253.6:32323/reset/changePasswordChooseStyle
+sso.updateMobile.url=http://192.168.253.6:32323/validation/phoneValidation
+sso.updateEmail.url=http://192.168.253.6:32323/validation/emailValidation
+sso.updateQuestion.url=http://192.168.253.6:32323/encrypted-setting/EncryptedSetting
+sso.realNameAuth.url=http://192.168.253.6:32323/certification/realNameCertification
 #cross domain
-sso.ask.url=http://113.105.74.135:8001/sso/login/ask
-sso.askout.url=http://113.105.74.135:8001/sso/logout/ask
-sso.return.url=http://192.168.253.12:23400
+sso.ask.url=http://192.168.253.6:32323/sso/login/ask
+sso.askout.url=http://192.168.253.6:32323/sso/logout/ask
 
 sso.authcookie.secretkey=Z318866alN6gA0piuO
 sso.client.private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAIquTH9rOygR1iyMzU1CSQDXG+lJpMQgWkRWMwO3lzS+UJ3GRq1yxxD8mPFZCuItMRxP4Mvu3nvxDvsJx8lfRXk4MGswROIBPcdBAnasphN7wS5mDvDe/VBIKv+fg4j4VEnak9VUAQhS1gDtp+ZmQpCc9/gz8vueF1ueIXspAoUhAgMBAAECgYBfMP8PY1KK0Zt6nvd5NauYqQ7elg9EFJUBXU3NGmLu8Eez1NrEygk8braoy57921lffrDmKsOKvc+zn2YEoqGzbHCOuYsTDBXFCGLkj8oPeHyrs02+XuJe9j2ejhq2N04oP/TMxerFeyWnHdRCNXECrthqhwTRmGitnj2/+FLVAQJBAM93HY/5HoFlfRv9zjFy72ft/ZC60jHERXwyumbFs8z/x8sHCY1GWfgGhm1ShE1bDWAPY3W9WCFsx6nOETsHajECQQCrH8Dl7IIIHJ5D0TDisFkePnYELxpmOGlPwPOQ7hyLAdW4aB1fVIpjsWmgGOyPvmhK+b99XeLUbwpxVU7AAB3xAkAJNxJCFd+sAbUH7EMfYSqPJDwSFKpHeZ9Yf+xVqkxtO6NFOl/LPae7Y5bO/k5QHU4/yQ8y6KEkgu9vdG7Bf3fRAkEAiDlX6vDytphpmN0PyHXQC9Z3Rm9k2ZjwpM+aVXZn/HSyeQFQ2JHJNQGHby5IK0nNZloYiSlTJ/9ZVc0uSoQNUQJBAJFix2tD7b0Zq82xpeGt81rhXsofuerq1x9WM5UyYILCKJMHZw5lt58snINVzA7JxV+l60dbIgJjmRYm0yxQIAY=

+ 2 - 0
src/main/webapp/WEB-INF/spring/webmvc.xml

@@ -95,6 +95,7 @@
 			<mvc:exclude-mapping path="/**/static/**" />
 			<mvc:exclude-mapping path="/" />
 			<mvc:exclude-mapping path="/login/**" />
+			<mvc:exclude-mapping path="/newLogin/**" />
 			<mvc:exclude-mapping path="/register/**" />
 			<mvc:exclude-mapping path="/logout/**" />
 			<mvc:exclude-mapping path="/index" />
@@ -106,6 +107,7 @@
 			<mvc:exclude-mapping path="/search/**" />
 			<mvc:exclude-mapping path="/commonSearch/**" />
 			<mvc:exclude-mapping path="/help" />
+			<mvc:exclude-mapping path="/base/enterprise/**" />
 			<mvc:exclude-mapping path="/trade/help/api/**" />
 			<mvc:exclude-mapping path="/recommendation/**" />
 			<mvc:exclude-mapping path="/news"/>

+ 3 - 3
src/main/webapp/resources/css/vendor/sell.css

@@ -5319,15 +5319,15 @@ input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:foc
 /*提示横条*/
 .result{
     width: 100%;
-    height: 30px;
-    line-height: 30px;
+    height: 35px;
+    line-height: 16px;
     text-align: center;
     background: #fef6f2;
     border: 1px solid #ec854d;
     overflow: hidden ;
 }
 .result span{
-    margin-left: 330px;
+    /*margin-left: 330px;*/
     height: 30px;
     font-size: 14px;
     color: #f15601;

+ 9 - 5
src/main/webapp/resources/js/admin/controllers/help/HelpDetailCtrl.js

@@ -33,9 +33,9 @@ define(['app/app'], function(app) {
 
         $scope.rootPath = BaseService.getRootPath();
         function switchBase64ToImg(el) {
-            var deferred = $q.defer();
+            const regex = new RegExp(':(.*?);');
             var data = el.src;
-            var arr = data.split(','), mime = arr[0].match(/:(.*?);/)[1],
+            var arr = data.split(','), mime = regex.exec(arr[0])[1],
                 bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
             while(n--){
                 u8arr[n] = bstr.charCodeAt(n);
@@ -76,8 +76,10 @@ define(['app/app'], function(app) {
             var imgs = els.find('img');
             var promises = [];
             angular.forEach(imgs, function (img) {
-                promises.push(switchBase64ToImg(img).$promise);
-            })
+                if (img.src && img.src.indexOf('http://') < 0) {
+                    promises.push(switchBase64ToImg(img).$promise);
+                }
+            });
             $q.all(promises).then(function () {
                 // console.log(els.html());
                 $scope.issue.article = els.html()
@@ -99,7 +101,9 @@ define(['app/app'], function(app) {
             var imgs = els.find('img');
             var promises = [];
             angular.forEach(imgs, function (img) {
-                promises.push(switchBase64ToImg(img).$promise);
+                if (img.src && img.src.indexOf('http://') < 0) {
+                    promises.push(switchBase64ToImg(img).$promise);
+                }
             })
             $q.all(promises).then(function () {
                 // console.log(els.html());

+ 5 - 3
src/main/webapp/resources/js/admin/controllers/help/HelpEditCtrl.js

@@ -33,9 +33,9 @@ define(['app/app'], function(app) {
 
         $scope.rootPath = BaseService.getRootPath();
         function switchBase64ToImg(el) {
-            var deferred = $q.defer();
+            const regex = new RegExp(':(.*?);');
             var data = el.src;
-            var arr = data.split(','), mime = arr[0].match(/:(.*?);/)[1],
+            var arr = data.split(','), mime = regex.exec(arr[0])[1],
                 bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
             while(n--){
                 u8arr[n] = bstr.charCodeAt(n);
@@ -59,7 +59,9 @@ define(['app/app'], function(app) {
             var imgs = els.find('img');
             var promises = [];
             angular.forEach(imgs, function (img) {
-                promises.push(switchBase64ToImg(img).$promise);
+                if (img.src && img.src.indexOf('http://') < 0) {
+                    promises.push(switchBase64ToImg(img).$promise);
+                }
             })
             $q.all(promises).then(function () {
                 // console.log(els.html());

+ 42 - 18
src/main/webapp/resources/js/common/controllers/commonCtrls.js

@@ -211,10 +211,10 @@ define([ 'app/app' ], function(app) {
                 AuthenticationService.redirectRegister();
             };
 
-			// 跳转
-			$scope.gotoUrl = function(url) {
-				location.href = url;
-			};
+            //安全中心:
+
+
+
 		}]);
 
 	// 登录模态框
@@ -1752,6 +1752,21 @@ define([ 'app/app' ], function(app) {
 		};
 	}]);
 
+	/**
+	 * 左侧导航栏控制器
+	 */
+	app.controller('leftNavCtrl', ["$scope", "toaster", '$modal', '$rootScope', function($scope, toaster, $modal, $rootScope){
+		//安全设置提醒框
+		$scope.openHomeCenterModel = function() {
+			var modalInstance = $modal.open({
+				animation: true,
+				templateUrl: $rootScope.rootPath + '/static/view/usercenter/modal/homeCenter_modal.html',
+				controller:'homeModalCtrl'
+			});
+			modalInstance.result.then(function(){
+			}, function(){
+			});
+		};
     function checkNullStr (str) {
         const NULL_ARR = ['空', '没', '无', '-', '—', 'null', '#N/A'];
         var flag = true;
@@ -1770,21 +1785,30 @@ define([ 'app/app' ], function(app) {
    */
 	app.controller('leftNavCtrl', ["$scope", "toaster", function($scope, toaster){
 		$scope.promptUpdate = function() {
-			console.info($scope.userInfo.pwdEnable);
-			if (!$scope.userInfo.pwdEnable) {
-        toaster.pop("info", "请修改登录密码");
-        return;
-			}
-      if (!$scope.userInfo.userEmail) {
-        toaster.pop("info", "请绑定邮箱");
-        return;
-      }
-      if (!$scope.userInfo.haveUserQuestion) {
-        toaster.pop("info",  "请设置密保问题 ");
-        return;
-      }
+            if (!$scope.userInfo.pwdEnable || !$scope.userInfo.haveUserQuestion||!$scope.userInfo.emailValidCode || $scope.userInfo.emailValidCode != 2) {
+                $scope.openHomeCenterModel();
+            }
+			/*if (!$scope.userInfo.pwdEnable || !$scope.userInfo.userEmail || !$scope.userInfo.haveUserQuestion) {
+				$scope.openHomeCenterModel();
+			}*/
+		};
+	}]);
+
+	app.controller('homeModalCtrl', ['$rootScope', '$scope',  '$modalInstance', 'toaster', '$http', 'ShippingAddress','$state', function($rootScope, $scope, $modalInstance, toaster, $http, ShippingAddress,$state){
+		$rootScope.$on('$stateChangeStart',
+			function(event, toState, toParams, fromState, fromParams){
+				$modalInstance.dismiss();
+			})
+		$scope.goLink = function(op) {
+			$state.go('vendor_account_management',{op:op});
+			$modalInstance.dismiss('cancel');
 		}
-  }]);
+
+		$scope.cancel = function () {
+			$modalInstance.dismiss('cancel');
+		}
+	}]);
+
 	var getOriginalData = function(data) {
 		var result = {};
 		if(data&&data.length) {

+ 88 - 0
src/main/webapp/resources/js/common/services.js

@@ -241,6 +241,94 @@ define([ 'angular', 'common/utils', 'big'], function(angular, utils, Big) {
                     alert('系统错误');
                 });
             },
+            redirectPassword: function() {
+                // 获取密码修改Url;
+                var newTab=window.open('about:blank');
+                $http.get(rootPath + '/mPassWord/page', {
+                    params: {
+                        returnUrl: window.location.href
+                    }
+                }).success(function(data) {
+                    if (data.content) {
+                        newTab.location.href=data.content;
+                    } else {
+                        alert('系统错误');
+                    }
+                }).error(function() {
+                    alert('系统错误');
+                });
+            },
+            redirectPhone: function() {
+                var newTab=window.open('about:blank');
+                // 获取电话修改Url
+                $http.get(rootPath + '/mPhone/page', {
+                    params: {
+                        returnUrl: window.location.href
+                    }
+                }).success(function(data) {
+                    if (data.content) {
+                        newTab.location.href=data.content;
+                    } else {
+                        alert('系统错误');
+                    }
+                }).error(function() {
+                    alert('系统错误');
+                });
+            },
+            redirectEmail: function() {
+                // 获取邮箱修改url
+                var newTab=window.open('about:blank');
+                $http.get(rootPath + '/mEmail/page', {
+                    params: {
+                        returnUrl: window.location.href
+                    }
+                }).success(function(data) {
+                    if (data.content) {
+                        newTab.location.href=data.content;
+
+                    } else {
+                        alert('系统错误');
+                    }
+                }).error(function() {
+                    alert('系统错误');
+                });
+            },
+            redirectSecQuestion: function() {
+                // 获取密保问题修改的url
+                var newTab=window.open('about:blank');
+                $http.get(rootPath + '/mQuestion/page', {
+                    params: {
+                        returnUrl: window.location.href
+                    }
+                }).success(function(data) {
+                    if (data.content) {
+                        newTab.location.href=data.content;
+                    } else {
+                        alert('系统错误');
+                    }
+                }).error(function() {
+                    alert('系统错误');
+                });
+            },
+            redirectRealNameAuth : function() {
+                // 获取实名认证url
+                var newTab=window.open('about:blank');
+                $http.get(rootPath + '/realNameAuth/page', {
+                    params: {
+                        returnUrl: window.location.href
+                    }
+                }).success(function(data) {
+                    if (data.content) {
+                        newTab.location.href=data.content;
+                    } else {
+                        alert('系统错误');
+                    }
+                }).error(function() {
+                    alert('系统错误');
+                });
+            },
+
+
 			isAuthed : function() {
 				return SessionService.get('authenticated');
 			},

+ 2 - 1
src/main/webapp/resources/js/help/controllers/supplyChainCtrl.js

@@ -1,6 +1,7 @@
 define([ 'app/app' ], function(app) {
 	'use strict';	
-	app.register.controller('supplyChainCtrl', ['$scope', 'makerDemandServices', 'toaster', '$state', 'SessionService', '$upload', 'SuDemand', '$modal', '$http', '$timeout', function($scope, makerDemandServices, toaster, $state, SessionService, $upload, SuDemand, $modal, $http, $timeout) {
+	app.
+	register.controller('supplyChainCtrl', ['$scope', 'makerDemandServices', 'toaster', '$state', 'SessionService', '$upload', 'SuDemand', '$modal', '$http', '$timeout', function($scope, makerDemandServices, toaster, $state, SessionService, $upload, SuDemand, $modal, $http, $timeout) {
 		
 		if(SessionService.get('authenticated')) {
 			makerDemandServices.getBasicInfo(null, function(data) {

+ 22 - 90
src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js

@@ -6,10 +6,10 @@ define(['app/app'], function (app) {
   app.register.controller('accountManagerCtrl',
       ['$scope', '$rootScope', 'ngTableParams', 'BaseService',
         'ShippingAddress', '$modal', 'Enterprise', 'User', 'toaster', '$http',
-        '$stateParams',
+        '$stateParams', 'AuthenticationService',
         function ($scope, $rootScope, ngTableParams, BaseService,
             ShippingAddress, $modal, Enterprise, User, toaster, $http,
-            $stateParams) {
+            $stateParams, AuthenticationService) {
           document.title = '账户管理-优软商城';
           $rootScope.active = 'account_manager';
           $scope.tab = 'base';
@@ -428,60 +428,24 @@ define(['app/app'], function (app) {
 				$modalInstance.dismiss();
 			};
 		}]);
-
-
-		$scope.updatePassword = function(){
-			var modalInstance = $modal.open({
-				animation: true,
-				templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updatePassword.html',
-				controller: 'PasswordCtrl',
-				resolve: {
-					user: function(){return angular.copy($rootScope.userInfo);}
-				}
-			});
-
-			modalInstance.result.then(function () {
-				window.location.href = "user#/accountManager/sec";
-			}, function () {
-			});
-		};
-
-          $scope.updateUserEmail = function () {
-            var modalInstance = $modal.open({
-              animation: true,
-              templateUrl: $rootScope.rootPath
-              + '/static/view/vendor/modal/updateUserEmail.html',
-              controller: 'UserEmailCtrl',
-              resolve: {
-                user: function () {
-                  return angular.copy($rootScope.userInfo);
-                }
-              }
-            });
-
-            modalInstance.result.then(function () {
-              window.location.href = "user#/accountManager/sec";
-            }, function () {
-            });
-          };
-
-          $scope.updateUserTel = function () {
-            var modalInstance = $modal.open({
-              animation: true,
-              templateUrl: $rootScope.rootPath
-              + '/static/view/vendor/modal/updateUserTel.html',
-              controller: 'UserTelCtrl',
-              resolve: {
-                user: function () {
-                  return angular.copy($rootScope.userInfo);
-                }
-              }
-            });
-
-            modalInstance.result.then(function () {
-            }, function () {
-            });
-          };
+			//修改密码:
+			$scope.updatePassword = function(){
+				AuthenticationService.redirectPassword()
+			};
+				//修改邮箱或设置邮箱;
+			  $scope.updateUserEmail = function () {
+				AuthenticationService.redirectEmail()
+			  };
+				//修改电话号码;
+			  $scope.updateUserTel = function () {
+				  AuthenticationService.redirectPhone()
+			  };
+
+
+			//修改密保问题;
+			$scope.updateUserQuestion = function () {
+				AuthenticationService.redirectSecQuestion()
+			};
 
           $scope.updateUserPay = function () {
             var modalInstance = $modal.open({
@@ -501,41 +465,9 @@ define(['app/app'], function (app) {
             });
           };
 
-          $scope.updateUserQuestion = function () {
-            var modalInstance = $modal.open({
-              animation: true,
-              templateUrl: $rootScope.rootPath
-              + '/static/view/vendor/modal/updateUserQuestion.html',
-              controller: 'UserQuestionCtrl',
-              resolve: {
-                user: function () {
-                  return angular.copy($rootScope.userInfo);
-                }
-              }
-            });
-
-            modalInstance.result.then(function () {
-              window.location.href = "user#/accountManager/sec";
-            }, function () {
-            });
-          };
-
+			//实名认证
           $scope.updateRealAuth = function () {
-            var modalInstance = $modal.open({
-              animation: true,
-              templateUrl: $rootScope.rootPath
-              + '/static/view/vendor/modal/updateRealAuth.html',
-              controller: 'UserRealAuthCtrl',
-              resolve: {
-                user: function () {
-                  return angular.copy($rootScope.userInfo);
-                }
-              }
-            });
-
-            modalInstance.result.then(function () {
-            }, function () {
-            });
+              AuthenticationService.redirectRealNameAuth()
           };
 
           //买家中心 等级提示跳转

+ 6 - 2
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_home_ctrl.js

@@ -29,10 +29,14 @@ define(['app/app', 'calendar'], function(app) {
       }
 
         //安全级别
-        if(!($scope.userInfo.pwdEnable && $scope.userInfo.haveUserQuestion && $scope.userInfo.userEmail)){
-          $scope.openHomeCenterModel();
+        if (!$scope.userInfo.pwdEnable || !$scope.userInfo.haveUserQuestion||!$scope.userInfo.emailValidCode || $scope.userInfo.emailValidCode != 2) {
+            $scope.openHomeCenterModel();
         }
 
+      /*  if(!($scope.userInfo.pwdEnable && $scope.userInfo.haveUserQuestion && $scope.userInfo.userEmail)){
+          $scope.openHomeCenterModel();
+        }*/
+
         /**
          * 获取推荐新店信息
          */

+ 56 - 50
src/main/webapp/resources/js/vendor/app.js

@@ -631,53 +631,58 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 		$rootScope.rootPath = BaseService.getRootPath();
 		$rootScope.page = 'vendor';// 导航栏状态,'个人中心'状态激活
 
-		$rootScope.$on('$stateChangeStart', function (event, toState) {
+		var getToStateName = function () {
+			if ($rootScope.store && (!$rootScope.store.status || $rootScope.store.status === 'OPENED')) {
+				return 'vendor_store_maintain';
+			} else if ($rootScope.store && $rootScope.store.status && $rootScope.store.status !== 'OPENED') {
+				return 'vendor_store_close';
+			} else if ($rootScope.applyStatus === 'NONE') {
+				return 'vendor_store_apply';
+			} else if ($rootScope.applyStatus === 'PREPARE') {
+				return 'vendor_store_wait';
+			} else if ($rootScope.applyStatus === 'PASS') {
+				return 'vendor_store_info';
+			} else {
+				return 'vendor_index';
+			}
+		};
 
-			var getToStateName = function () {
-				if ($rootScope.store && (!$rootScope.store.status || $rootScope.store.status === 'OPENED')) {
-					return 'vendor_store_maintain';
-				} else if ($rootScope.store && $rootScope.store.status && $rootScope.store.status !== 'OPENED') {
-					return 'vendor_store_close';
-				} else if ($rootScope.applyStatus === 'NONE') {
-					return 'vendor_store_apply';
-				} else if ($rootScope.applyStatus === 'PREPARE') {
-					return 'vendor_store_wait';
-				} else if ($rootScope.applyStatus === 'PASS') {
-					return 'vendor_store_info';
-				} else {
-					return 'vendor_index';
-				}
-			};
+		// 创建店铺的Promise对象
+		var deferred = $q.defer();
+		StoreInfo.existStore({}, {}, function (store) {
+			deferred.resolve(store);
+		}, function (error) {
+			deferred.reject(error);
+		});
+		var storePromise = deferred.promise;
+		$rootScope.storePromise = storePromise;
 
-			// 创建店铺的Promise对象
-			var deferred = $q.defer();
-			StoreInfo.existStore({}, {}, function (store) {
-				deferred.resolve(store);
-			}, function (error) {
-				deferred.reject(error);
-			});
-			var storePromise = deferred.promise;
-			$rootScope.storePromise = storePromise;
+		// 创建开店申请的Promise对象
+		var deferred1 = $q.defer();
+		StoreInfo.findShopOwnerApplyByNormalStatus({}, {}, function (result) {
+			deferred1.resolve(result);
+		}, function (error) {
+			deferred1.reject(error);
+		});
+		var applyPromise = deferred1.promise;
 
-			// 创建开店申请的Promise对象
-			var deferred1 = $q.defer();
-			StoreInfo.findShopOwnerApplyByNormalStatus({}, {}, function (result) {
-				deferred1.resolve(result);
-			}, function (error) {
-				deferred1.reject(error);
-			});
-			var applyPromise = deferred1.promise;
+		// 合并多个Promise对象
+		$q.all([storePromise, applyPromise]).then(function (result) {
+			$rootScope.store = result[0] && result[0].uuid ? result[0] : null;
+			$rootScope.applyInfo = null;
+			if (result[1] && result[1].success) {
+				$rootScope.applyInfo = result[1].data;
+				$rootScope.applyStatus = result[1].data ? result[1].data.status : 'NONE';
+			} else {
+				$rootScope.applyStatus = 'NONE';
+			}
 
-			// 合并多个Promise对象
-			$q.all([storePromise, applyPromise]).then(function (result) {
-				$rootScope.store = result[0] && result[0].uuid ? result[0] : null;
-				$rootScope.applyInfo = null;
-				if (result[1] && result[1].success) {
-					$rootScope.applyInfo = result[1].data;
-					$rootScope.applyStatus = result[1].data ? result[1].data.status : 'NONE';
-				} else {
-					$rootScope.applyStatus = 'NONE';
-				}
+
+			if ($rootScope.applyStatus === 'NONE') {
+				$state.go('vendor_store_apply');
+			}
+
+			$rootScope.$on('$stateChangeStart', function (event, toState) {
 
 				if (toState.name === 'vendor_store_apply' && $rootScope.applyStatus !== 'NONE') {
 					event.preventDefault();
@@ -714,14 +719,15 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 					return ;
 				}
 				console.log('route', toState.name);
-			})['catch'](function () {
-				$rootScope.store = null;
-				$rootScope.applyInfo = null;
-				$rootScope.applyStatus = 'NONE';
-				event.preventDefault();
-				console.log('route', toState.name, 'vendor_index');
-				$state.go('vendor_index');
+
 			});
+
+		})['catch'](function () {
+			$rootScope.store = null;
+			$rootScope.applyInfo = null;
+			$rootScope.applyStatus = 'NONE';
+			event.preventDefault();
+			$state.go('vendor_index');
 		});
 	}]);
 

+ 5 - 65
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -298,52 +298,15 @@ define(['app/app'], function(app) {
           };
 
           $scope.updatePassword = function () {
-            var modalInstance = $modal.open({
-              animation: true,
-              templateUrl: $rootScope.rootPath
-              + '/static/view/vendor/modal/updatePassword.html',
-              controller: 'PasswordCtrl',
-              resolve: {
-                user: function () {
-                  return angular.copy($rootScope.userInfo);
-                }
-              }
-            });
-            modalInstance.result.then(function () {
-              window.location.href = "vendor#/account/management/sec";
-            }, function () {
-            });
+              AuthenticationService.redirectPassword();
           };
 
           $scope.updateUserEmail = function(){
-            var modalInstance = $modal.open({
-              animation: true,
-              templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateUserEmail.html',
-              controller: 'UserEmailCtrl',
-              resolve: {
-                user: function(){return angular.copy($rootScope.userInfo);}
-              }
-            });
-
-            modalInstance.result.then(function(){
-              window.location.href = "vendor#/account/management/sec";
-            }, function(){
-            });
+              AuthenticationService.redirectEmail();
           };
 
           $scope.updateUserTel = function(){
-            var modalInstance = $modal.open({
-              animation: true,
-              templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateUserTel.html',
-              controller: 'UserTelCtrl',
-              resolve: {
-                user: function(){return angular.copy($rootScope.userInfo);}
-              }
-            });
-
-            modalInstance.result.then(function(){
-            }, function(){
-            });
+              AuthenticationService.redirectPhone();
           };
 
           $scope.updateUserPay = function(){
@@ -362,34 +325,11 @@ define(['app/app'], function(app) {
           };
 
           $scope.updateUserQuestion = function(){
-            var modalInstance = $modal.open({
-              animation: true,
-              templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateUserQuestion.html',
-              controller: 'UserQuestionCtrl',
-              resolve: {
-                user: function(){return angular.copy($rootScope.userInfo);}
-              }
-            });
-
-            modalInstance.result.then(function(){
-              window.location.href = "vendor#/account/management/sec";
-            }, function(){
-            });
+              AuthenticationService.redirectSecQuestion();
           };
 
           $scope.updateRealAuth = function(){
-            var modalInstance = $modal.open({
-              animation: true,
-              templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateRealAuth.html',
-              controller: 'UserRealAuthCtrl',
-              resolve: {
-                user: function(){return angular.copy($rootScope.userInfo);}
-              }
-            });
-
-            modalInstance.result.then(function(){
-            }, function(){
-            });
+              AuthenticationService.redirectRealNameAuth();
           };
 
           //卖家中心 等级提示跳转

+ 7 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_index_ctrl.js

@@ -13,11 +13,13 @@ define(['app/app', 'calendar'], function(app) {
             User.isDevOrProd(null, function(data){
                 $scope.isProd = data.data;
                 if ($scope.isProd == 'success') {
-                    var urlPrex = 'https://account.ubtob.com';
+                    var urlPrex = 'https://sso.ubtob.com';
                 } else {
-                    var urlPrex = 'http://113.105.74.135:8001';
+                    var urlPrex = 'http://192.168.253.12:32323';
                 }
-                var url = urlPrex + '/sso/change/userspace?businessCode='+$scope.userInfo.enterprise.enBussinessCode;
+                //urlPrex = 'http://192.168.253.118:3001';
+                var url = urlPrex + '/sso/login/change/userspace?spaceUU='+$scope.userInfo.enterprise.uu;
+                var newTab=window.open('about:blank');
                 $.ajax({
                     url:url,
                     dataType:'jsonp',
@@ -28,7 +30,8 @@ define(['app/app', 'calendar'], function(app) {
                     jsonpCallback:"successCallback",
                     success:function(data){
                         console.log(data);
-                        window.open(urlPrex + '/sso/center?type=apply');
+                       // window.open(urlPrex + '/cloudcenter/enterprise');
+                        newTab.location.href = urlPrex + '/cloudcenter/enterprise';
                     },
                     error:function(data) {
                         console.log(data);

+ 2 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -3053,6 +3053,8 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 
                     });
                 }, function (response) {
+                    $scope.deleteModal = false;
+                    $modalInstance.dismiss();
                     toaster.pop('error',  '错误', response.data);
                 });
             }

+ 2 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js

@@ -4,7 +4,7 @@
  */
 define(['app/app'], function (app) {
     "use strict";
-    app.register.controller('vendorOrderCtrl', ['$scope', '$rootScope', 'Purchase', 'ngTableParams', 'BaseService', 'toaster', '$state', '$filter', 'Return', 'Change', '$modal', 'PuExProcess', 'Recommendation', 'DateUtil', 'Loading', 'bankInfoService', 'Logistics', 'Distributor', 'SessionService','Rate','StoreInfo', function ($scope, $rootScope, Purchase, ngTableParams, BaseService, toaster, $state, $filter, Return, Change, $modal, PuExProcess, Recommendation, DateUtil, Loading, bankInfoService, Logistics, Distributor, SessionService, Rate, StoreInfo) {
+    app.register.controller('vendorOrderCtrl', '$scope', '$rootScope', 'Purchase', 'ngTableParams', 'BaseService', 'toaster', '$state', '$filter', 'Return', 'Change', '$modal', 'PuExProcess', 'Recommendation', 'DateUtil', 'Loading', 'bankInfoService', 'Logistics', 'Distributor', 'SessionService','Rate','StoreInfo', function ($scope, $rootScope, Purchase, ngTableParams, BaseService, toaster, $state, $filter, Return, Change, $modal, PuExProcess, Recommendation, DateUtil, Loading, bankInfoService, Logistics, Distributor, SessionService, Rate, StoreInfo) {
         $rootScope.active = 'vendor_order';
         document.title = '已卖出的产品-优软商城';
         // 加密过滤器
@@ -1603,7 +1603,7 @@ define(['app/app'], function (app) {
 
         /***********卖家评论模块 *** end *****************************/
 
-    }]);
+    });
 
     app.register.filter('VendorStatusFilter', function () {
         return function (status) {

+ 4 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_maintain_ctrl.js

@@ -221,10 +221,10 @@ define(['app/app'], function (app) {
 				toaster.pop('error', '企业信息不能为空');
 				return false;
 			}
-			if (!$scope.sampleStore.enterprise.enUrl || $scope.sampleStore.enterprise.enUrl == '') {
+			/*if (!$scope.sampleStore.enterprise.enUrl || $scope.sampleStore.enterprise.enUrl == '') {
 				toaster.pop('error', '企业官网地址不能为空');
 				return false;
-			}
+			}*/
 			if (!$scope.sampleStore.enterprise.address || $scope.sampleStore.enterprise.address == '') {
 				toaster.pop('error', '企业地址不能为空');
 				return false;
@@ -233,10 +233,10 @@ define(['app/app'], function (app) {
 				toaster.pop('error', '请输入正确的电话号码');
 				return false;
 			}
-			if (!$scope.sampleStore.enterprise.enFax || $scope.sampleStore.enterprise.enFax == '') {
+			/*if (!$scope.sampleStore.enterprise.enFax || $scope.sampleStore.enterprise.enFax == '') {
 				toaster.pop('error', '请输入正确的企业传真');
 				return false;
-			}
+			}*/
 			var store = {};
 			store.storeShortName = $scope.sampleStore.storeShortName;
             store.storeName = $scope.sampleStore.storeName;

+ 1 - 1
src/main/webapp/resources/view/common/footer.html

@@ -135,7 +135,7 @@ a:hover {
 	<ul class="list-unstyled footer-bottom">
 		<li>客服电话:400-830-1818</li>
 		<li>公司地址:深圳市南山区英唐大厦一楼</li>
-		<li>©2016 深圳市优软科技有限公司 粤ICP备15112126号-3</li>
+		<li>©2016 深圳市优软科技有限公司 粤ICP备15112126号-4</li>
 	</ul>
 	<div class="credit">
 		<a href="javascript:void(0)"><img src="static/img/credit/credit01.jpg" /></a>

+ 16 - 14
src/main/webapp/resources/view/usercenter/forstore/account_manager.html

@@ -241,10 +241,10 @@
 					<i ng-if="userInfo.secLevel==5 || userInfo.secLevel==6">强</i>
 					<!--完成<a href="javascript:void(0)"> 密保设置</a>,提升账户安全。-->
 				</span>
-        <span class="safe-remind" ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.userEmail">
+        <span class="safe-remind" ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.emailValidCode && userInfo.emailValidCode == 2">
           你的账户的安全等级过低,请 <a ng-hide="userInfo.pwdEnable" ng-click="updatePassword()"> 修改密码 </a>
           <a ng-hide="userInfo.haveUserQuestion" ng-click="updateUserQuestion()"> 设置密保问题 </a>
-          <a  ng-hide="userInfo.userEmail" ng-click="updateUserEmail()"> 绑定邮箱 </a>
+          <a  ng-hide="userInfo.emailValidCode && userInfo.emailValidCode == 2" ng-click="updateUserEmail()"> 绑定邮箱 </a>
           来保障您的账户安全!
         </span>
 			</li>
@@ -268,16 +268,16 @@
 				<a ng-hide="userInfo.haveUserQuestion" ng-click="updateUserQuestion()" class="mall-btn-default">立即设置</a>
 				<a ng-show="userInfo.haveUserQuestion" ng-click="updateUserQuestion()">修改</a>
 			</li>
-			<li ng-class="{'active-safe-box': !userInfo.userEmail}">
+			<li ng-class="{'active-safe-box': !userInfo.emailValidCode || userInfo.emailValidCode != 2}">
 				<span>
-					<h5 ng-show="userInfo.userEmail"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
-					<h5 ng-hide="userInfo.userEmail"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-show="!userInfo.emailValidCode || userInfo.emailValidCode != 2"><img src="static/img/user/images/safe.png"/></h5>
 					<font>邮箱认证:</font>
-					<span ng-show="userInfo.userEmail"><i ng-modal="userInfo.userEmail" style="color:#666;">{{userInfo.userEmail}}</i></span>
-					<span ng-hide="userInfo.userEmail">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
+					<span ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2"><i ng-modal="userInfo.userEmail" style="color:#666;">{{userInfo.userEmail}}</i></span>
+					<span ng-show="!userInfo.emailValidCode || userInfo.emailValidCode != 2">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
 				</span>
-				<a ng-show="userInfo.userEmail" ng-click="updateUserEmail()">修改</a>
-				<a ng-hide="userInfo.userEmail" ng-click="updateUserEmail()" class="mall-btn-default">立即设置</a>
+				<a ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2" ng-click="updateUserEmail()">修改</a>
+				<a ng-show="!userInfo.emailValidCode || userInfo.emailValidCode != 2" ng-click="updateUserEmail()" class="mall-btn-default">立即设置</a>
 			</li>
 			<li>
 				<span>
@@ -289,15 +289,17 @@
 			</li>
 			<li ng-switch="userInfo.idEnable">
 				<span>
-					<h5 ng-switch-when="1"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
 					<h5 ng-switch-when="0"><img src="static/img/user/images/safe.png"/></h5>
-					<h5 ng-switch-when="2"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-switch-when="1"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-switch-when="2"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+                    <h5 ng-switch-when="3"><img src="static/img/user/images/safe.png"/></h5>
 					<font>实名认证:</font>
 					<span>实名认证后,可通过实名信息找回支付密码、修改手机号等,提高账户安全性。</span>
 				</span>
-					<a ng-switch-when="0" ng-click="updateRealAuth()" class="mall-btn-default">立即设置</a>
-					<a ng-switch-when="1">审核通过</a>
-					<a ng-switch-when="2">待审核</a>
+				<a ng-switch-when="0" ng-click="updateRealAuth()" class="mall-btn-default">立即认证</a>
+				<a ng-switch-when="1">待审核</a>
+				<a ng-switch-when="2" ng-click="updateRealAuth()" >修改</a>
+				<a ng-switch-when="3" ng-click="updateRealAuth()" class="mall-btn-default">重新认证</a>
 			</li>
 			<!--<li>
 				<span>

+ 19 - 3
src/main/webapp/resources/view/usercenter/forstore/home_center.html

@@ -28,6 +28,22 @@
         padding-left: 22px;
         word-break: break-all;
     }
+    .user_home .right_r_01 p {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+    .user_home .click_bt01 {
+        line-height: 22px;
+    }
+    .user_home .right_r_01 dl dt {
+        line-height: 128px;
+    }
+    .user_home .pro_list dt img {
+        max-width: 100%;
+        max-height: 100%;
+        margin: 0;
+    }
 </style>
 <!--右侧主体部分-->
 <div class="user_home">
@@ -120,8 +136,8 @@
                     </dt>
                     <dd>
                         <p title="{{store.storeName}}">店铺名称:{{store.storeName}} </p>
-                        <p>产品数量:{{store.commodityCount}}</p>
-                        <p>品牌数量:{{store.kindCount}}</p>
+                        <p title="{{store.commodityCount}}">产品数量:{{store.commodityCount}}</p>
+                        <p title="{{store.kindCount}}">品牌数量:{{store.kindCount}}</p>
                         <a ng-href="{{'store/' + store.uuid}}" class="click_bt01" target="_blank">点击进入</a>
                     </dd>
                 </dl>
@@ -135,7 +151,7 @@
                     </dt>
                     <dd>
                         <p title="{{commodity.code}}">{{commodity.code}}</p>
-                        <p>产品数量:{{commodity.reserve}}</p>
+                        <p title="{{commodity.reserve}}">产品数量:{{commodity.reserve}}</p>
                         <p title="{{commodity.kindNameCn}}">品牌名称:{{commodity.kindNameCn}}</p>
                         <a ng-href="{{'store/productDetail/' + commodity.batchCode}}" class="click_bt01 bg_red" target="_blank">点击进入</a>
                     </dd>

+ 2 - 2
src/main/webapp/resources/view/usercenter/left_nav.html

@@ -36,13 +36,13 @@
             <a href="user#/home"><p ng-class="{'active' : active == 'home'}"><span>买家中心</span></p></a>
             <ul>
                 <li ng-class="{'active' : active == 'buyer_cart'}"><a  ui-sref="buyer_cart">购物车<em>(<span ng-bind="countCart || 0 | number"></span>)</em></a> </li>
-                <div ng-hide="!(userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.userEmail)">
+                <div ng-hide="!(userInfo.pwdEnable && userInfo.haveUserQuestion &&  userInfo.emailValidCode && userInfo.emailValidCode == 2)">
                     <li ng-class="{'active' : active == 'buyer_order'}"><a  ui-sref="buyer_order">订单中心</a></li>
                     <li ng-class="{'active' : active == 'seek_purchase'}"><a  ui-sref="buyerSeekPurchase">我的求购</a></li>
                     <li ng-class="{'active' : active == 'pay_center'}"><a  ui-sref="pay_center">支付中心</a></li>
                     <li ng-class="{'active' : active == 'buyer_invoice'}"><a  ui-sref="buyer_invoice">发票管理</a></li>
                 </div>
-                <div ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.userEmail">
+                <div ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.emailValidCode && userInfo.emailValidCode == 2">
                     <li ng-class="{'active' : active == 'buyer_order'}"><a ng-click="promptUpdate()" class="disabled">订单中心</a></li>
                     <li ng-class="{'active' : active == 'seek_purchase'}"><a  ng-click="promptUpdate()" class="disabled" >我的求购</a></li>
                     <li ng-class="{'active' : active == 'pay_center'}"><a ng-click="promptUpdate()" class="disabled" >支付中心</a></li>

+ 1 - 1
src/main/webapp/resources/view/usercenter/modal/homeCenter_modal.html

@@ -51,7 +51,7 @@
     <div class="modal-body">
         你的账户的安全等级过低,请 <span ng-hide="userInfo.pwdEnable" ng-click="goLink('pwd')"> 修改密码 </span>
         <span ng-hide="userInfo.haveUserQuestion" ng-click="goLink('question')"> 设置密保问题 </span>
-        <span  ng-hide="userInfo.userEmail" ng-click="goLink('email')"> 绑定邮箱 </span>
+        <span  ng-hide="userInfo.emailValidCode && userInfo.emailValidCode == 2" ng-click="goLink('email')"> 绑定邮箱 </span>
         来保障您的账户安全!
         <a class="mall-btn-default" ng-click="goLink('sec')" >立即前往</a>
     </div>

+ 16 - 14
src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html

@@ -620,10 +620,10 @@
 					<i ng-if="userInfo.secLevel==5 || userInfo.secLevel==6">强</i>
           <!--完成<a href="javascript:void(0)"> 密保设置</a>,提升账户安全。-->
 				</span>
-          <span class="safe-remind" ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.userEmail">
+          <span class="safe-remind" ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.emailValidCode && userInfo.emailValidCode == 2">
           你的账户的安全等级过低,请 <a ng-hide="userInfo.pwdEnable" ng-click="updatePassword()"> 修改密码 </a>
           <a ng-hide="userInfo.haveUserQuestion" ng-click="updateUserQuestion()"> 设置密保问题 </a>
-          <a ng-hide="userInfo.userEmail" ng-click="updateUserEmail()"> 绑定邮箱 </a>
+          <a ng-hide="userInfo.emailValidCode && userInfo.emailValidCode == 2" ng-click="updateUserEmail()"> 绑定邮箱 </a>
           来保障您的账户安全!
         </span>
         </li>
@@ -647,16 +647,16 @@
           <a ng-hide="userInfo.haveUserQuestion" ng-click="updateUserQuestion()" class="mall-btn-default">立即设置</a>
           <a ng-show="userInfo.haveUserQuestion" ng-click="updateUserQuestion()">修改</a>
         </li>
-        <li ng-class="{'active-safe-box': !userInfo.userEmail}">
+        <li ng-class="{'active-safe-box': !userInfo.emailValidCode || userInfo.emailValidCode != 2}">
 				<span>
-					<h5 ng-show="userInfo.userEmail"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
-					<h5 ng-hide="userInfo.userEmail"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-show="!userInfo.emailValidCode || userInfo.emailValidCode != 2"><img src="static/img/user/images/safe.png"/></h5>
 					<font>邮箱认证:</font>
-					<span ng-show="userInfo.userEmail"><i ng-modal="userInfo.userEmail" style="color:#666;">{{userInfo.userEmail}}</i></span>
-					<span ng-hide="userInfo.userEmail">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
+					<span ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2"><i ng-modal="userInfo.userEmail" style="color:#666;">{{userInfo.userEmail}}</i></span>
+					<span ng-show="!userInfo.emailValidCode || userInfo.emailValidCode != 2">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
 				</span>
-          <a ng-show="userInfo.userEmail" ng-click="updateUserEmail()">修改</a>
-          <a ng-hide="userInfo.userEmail" ng-click="updateUserEmail()" class="mall-btn-default">立即设置</a>
+          <a ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2" ng-click="updateUserEmail()">修改</a>
+          <a ng-show="!userInfo.emailValidCode || userInfo.emailValidCode != 2" ng-click="updateUserEmail()" class="mall-btn-default">立即设置</a>
         </li>
         <li>
 				<span>
@@ -668,15 +668,17 @@
         </li>
         <li ng-switch="userInfo.idEnable">
 				<span>
-					<h5 ng-switch-when="1"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
 					<h5 ng-switch-when="0"><img src="static/img/user/images/safe.png"/></h5>
-					<h5 ng-switch-when="2"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-switch-when="1"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-switch-when="2"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+                    <h5 ng-switch-when="3"><img src="static/img/user/images/safe.png"/></h5>
 					<font>实名认证:</font>
 					<span>实名认证后,可通过实名信息找回支付密码、修改手机号等,提高账户安全性。</span>
 				</span>
-          <a ng-switch-when="0" ng-click="updateRealAuth()" class="mall-btn-default">立即设置</a>
-          <a ng-switch-when="1">审核通过</a>
-          <a ng-switch-when="2">待审核</a>
+          <a ng-switch-when="0" ng-click="updateRealAuth()" class="mall-btn-default">立即认证</a>
+          <a ng-switch-when="1">待审核</a>
+          <a ng-switch-when="2" ng-click="updateRealAuth()" >修改</a>
+          <a ng-switch-when="3" ng-click="updateRealAuth()" class="mall-btn-default">重新认证</a>
         </li>
        <!-- <li>
 				<span>

+ 3 - 3
src/main/webapp/resources/view/vendor/forstore/vendor_store.html

@@ -36,7 +36,7 @@
 			</div>
 			<div class="fr" style="width: 65%;">
 				<div style="text-align: left; font-size: 18px;margin-bottom: 15px;"><span>店铺名称:{{application.storeName}}</span></div>
-				<div style="text-align: left; font-size: 18px;margin-bottom: 15px;"><span>店铺简称:{{application.storeShortName}}</span></div>
+			<!--	<div style="text-align: left; font-size: 18px;margin-bottom: 15px;"><span>店铺简称:{{application.storeShortName}}</span></div>-->
 				<div style="text-align: left; font-size: 18px;margin-bottom: 15px;"><span>简介:</span></div>
 				<div style="text-align: left; font-size: 18px;margin-bottom: 15px;"><span>{{application.description}}</span></div>
 			</div>
@@ -52,10 +52,10 @@
 				<span class="fl">店铺名称<em>*</em></span>
 				<div class="fr"><input type="text" class="input01" ng-model="store.storeName" placeholder="店铺的名称"></div>
 			</li>
-			<li>
+			<!--<li>
 				<span class="fl">店铺简称</span>
 				<div class="fr"><input type="text" class="input01" ng-model="store.storeShortName" placeholder="店铺的名称"></div>
-			</li>
+			</li>-->
 			<li>
 				<span class="fl">店铺简介</span>
 				<div class="fr"><input type="text" ng-model="store.description" class="input01" placeholder="店铺的简介"></div>

+ 8 - 3
src/main/webapp/resources/view/vendor/forstore/vendor_store_apply.html

@@ -202,6 +202,11 @@
 		line-height: 30px;
 		height: 30px;
 	}
+	.brand-small-upload .brand-small-img .img-wrap {
+		width: 80px;
+		height: 80px;
+		line-height: 80px;
+	}
 	.tab-content .com_row{
 		margin:40px 0 0;
 		border-bottom: #ccc 1px dashed;
@@ -481,7 +486,7 @@
 	</div>-->
 </div>
 <div class="container vendor_store_apply user_right" style="margin-top: 15px;padding: 0;min-height: 330px; padding-top: 20px; padding-bottom: 20px;">
-	<div class="result" ng-if="resultTip"><span class="fl"><em>*</em>店铺开通后,可<a href="vendor#/vendor_upload">&nbsp;上传产品&nbsp;</a>至自己的店铺展示销售;如不想开店,可<a href="vendor#/vendor_upload">&nbsp;上传产品&nbsp;</a>在优软商城中寄售由商城代为售卖。</span><a ng-click="closeTip()" class="fr">&times;</a></div>
+	<div class="result" ng-if="resultTip"><span class="fl"><em>*</em>店铺开通后,可<a href="vendor#/vendor_upload" target="_blank">&nbsp;上传产品&nbsp;</a>至自己的店铺展示销售;如不想开店,可<a href="vendor#/vendor_upload" target="_blank">&nbsp;上传产品&nbsp;</a>在优软商城中寄售由商城代为售卖。</span><a ng-click="closeTip()" class="fr">&times;</a></div>
 	<div>
 		<!-- Nav tabs -->
 		<ul class="nav nav-tabs" role="tablist" style="height: 41px; background: none;padding: 0 40px;">
@@ -631,7 +636,7 @@
 									<a href="{{brand.url}}" target="_blank"><i class="fa fa-search"></i>查看</a>
 								</div>
 							</div>
-							<div ng-if="brand.url && !brand.isPdf">
+							<div class="img-wrap" ng-if="brand.url && !brand.isPdf">
 								<img class="previewImage" ng-if="brand.url" ng-src="{{brand.url}}"  style="max-width: 80px; max-height: 80px; vertical-align: middle;"/>
 							</div>
 							<div image-upload data-src="static/img/example/upload-apply.png" on-success="onUploadBrandImage($data, brand)" ng-if="!brand.url" non-preview="true"></div>
@@ -805,7 +810,7 @@
 									<!--<span class="delete deleteImg" ng-click="deleteBrandImage(brand)" title="删除"><i class="fa fa-trash"></i></span>-->
 								<!--</div>-->
 							</div>
-							<div ng-if="brand.url && !brand.isPdf">
+							<div class="img-wrap" ng-if="brand.url && !brand.isPdf">
 								<img class="previewImage" ng-if="brand.url" ng-src="{{brand.url}}"  style="max-width: 80px; max-height: 80px; vertical-align: middle; line-height: 40px;"/>
 							</div>
 							<div image-upload data-src="static/img/example/upload-apply.png" on-success="onUploadBrandImage($data, brand)" ng-if="!brand.url" non-preview="true"></div>

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_store_info.html

@@ -627,7 +627,7 @@
 					<span>店铺名称</span>
 				</div>
 				<div class="col-md-10 custom_col">
-					<input type="text" ng-change="changeInfo('STORESHORTNAME', storeShortName)" class="form-control" style="border-radius: inherit;" title="storeShortName" ng-model="storeShortName" maxlength="100"/>
+					<input type="text" ng-change="changeInfo('STORENAME', storeName)" class="form-control" style="border-radius: inherit;" title="storeName" ng-model="storeName" maxlength="100"/>
 				</div>
 			</div>
 			<div class="row com_row">

+ 3 - 3
src/main/webapp/resources/view/vendor/forstore/vendor_store_maintain.html

@@ -683,10 +683,10 @@
 			</div>
 			<div class="row com_row" >
 				<div class="col-md-2 custom_col">
-					<span>店铺称</span>
+					<span>店铺称</span>
 				</div>
 				<div class="col-md-10 custom_col">
-					<input type="text" class="form-control" style="border-radius: inherit;" title="storeShortName" ng-model="sampleStore.storeShortName" maxlength="100"/>
+					<input type="text" class="form-control" style="border-radius: inherit;" title="storeName" ng-model="sampleStore.storeName" maxlength="100"/>
 				</div>
 			</div>
 			<!--<div class="row com_row" >
@@ -731,7 +731,7 @@
 			</div>
 			<div class="row com_row" style="margin-top: 10px;">
 				<div class="col-md-2 custom_col">
-					<span>传&nbsp;&nbsp;&nbsp;&nbsp;真<strong class="text-inverse">*</strong></span>
+					<span>传&nbsp;&nbsp;&nbsp;&nbsp;真</span>
 				</div>
 				<div class="col-md-10 custom_col">
 					<input type="text" class="form-control" style="border-radius: inherit;" title="enFax" ng-pattern="/^[\d-]{0,20}$/" ng-model="sampleStore.enterprise.enFax" maxlength="20"/>

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_upload.html

@@ -382,7 +382,7 @@
     .com-del-box .result {
         width: 224px;
         margin: 0 auto;
-        font-size: 12px;
+        font-size: 13px;
     }
     .com-del-box .result span {
         color: #f40d0d;

+ 2 - 2
src/main/webapp/resources/view/vendor/left_nav.html

@@ -43,7 +43,7 @@
 <div id="vendor_left_bar" class="user_left fl" ng-controller="leftNavCtrl">
 	<span  ui-sref="vendor_index"><p ng-class="{'active' : active == 'index'}"><span>卖家中心</span></p></span>
 	<ul>
-		<div ng-hide="!(userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.userEmail)">
+		<div ng-hide="!(userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.emailValidCode && userInfo.emailValidCode == 2)">
 		<li ng-class="{'active' : active == 'vendor_order'}"><span  ui-sref="vendor_order">订单中心</span></li>
 			<!--	<li ng-class="{'active' : active == 'vendor_productOn'}"><span  ui-sref="vendor_productOn">产品导入</span></li>-->
 			<li ng-class="{'active' : active == 'vendor_productOn'}"><span  ui-sref="vendor_upload">产品导入</span></li>
@@ -79,7 +79,7 @@
 		<!--</li>-->
 		<!--<li ng-class="{'active' : active == 'vendor_manufacture'}"><span  ui-sref="vendor_manufacture">原厂认证</span></li>-->
 		</div>
-		<div ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.userEmail">
+		<div ng-hide="userInfo.pwdEnable && userInfo.haveUserQuestion && userInfo.emailValidCode && userInfo.emailValidCode == 2">
 			<li ng-class="{'active' : active == 'vendor_order'}"><span ng-click="promptUpdate()" class="disabled">订单中心</span></li>
 			<!--	<li ng-class="{'active' : active == 'vendor_productOn'}"><span  ui-sref="vendor_productOn">产品导入</span></li>-->
 			<li ng-class="{'active' : active == 'vendor_productOn'}"><span ng-click="promptUpdate()" class="disabled" >产品导入</span></li>