张延森 4 년 전
부모
커밋
67148ae5f1
7개의 변경된 파일58개의 추가작업 그리고 18개의 파일을 삭제
  1. 8
    0
      .gitignore
  2. 7
    0
      deploy/bootstrap
  3. 24
    0
      deploy/template.yml
  4. 1
    1
      mvnw
  5. 1
    1
      mvnw.cmd
  6. 7
    7
      pom.xml
  7. 10
    9
      src/main/java/com/yunzhi/demo/controller/TdPostTypeController.java

+ 8
- 0
.gitignore 파일 보기

@@ -1,5 +1,6 @@
1 1
 HELP.md
2 2
 target/
3
+out/
3 4
 !.mvn/wrapper/maven-wrapper.jar
4 5
 !**/src/main/**/target/
5 6
 !**/src/test/**/target/
@@ -31,3 +32,10 @@ build/
31 32
 
32 33
 ### VS Code ###
33 34
 .vscode/
35
+
36
+
37
+### serverless ###
38
+/deploy/*.jar
39
+/deploy/*.zip
40
+/deploy/.fun/
41
+/deploy/.env

+ 7
- 0
deploy/bootstrap 파일 보기

@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+#
3
+#
4
+
5
+appVer="0.0.1"
6
+
7
+java -jar ./medical-plat-${appVer}.jar

+ 24
- 0
deploy/template.yml 파일 보기

@@ -0,0 +1,24 @@
1
+ROSTemplateFormatVersion: '2015-09-01'
2
+Transform: 'Aliyun::Serverless-2018-04-03'
3
+Resources:
4
+  medical-plat:
5
+    Type: 'Aliyun::Serverless::Service'
6
+    Properties:
7
+      InternetAccess: true
8
+      Description: '医疗平台'
9
+    medical-plat-fn:
10
+      Type: 'Aliyun::Serverless::Function'
11
+      Properties:
12
+        Handler: com.yunzhi.demo.SpringApplication::main
13
+        Runtime: custom
14
+        CodeUri: 'oss://yz-serverless/medical-plat/medical-plat-0.0.1.zip'
15
+        MemorySize: 1024
16
+        Timeout: 30
17
+        InitializationTimeout: 30
18
+        CAPort: 8822
19
+      Events:
20
+        http-medical-plat:
21
+          Type: HTTP
22
+          Properties:
23
+            AuthType: ANONYMOUS
24
+            Methods: [ 'GET', 'POST', 'PUT', 'DELETE' ]

+ 1
- 1
mvnw 파일 보기

@@ -8,7 +8,7 @@
8 8
 # "License"); you may not use this file except in compliance
9 9
 # with the License.  You may obtain a copy of the License at
10 10
 #
11
-#    https://www.apache.org/licenses/LICENSE-2.0
11
+#    http://www.apache.org/licenses/LICENSE-2.0
12 12
 #
13 13
 # Unless required by applicable law or agreed to in writing,
14 14
 # software distributed under the License is distributed on an

+ 1
- 1
mvnw.cmd 파일 보기

@@ -7,7 +7,7 @@
7 7
 @REM "License"); you may not use this file except in compliance
8 8
 @REM with the License.  You may obtain a copy of the License at
9 9
 @REM
10
-@REM    https://www.apache.org/licenses/LICENSE-2.0
10
+@REM    http://www.apache.org/licenses/LICENSE-2.0
11 11
 @REM
12 12
 @REM Unless required by applicable law or agreed to in writing,
13 13
 @REM software distributed under the License is distributed on an

+ 7
- 7
pom.xml 파일 보기

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
3
+		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4 4
 	<modelVersion>4.0.0</modelVersion>
5 5
 	<parent>
6 6
 		<groupId>org.springframework.boot</groupId>
@@ -37,11 +37,11 @@
37 37
 		</dependency>
38 38
 
39 39
 		<!--shiro start-->
40
-<!--		<dependency>-->
41
-<!--			<groupId>org.apache.shiro</groupId>-->
42
-<!--			<artifactId>shiro-spring-boot-starter</artifactId>-->
43
-<!--			<version>1.7.1</version>-->
44
-<!--		</dependency>-->
40
+		<!--		<dependency>-->
41
+		<!--			<groupId>org.apache.shiro</groupId>-->
42
+		<!--			<artifactId>shiro-spring-boot-starter</artifactId>-->
43
+		<!--			<version>1.7.1</version>-->
44
+		<!--		</dependency>-->
45 45
 		<!--shiro end-->
46 46
 
47 47
 		<!--mysql start-->
@@ -203,7 +203,7 @@
203 203
 							<include>application.yml</include>
204 204
 							<include>application-${profileActive}.yml</include>
205 205
 						</includes>
206
-						<targetPath>${project.build.directory}/config</targetPath>
206
+<!--						<targetPath>${project.build.directory}/config</targetPath>-->
207 207
 					</resource>
208 208
 				</resources>
209 209
 			</build>

+ 10
- 9
src/main/java/com/yunzhi/demo/controller/TdPostTypeController.java 파일 보기

@@ -55,15 +55,16 @@ public class TdPostTypeController extends BaseController {
55 55
                                        @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
56 56
                                        @ApiParam("状态") @RequestParam(value = "status", required = false) Integer status) throws Exception{
57 57
 
58
-		    IPage<TdPostType> pg = new Page<>(pageNum, pageSize);
59
-            QueryWrapper<TdPostType> queryWrapper = new QueryWrapper<>();
60
-            queryWrapper.eq(null != status, "status", status);
61
-            queryWrapper.gt("status", Constants.STATUS_DELETED);
62
-            queryWrapper.orderByDesc("sort_no");
63
-            queryWrapper.orderByDesc("create_date");
64
-
65
-            IPage<TdPostType> result = iTdPostTypeService.page(pg, queryWrapper);
66
-            return ResponseBean.success(result);
58
+        IPage<TdPostType> pg = new Page<>(pageNum, pageSize);
59
+        QueryWrapper<TdPostType> queryWrapper = new QueryWrapper<>();
60
+        queryWrapper.eq(null != status, "status", status);
61
+        queryWrapper.eq("ma".equals(client), "status", Constants.STATUS_NORMAL);
62
+        queryWrapper.gt("status", Constants.STATUS_DELETED);
63
+        queryWrapper.orderByDesc("sort_no");
64
+        queryWrapper.orderByDesc("create_date");
65
+
66
+        IPage<TdPostType> result = iTdPostTypeService.page(pg, queryWrapper);
67
+        return ResponseBean.success(result);
67 68
     }
68 69
 
69 70
     /**