Parcourir la source

修改ignore文件

yingp il y a 6 ans
Parent
commit
f8f1ff589e

+ 37 - 0
.gitignore

@@ -0,0 +1,37 @@
+.git
+logs
+rebel.xml
+target/:
+applications/**/target/
+base-servers/**/target/
+framework/**/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+nbproject/private/
+build/:
+applications/**/build/
+base-servers/**/build/
+framework/**/build/
+frontend/saas-web/build/
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+generatorConfig.xml
+
+*.log:

+ 1 - 1
README.md

@@ -4,9 +4,9 @@
 ├─saas-platform
 │  │  
 │  ├─applications-----------------------------业务应用
+│  |  ├─common-dto----------------------------基础传输对象
 │  |  ├─document------------------------------基础资料
 │  |  ├─money---------------------------------资金
-│  |  ├─product-------------------------------物料
 │  |  ├─purchase------------------------------采购
 │  |  |  |─purchase-api-----------------------采购服务api
 │  |  |  |─purchase-dto-----------------------采购服务数据传输对象

+ 0 - 1
applications/pom.xml

@@ -13,7 +13,6 @@
     <packaging>pom</packaging>
     <description>applications</description>
     <modules>
-        <module>product</module>
         <module>purchase</module>
         <module>sale</module>
         <module>storage</module>

+ 0 - 15
applications/product/pom.xml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>applications</artifactId>
-        <groupId>com.usoftchina.saas</groupId>
-        <version>1.0.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>product</artifactId>
-    <description>product server</description>
-
-</project>

+ 5 - 0
applications/purchase/purchase-dto/pom.xml

@@ -17,5 +17,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>common-dto</artifactId>
         </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 </project>

+ 5 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDTO.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.purchase.dto;
 
 import com.usoftchina.saas.common.dto.DocBaseDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -9,11 +11,14 @@ import java.util.Date;
  * @author yingp
  * @date 2018/10/9
  */
