소스 검색

修改配置文件,发包

Signed-off-by: tangsong <86121657@qq.com>
tangsong 1 년 전
부모
커밋
5c6c5b2b56

+ 123 - 0
message-client/src/main/java/com/unis/message/client/NoticeFeign.java

@@ -0,0 +1,123 @@
1
+//
2
+// Source code recreated from a .class file by IntelliJ IDEA
3
+// (powered by Fernflower decompiler)
4
+//
5
+
6
+package com.unis.message.client;
7
+
8
+import com.unis.common.utils.ResponseWrapper;
9
+import com.unis.message.common.vo.notice.PortalNoticeVO;
10
+import io.swagger.annotations.ApiImplicitParam;
11
+import io.swagger.annotations.ApiImplicitParams;
12
+import io.swagger.annotations.ApiOperation;
13
+import org.springframework.cloud.openfeign.FeignClient;
14
+import org.springframework.stereotype.Component;
15
+import org.springframework.web.bind.annotation.PathVariable;
16
+import org.springframework.web.bind.annotation.RequestBody;
17
+import org.springframework.web.bind.annotation.RequestMapping;
18
+import org.springframework.web.bind.annotation.RequestMethod;
19
+import org.springframework.web.bind.annotation.RequestParam;
20
+
21
+@FeignClient(
22
+        name = "message-server"
23
+)
24
+@Component
25
+public interface NoticeFeign {
26
+    @ApiOperation(
27
+            value = "根据id查询通知公告",
28
+            notes = "参数:通知公告id"
29
+    )
30
+    @RequestMapping(
31
+            method = {RequestMethod.GET},
32
+            value = {"/notice/{id}/"}
33
+    )
34
+    ResponseWrapper findById(@PathVariable("id") String id);
35
+
36
+    @ApiOperation(
37
+            value = "保存通知公告",
38
+            notes = "参数:通知公告对象VO"
39
+    )
40
+    @RequestMapping(
41
+            method = {RequestMethod.POST},
42
+            value = {"/notice/"}
43
+    )
44
+    ResponseWrapper save(@RequestBody PortalNoticeVO VO);
45
+
46
+    @ApiOperation(
47
+            value = "更新通知公告",
48
+            notes = "参数:通知公告VO"
49
+    )
50
+    @RequestMapping(
51
+            method = {RequestMethod.PUT},
52
+            value = {"/notice/"}
53
+    )
54
+    ResponseWrapper update(@RequestBody PortalNoticeVO VO, @RequestParam(value = "code") String code);
55
+
56
+    @ApiOperation(
57
+            value = "删除通知公告",
58
+            notes = "参数:通知公告id(可传入多个),操作用户id"
59
+    )
60
+    @RequestMapping(
61
+            method = {RequestMethod.DELETE},
62
+            value = {"/notices"}
63
+    )
64
+    ResponseWrapper deletes(@RequestBody String[] ids, @RequestParam(value = "userId") String userId);
65
+
66
+    @ApiOperation(
67
+            value = "管理端:分页查询所有通知公告",
68
+            notes = "参数:PortalNoticeVO、当前页、页面大小"
69
+    )
70
+    @ApiImplicitParams({@ApiImplicitParam(
71
+            name = "page",
72
+            value = "起始页",
73
+            required = true
74
+    ), @ApiImplicitParam(
75
+            name = "size",
76
+            value = "每页展示行数",
77
+            required = true
78
+    )})
79
+    @RequestMapping(
80
+            method = {RequestMethod.POST},
81
+            value = {"/noticesPage/manager"}
82
+    )
83
+    ResponseWrapper findByPageManager(@RequestBody PortalNoticeVO VO, @RequestParam(value = "page") Integer page, @RequestParam(value = "size") Integer size);
84
+
85
+    @ApiOperation(
86
+            value = "用户端:分页查询所有通知公告",
87
+            notes = "参数:PortalNoticeVO、当前页、页面大小"
88
+    )
89
+    @ApiImplicitParams({@ApiImplicitParam(
90
+            name = "page",
91
+            value = "起始页",
92
+            required = true
93
+    ), @ApiImplicitParam(
94
+            name = "size",
95
+            value = "每页展示行数",
96
+            required = true
97
+    )})
98
+    @RequestMapping(
99
+            method = {RequestMethod.POST},
100
+            value = {"/noticesPage/user"}
101
+    )
102
+    ResponseWrapper findByPageUser(@RequestBody PortalNoticeVO VO, @RequestParam (value = "page")Integer page, @RequestParam(value = "size") Integer size);
103
+
104
+    @ApiOperation(
105
+            value = "用户端:不分页查询所有通知公告",
106
+            notes = "参数:PortalNoticeVO"
107
+    )
108
+    @RequestMapping(
109
+            method = {RequestMethod.POST},
110
+            value = {"/notice/user"}
111
+    )
112
+    ResponseWrapper findByUser(@RequestBody PortalNoticeVO VO);
113
+
114
+    @ApiOperation(
115
+            value = "获取用户通知公告数量",
116
+            notes = "参数:当前登陆用户userId"
117
+    )
118
+    @RequestMapping(
119
+            method = {RequestMethod.GET},
120
+            value = {"/notice/"}
121
+    )
122
+    ResponseWrapper getNoticeNum(@PathVariable("id") String id);
123
+}

+ 115 - 0
message-common/src/main/java/com/unis/message/common/vo/BaseVO.java

@@ -0,0 +1,115 @@
1
+//
2
+// Source code recreated from a .class file by IntelliJ IDEA
3
+// (powered by Fernflower decompiler)
4
+//
5
+
6
+package com.unis.message.common.vo;
7
+
8
+import io.swagger.annotations.ApiModelProperty;
9
+import java.util.Date;
10
+
11
+public abstract class BaseVO {
12
+    @ApiModelProperty("id,自动生成")
13
+    private String id;
14
+    @ApiModelProperty("创建时间")
15
+    private Date createTime;
16
+    @ApiModelProperty("创建人")
17
+    private String createBy;
18
+    @ApiModelProperty("更新时间")
19
+    private Date updateTime;
20
+    @ApiModelProperty("更新人")
21
+    private String updateBy;
22
+    @ApiModelProperty("删除时间")
23
+    private Date deleteTime;
24
+    @ApiModelProperty("删除人")
25
+    private String deleteBy;
26
+    @ApiModelProperty("机构id(新增时需传当前用户的orgCode)")
27
+    private String orgId;
28
+    @ApiModelProperty("部门id(新增时需传当前用户的deptCode)")
29
+    private String deptId;
30
+    @ApiModelProperty("当前登陆用户的code(增删改查时的操作记录人)")
31
+    private String userId;
32
+
33
+    public BaseVO() {
34
+    }
35
+
36
+    public String getId() {
37
+        return this.id;
38
+    }
39
+
40
+    public Date getCreateTime() {
41
+        return this.createTime;
42
+    }
43
+
44
+    public String getCreateBy() {
45
+        return this.createBy;
46
+    }
47
+
48
+    public Date getUpdateTime() {
49
+        return this.updateTime;
50
+    }
51
+
52
+    public String getUpdateBy() {
53
+        return this.updateBy;
54
+    }
55
+
56
+    public Date getDeleteTime() {
57
+        return this.deleteTime;
58
+    }
59
+
60
+    public String getDeleteBy() {
61
+        return this.deleteBy;
62
+    }
63
+
64
+    public String getOrgId() {
65
+        return this.orgId;
66
+    }
67
+
68
+    public String getDeptId() {
69
+        return this.deptId;
70
+    }
71
+
72
+    public String getUserId() {
73
+        return this.userId;
74
+    }
75
+
76
+    public void setId(final String id) {
77
+        this.id = id;
78
+    }
79
+
80
+    public void setCreateTime(final Date createTime) {
81
+        this.createTime = createTime;
82
+    }
83
+
84
+    public void setCreateBy(final String createBy) {
85
+        this.createBy = createBy;
86
+    }
87
+
88
+    public void setUpdateTime(final Date updateTime) {
89
+        this.updateTime = updateTime;
90
+    }
91
+
92
+    public void setUpdateBy(final String updateBy) {
93
+        this.updateBy = updateBy;
94
+    }
95
+
96
+    public void setDeleteTime(final Date deleteTime) {
97
+        this.deleteTime = deleteTime;
98
+    }
99
+
100
+    public void setDeleteBy(final String deleteBy) {
101
+        this.deleteBy = deleteBy;
102
+    }
103
+
104
+    public void setOrgId(final String orgId) {
105
+        this.orgId = orgId;
106
+    }
107
+
108
+    public void setDeptId(final String deptId) {
109
+        this.deptId = deptId;
110
+    }
111
+
112
+    public void setUserId(final String userId) {
113
+        this.userId = userId;
114
+    }
115
+}

+ 137 - 0
message-common/src/main/java/com/unis/message/common/vo/notice/PortalNoticeUserVO.java

@@ -0,0 +1,137 @@
1
+//
2
+// Source code recreated from a .class file by IntelliJ IDEA
3
+// (powered by Fernflower decompiler)
4
+//
5
+
6
+package com.unis.message.common.vo.notice;
7
+
8
+import com.unis.message.common.vo.BaseVO;
9
+import io.swagger.annotations.ApiModel;
10
+import io.swagger.annotations.ApiModelProperty;
11
+
12
+@ApiModel(
13
+        value = "信息--通知公告与用户关联表",
14
+        description = "信息--通知公告与用户关联表"
15
+)
16
+public class PortalNoticeUserVO extends BaseVO {
17
+    @ApiModelProperty("自动生成的唯一标识")
18
+    private String id;
19
+    @ApiModelProperty(
20
+            value = "信息表唯一标识",
21
+            required = true
22
+    )
23
+    private String msgId;
24
+    @ApiModelProperty(
25
+            value = "用户表唯一标识",
26
+            required = true
27
+    )
28
+    private String userId;
29
+    @ApiModelProperty(
30
+            value = "信息状态 0:未读, 1:已读",
31
+            required = true
32
+    )
33
+    private String msgStatus;
34
+
35
+    public PortalNoticeUserVO() {
36
+    }
37
+
38
+    public String getId() {
39
+        return this.id;
40
+    }
41
+
42
+    public String getMsgId() {
43
+        return this.msgId;
44
+    }
45
+
46
+    public String getUserId() {
47
+        return this.userId;
48
+    }
49
+
50
+    public String getMsgStatus() {
51
+        return this.msgStatus;
52
+    }
53
+
54
+    public void setId(final String id) {
55
+        this.id = id;
56
+    }
57
+
58
+    public void setMsgId(final String msgId) {
59
+        this.msgId = msgId;
60
+    }
61
+
62
+    public void setUserId(final String userId) {
63
+        this.userId = userId;
64
+    }
65
+
66
+    public void setMsgStatus(final String msgStatus) {
67
+        this.msgStatus = msgStatus;
68
+    }
69
+
70
+    public boolean equals(final Object o) {
71
+        if (o == this) {
72
+            return true;
73
+        } else if (!(o instanceof PortalNoticeUserVO)) {
74
+            return false;
75
+        } else {
76
+            PortalNoticeUserVO other = (PortalNoticeUserVO)o;
77
+            if (!other.canEqual(this)) {
78
+                return false;
79
+            } else {
80
+                label59: {
81
+                    Object this$id = this.getId();
82
+                    Object other$id = other.getId();
83
+                    if (this$id == null) {
84
+                        if (other$id == null) {
85
+                            break label59;
86
+                        }
87
+                    } else if (this$id.equals(other$id)) {
88
+                        break label59;
89
+                    }
90
+
91
+                    return false;
92
+                }
93
+
94
+                Object this$msgId = this.getMsgId();
95
+                Object other$msgId = other.getMsgId();
96
+                if (this$msgId == null) {
97
+                    if (other$msgId != null) {
98
+                        return false;
99
+                    }
100
+                } else if (!this$msgId.equals(other$msgId)) {
101
+                    return false;
102
+                }
103
+
104
+                Object this$userId = this.getUserId();
105
+                Object other$userId = other.getUserId();
106
+                if (this$userId == null) {
107
+                    if (other$userId != null) {
108
+                        return false;
109
+                    }
110
+                } else if (!this$userId.equals(other$userId)) {
111
+                    return false;
112
+                }
113
+
114
+                Object this$msgStatus = this.getMsgStatus();
115
+                Object other$msgStatus = other.getMsgStatus();
116
+                if (this$msgStatus == null) {
117
+                    if (other$msgStatus != null) {
118
+                        return false;
119
+                    }
120
+                } else if (!this$msgStatus.equals(other$msgStatus)) {
121
+                    return false;
122
+                }
123
+
124
+                return true;
125
+            }
126
+        }
127
+    }
128
+
129
+    protected boolean canEqual(final Object other) {
130
+        return other instanceof PortalNoticeUserVO;
131
+    }
132
+
133
+
134
+    public String toString() {
135
+        return "PortalNoticeUserVO(id=" + this.getId() + ", msgId=" + this.getMsgId() + ", userId=" + this.getUserId() + ", msgStatus=" + this.getMsgStatus() + ")";
136
+    }
137
+}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 344 - 0
message-common/src/main/java/com/unis/message/common/vo/notice/PortalNoticeVO.java


+ 2 - 0
message-server/message-server.iml

@@ -112,6 +112,8 @@
112 112
     <orderEntry type="library" name="Maven: com.gbase8s:ifxjdbc:1.0" level="project" />
113 113
     <orderEntry type="library" name="Maven: com.gbase:druid:1.0.28" level="project" />
114 114
     <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.3.2" level="project" />
115
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.18" level="project" />
116
+    <orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.6.1" level="project" />
115 117
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.0" level="project" />
116 118
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:3.0.0" level="project" />
117 119
     <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.11" level="project" />

+ 5 - 1
message-server/pom.xml

@@ -44,7 +44,11 @@
44 44
 			<artifactId>hutool-all</artifactId>
45 45
 			<version>5.3.2</version>
46 46
 		</dependency>
47
-		
47
+		<dependency>
48
+			<groupId>mysql</groupId>
49
+			<artifactId>mysql-connector-java</artifactId>
50
+			<version>8.0.18</version>
51
+		</dependency>
48 52
 		   <!-- ojdbc7数据源 -->
49 53
         <!-- <dependency>
50 54
             <groupId>cn.easyproject</groupId>

+ 51 - 14
message-server/src/main/resources/bootstrap.yml

@@ -1,30 +1,67 @@
1 1
 server:
2 2
   port: 13900
3 3
 spring:
4
+  jpa:
5
+    open-in-view: true
6
+    database: mysql
7
+    show-sql: true
8
+    properties:
9
+      hibernate:
10
+        dialect: org.hibernate.dialect.MySQLDialect
4 11
   application:
5 12
     name: message
6
-  #配置中心配置
7
-  cloud:
8
-    config:
9
-      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
10
-      discovery:
13
+  devtools:
14
+    restart:
15
+      enabled: false
16
+  datasource:
17
+    type: com.alibaba.druid.pool.DruidDataSource
18
+    url: jdbc:mysql://101.36.160.140:10311/message?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2b8
19
+    username: root
20
+    password: admin@1234
21
+    driver-class-name: com.mysql.cj.jdbc.Driver
22
+    druid:
23
+#db-type: mysql
24
+      initial-size: 5
25
+      max-active: 30
26
+      min-idle: 5
27
+      max-wait: 60000
28
+      pool-prepared-statements: true
29
+      max-pool-prepared-statement-per-connection-size: 30
30
+      validation-query: SELECT 1 FROM DUAL
31
+      test-on-borrow: false
32
+      test-on-return: false
33
+      test-while-idle: true
34
+      time-between-connect-error-millis: 60000
35
+      min-evictable-idle-time-millis: 300000
36
+      max-evictable-idle-time-millis: 3000000
37
+      filters: stat,wall
38
+      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
39
+      use-global-data-source-stat: true
40
+      web-stat-filter:
41
+        url-pattern: /*
42
+        exclusions: /druid/*,*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico
11 43
         enabled: true
12
-        service-id: config
13
-      name: gbase8s-message,initdata,feign,redis,mq-msg
14
-      profile: dev
15
-      username: configuser
16
-      password: configpasd
17
-      retry:
18
-        max-attempts: 5
19
-        max-interval: 2000
44
+        session-stat-enable: true
45
+        session-stat-max-count: 10
46
+      stat-view-servlet:
47
+        url-pattern: /druid/*
48
+        reset-enable: true
49
+        login-username: druid
50
+        login-password: druid
20 51
       #如果出现错误立刻停止服务。
21 52
       #fail-fast: true
53
+mybatis:
54
+  configuration:
55
+    map-underscore-to-camel-case: true
56
+  type-aliases-package: com.unis.ynls.irpt.server.entity
57
+  mapper-locations:
58
+    - classpath:mybatis/mapper/*.xml
22 59
 #服务注册配置
23 60
 eureka:
24 61
   client:
25 62
     service-url:
26 63
 #      defaultZone: http://eureka-server:11000/eureka/
27
-       defaultZone: http://172.16.0.73:11000/eureka/
64
+      defaultZone: http://172.16.0.4:11000/eureka/
28 65
   instance:
29 66
     prefer-ip-address: true
30 67
     status-page-url-path: /swagger-ui.html

+ 39 - 0
message-server/src/main/resources/bootstrapback.yml

@@ -0,0 +1,39 @@
1
+server:
2
+  port: 13900
3
+spring:
4
+  application:
5
+    name: message
6
+  #配置中心配置
7
+  cloud:
8
+    config:
9
+      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
10
+      discovery:
11
+        enabled: true
12
+        service-id: config
13
+      name: gbase8s-message,initdata,feign,redis,mq-msg
14
+      profile: dev
15
+      username: configuser
16
+      password: configpasd
17
+      retry:
18
+        max-attempts: 5
19
+        max-interval: 2000
20
+      #如果出现错误立刻停止服务。
21
+      #fail-fast: true
22
+#服务注册配置
23
+eureka:
24
+  client:
25
+    service-url:
26
+#      defaultZone: http://eureka-server:11000/eureka/
27
+       defaultZone: http://172.16.0.73:11000/eureka/
28
+  instance:
29
+    prefer-ip-address: true
30
+    status-page-url-path: /swagger-ui.html
31
+#日志配置
32
+logging:
33
+  level:
34
+    com.unis: debug
35
+    root: warn
36
+    org.springframework.web: debug
37
+    org.hibernate: error
38
+    com.unis.demo.controller: info
39
+  path: ./log/