+@ApiModel(value = "Purchase", description = "采购订单")
 public class PurchaseDTO implements Serializable{
+    @ApiModelProperty(value = "ID")
     private Long id;
     /**
      * 编号
      */
+    @ApiModelProperty(value = "编号")
     private String code;
     /**
      * 状态

+ 14 - 0
applications/purchase/purchase-server/pom.xml

@@ -56,5 +56,19 @@
             <groupId>com.github.pagehelper</groupId>
             <artifactId>pagehelper-spring-boot-starter</artifactId>
         </dependency>
+        <!-- feign -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/PurchaseApplication.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.purchase;
 
+import com.usoftchina.saas.auth.client.EnableAuthClient;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@@ -12,6 +13,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 @SpringBootApplication
 @EnableEurekaClient
 @EnableTransactionManagement
+@EnableAuthClient
 public class PurchaseApplication {
     public static void main(String[] args) {
         SpringApplication.run(PurchaseApplication.class, args);

+ 3 - 1
applications/purchase/purchase-server/src/main/resources/application.yml

@@ -37,4 +37,6 @@ info:
   spring-cloud-version: '@spring.cloud.version@'
 mybatis:
   type-aliases-package: com.usoftchina.saas.purchase.po
-  mapper-locations: classpath:mapper/*.xml
+  mapper-locations: classpath:mapper/*.xml
+auth:
+  public-key: auth/pub.key

BIN
applications/purchase/purchase-server/src/main/resources/auth/pub.key


+ 42 - 0
applications/purchase/purchase-server/src/main/resources/config/application-dev.yml

@@ -0,0 +1,42 @@
+spring:
+  application:
+    name: purchase-server
+  security:
+    user:
+      name: admin
+      password: select111***
+  datasource:
+    hikari:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      jdbc-url: jdbc:mysql://192.168.253.12:3306/saas_biz?characterEncoding=utf-8&useSSL=false
+      username: root
+      password: select111***
+  messages:
+    basename: i18n/messages
+eureka:
+  instance:
+    leaseRenewalIntervalInSeconds: 10
+    health-check-url-path: /actuator/health
+    status-page-url-path: /actuator/info
+    metadata-map:
+      user.name: ${spring.security.user.name}
+      user.password: ${spring.security.user.password}
+  client:
+    registryFetchIntervalSeconds: 5
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.253.12:8500/eureka/
+server:
+  port: 8580
+  tomcat:
+    uri-encoding: UTF-8
+info:
+  name: '@project.artifactId@'
+  description: '@project.description@'
+  version: '@project.version@'
+  spring-boot-version: '@spring.boot.version@'
+  spring-cloud-version: '@spring.cloud.version@'
+mybatis:
+  type-aliases-package: com.usoftchina.saas.purchase.po
+  mapper-locations: classpath:mapper/*.xml
+auth:
+  publie-key: auth/pub.key

+ 35 - 38
base-servers/auth/auth-client/pom.xml

@@ -1,43 +1,40 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <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/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>auth</artifactId>
-        <groupId>com.usoftchina.saas</groupId>
-        <version>1.0.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<parent>
+    <artifactId>auth</artifactId>
+    <groupId>com.usoftchina.saas</groupId>
+    <version>1.0.0</version>
+</parent>
+<modelVersion>4.0.0</modelVersion>
 
-    <artifactId>auth-client</artifactId>
-    <description>authentication client</description>
+<artifactId>auth-client</artifactId>
+<description>authentication client</description>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-netflix-core</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-webmvc</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.usoftchina.saas</groupId>
-            <artifactId>auth-common</artifactId>
-            <version>1.0.0</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-            <scope>compile</scope>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>io.github.openfeign</groupId>
-            <artifactId>feign-core</artifactId>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
+<dependencies>
+    <dependency>
+        <groupId>org.springframework.cloud</groupId>
+        <artifactId>spring-cloud-netflix-core</artifactId>
+    </dependency>
+    <dependency>
+        <groupId>org.springframework</groupId>
+        <artifactId>spring-webmvc</artifactId>
+    </dependency>
+    <dependency>
+        <groupId>com.usoftchina.saas</groupId>
+        <artifactId>auth-common</artifactId>
+        <version>1.0.0</version>
+    </dependency>
+    <dependency>
+        <groupId>javax.servlet</groupId>
+        <artifactId>javax.servlet-api</artifactId>
+        <scope>compile</scope>
+        <optional>true</optional>
+    </dependency>
+    <dependency>
+        <groupId>io.github.openfeign</groupId>
+        <artifactId>feign-core</artifactId>
+    </dependency>
+</dependencies>
 </project>

+ 1 - 0
base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AccessFilter.java

@@ -65,6 +65,7 @@ public class AccessFilter extends ZuulFilter {
         }
         try {
             JwtInfo infoFromToken = JwtHelper.getInfoFromToken(token, authConfig.getPublicKey());
+            // TODO resource + role
         } catch (BizException e) {
             setFailedRequest(ctx, 401, Result.error(e));
             return null;

+ 4 - 0
doc/规范.md

@@ -0,0 +1,4 @@
+## 接口规范
+
+> API命名
+ 

+ 2 - 0
framework/core/src/main/java/com/usoftchina/saas/base/mapper/BaseMapper.java

@@ -71,4 +71,6 @@ public interface BaseMapper<ID extends Serializable, T extends BaseEntity<ID>> {
      * @return
      */
     List<T> selectByCompanyId(long companyId);
+
+    // TODO page
 }

+ 5 - 0
frontend/saas-web/.gitignore

@@ -0,0 +1,5 @@
+/build
+bootstrap.*
+classic.json*
+modern.json*
+.sencha

+ 15 - 0
frontend/web/.gitignore

@@ -0,0 +1,15 @@
+.DS_Store
+node_modules/
+dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+package-lock.json
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln