diff --git a/common/src/main/java/com/ccsens/common/bean/dto/CRoleDto.java b/common/src/main/java/com/ccsens/common/bean/dto/CRoleDto.java index fb4c684d..82ddb09b 100644 --- a/common/src/main/java/com/ccsens/common/bean/dto/CRoleDto.java +++ b/common/src/main/java/com/ccsens/common/bean/dto/CRoleDto.java @@ -15,6 +15,8 @@ public class CRoleDto { @NotNull(message = "项目id不能为空") @ApiModelProperty("项目id") private Long projectId; + @ApiModelProperty("展示的角色数量") + private int num = 5; } @Data diff --git a/common/src/main/java/com/ccsens/common/service/ProRoleService.java b/common/src/main/java/com/ccsens/common/service/ProRoleService.java index b71f5da7..29b31b99 100644 --- a/common/src/main/java/com/ccsens/common/service/ProRoleService.java +++ b/common/src/main/java/com/ccsens/common/service/ProRoleService.java @@ -122,8 +122,15 @@ public class ProRoleService implements IProRoleService { visibleList.add(roleInfo); continue; } else { + //不是用户所属的角色,但展示角色列表数量不足设置的数量 + + //展示数量等于0,展示全部 + if(param.getNum() == 0){ + visibleList.add(roleInfo); + continue; + } //不是用户所属的角色,但展示角色列表数量不足五个, - if (visibleList.size() < 5) { + if (visibleList.size() < param.getNum()) { visibleList.add(roleInfo); continue; } diff --git a/common/src/main/resources/application-common.yml b/common/src/main/resources/application-common.yml index c27ac934..8a8888e5 100644 --- a/common/src/main/resources/application-common.yml +++ b/common/src/main/resources/application-common.yml @@ -1,28 +1,28 @@ -logging: - level: - com: - favorites: DEBUG - org: - hibernate: ERROR - springframework: - web: DEBUG -mybatis: - config-location: classpath:mybatis/mybatis-config.xml - mapper-locations: classpath*:mapper_*/*.xml - type-aliases-package: com.ccsens.ht.bean -server: - tomcat: - uri-encoding: UTF-8 -spring: - http: - encoding: - charset: UTF-8 - enabled: true - force: true - log-request-details: true - servlet: - multipart: - max-file-size: 10MB - max-request-size: 100MB - - +#logging: +# level: +# com: +# favorites: DEBUG +# org: +# hibernate: ERROR +# springframework: +# web: DEBUG +#mybatis: +# config-location: classpath:mybatis/mybatis-config.xml +# mapper-locations: classpath*:mapper_*/*.xml +# type-aliases-package: com.ccsens.ht.bean +#server: +# tomcat: +# uri-encoding: UTF-8 +#spring: +# http: +# encoding: +# charset: UTF-8 +# enabled: true +# force: true +# log-request-details: true +# servlet: +# multipart: +# max-file-size: 10MB +# max-request-size: 100MB +# +# diff --git a/common/src/main/resources/application-dev.yml b/common/src/main/resources/application-dev.yml index 217a06ea..c58804b5 100644 --- a/common/src/main/resources/application-dev.yml +++ b/common/src/main/resources/application-dev.yml @@ -1,52 +1,52 @@ -server: - port: 7200 - servlet: - context-path: -spring: - snowflake: - datacenterId: 1 - workerId: 1 - application: - name: common - datasource: - type: com.alibaba.druid.pool.DruidDataSource - rabbitmq: - host: 192.168.0.99 - password: 111111 - port: 5672 - username: admin - redis: - database: 0 - host: 127.0.0.1 - jedis: - pool: - max-active: 200 - max-idle: 10 - max-wait: -1ms - min-idle: 0 - password: '' - port: 6379 - timeout: 1000ms -swagger: - enable: true -mybatisCache: - database: 1 - host: 127.0.0.1 - jedis: - pool: - max-active: 200 - max-idle: 10 - max-wait: -1 - min-idle: 0 - password: '' - port: 6379 - timeout: 1000 - -gatewayUrl: https://test.tall.wiki/gateway/ -notGatewayUrl: /home/staticrec/logo.png -smsCode: 0 - -file: - path: /home/cloud/common/uploads/ - domain: http://localhost:7030/v1.0/ - imgDomain: http://localhost:7030/v1.0/uploads \ No newline at end of file +#server: +# port: 7200 +# servlet: +# context-path: +#spring: +# snowflake: +# datacenterId: 1 +# workerId: 1 +# application: +# name: common +# datasource: +# type: com.alibaba.druid.pool.DruidDataSource +# rabbitmq: +# host: 192.168.0.99 +# password: 111111 +# port: 5672 +# username: admin +# redis: +# database: 0 +# host: 127.0.0.1 +# jedis: +# pool: +# max-active: 200 +# max-idle: 10 +# max-wait: -1ms +# min-idle: 0 +# password: '' +# port: 6379 +# timeout: 1000ms +#swagger: +# enable: true +#mybatisCache: +# database: 1 +# host: 127.0.0.1 +# jedis: +# pool: +# max-active: 200 +# max-idle: 10 +# max-wait: -1 +# min-idle: 0 +# password: '' +# port: 6379 +# timeout: 1000 +# +#gatewayUrl: https://test.tall.wiki/gateway/ +#notGatewayUrl: /home/staticrec/logo.png +#smsCode: 0 +# +#file: +# path: /home/cloud/common/uploads/ +# domain: http://localhost:7030/v1.0/ +# imgDomain: http://localhost:7030/v1.0/uploads \ No newline at end of file diff --git a/common/src/main/resources/application-prod.yml b/common/src/main/resources/application-prod.yml index 112683a7..9513f28b 100644 --- a/common/src/main/resources/application-prod.yml +++ b/common/src/main/resources/application-prod.yml @@ -1,48 +1,48 @@ -server: - port: 7130 - servlet: - context-path: /v1.0 -spring: - snowflake: - datacenterId: 1 - workerId: 1 - application: - name: common - datasource: - type: com.alibaba.druid.pool.DruidDataSource - rabbitmq: - host: 127.0.0.1 - password: 111111 - port: 5672 - username: admin - redis: - database: 0 - host: 127.0.0.1 - jedis: - pool: - max-active: 200 - max-idle: 10 - max-wait: -1ms - min-idle: 0 -# password: '' - password: 'areowqr!@43ef' - port: 6379 - timeout: 1000ms -swagger: - enable: false -eureka: - instance: - # www.tall.wiki -# ip-address: 140.143.228.3 -# ip-address: 81.70.54.64 - ip-address: 121.36.3.207 - -gatewayUrl: https://www.tall.wiki/gateway/ -notGatewayUrl: https://www.tall.wiki/ -smsCode: 1 -wx: - prefixUrl: https://www.tall.wiki/wxconfigurer-api/ -file: - path: /home/cloud/common/uploads/ - domain: https://www.tall.wiki/gateway/common/v1.0/ - imgDomain: https://www.tall.wiki/gateway/common/v1.0/uploads \ No newline at end of file +#server: +# port: 7130 +# servlet: +# context-path: /v1.0 +#spring: +# snowflake: +# datacenterId: 1 +# workerId: 1 +# application: +# name: common +# datasource: +# type: com.alibaba.druid.pool.DruidDataSource +# rabbitmq: +# host: 127.0.0.1 +# password: 111111 +# port: 5672 +# username: admin +# redis: +# database: 0 +# host: 127.0.0.1 +# jedis: +# pool: +# max-active: 200 +# max-idle: 10 +# max-wait: -1ms +# min-idle: 0 +## password: '' +# password: 'areowqr!@43ef' +# port: 6379 +# timeout: 1000ms +#swagger: +# enable: false +#eureka: +# instance: +# # www.tall.wiki +## ip-address: 140.143.228.3 +## ip-address: 81.70.54.64 +# ip-address: 121.36.3.207 +# +#gatewayUrl: https://www.tall.wiki/gateway/ +#notGatewayUrl: https://www.tall.wiki/ +#smsCode: 1 +#wx: +# prefixUrl: https://www.tall.wiki/wxconfigurer-api/ +#file: +# path: /home/cloud/common/uploads/ +# domain: https://www.tall.wiki/gateway/common/v1.0/ +# imgDomain: https://www.tall.wiki/gateway/common/v1.0/uploads \ No newline at end of file diff --git a/common/src/main/resources/application-test.yml b/common/src/main/resources/application-test.yml index 7d15edd9..89a6f68c 100644 --- a/common/src/main/resources/application-test.yml +++ b/common/src/main/resources/application-test.yml @@ -1,51 +1,51 @@ -server: - port: 7130 - servlet: - context-path: /v1.0 -spring: - snowflake: - datacenterId: 1 - workerId: 1 - application: - name: common - datasource: - type: com.alibaba.druid.pool.DruidDataSource - rabbitmq: - host: 127.0.0.1 -# host: api.ccsens.com - password: 111111 - port: 5672 - username: admin - redis: - database: 0 - host: 127.0.0.1 - jedis: - pool: - max-active: 200 - max-idle: 10 - max-wait: -1ms - min-idle: 0 - password: '' - port: 6379 - timeout: 1000ms -swagger: - enable: true -eureka: - instance: - ip-address: 192.168.0.99 -# ip-address: 49.233.89.188 -#gatewayUrl: http://192.168.0.99/gateway/ -#notGatewayUrl: http://192.168.0.99/ -gatewayUrl: https://test.tall.wiki/gateway/ -notGatewayUrl: https://test.tall.wiki/ -smsCode: 0 -wx: - prefixUrl: https://www.tall.wiki/wxconfigurer-api/ -file: - path: /home/cloud/common/uploads/ - domain: https://test.tall.wiki/gateway/common - imgDomain: https://test.tall.wiki/gateway/common/uploads - +#server: +# port: 7130 +# servlet: +# context-path: /v1.0 +#spring: +# snowflake: +# datacenterId: 1 +# workerId: 1 +# application: +# name: common +# datasource: +# type: com.alibaba.druid.pool.DruidDataSource +# rabbitmq: +# host: 127.0.0.1 +## host: api.ccsens.com +# password: 111111 +# port: 5672 +# username: admin +# redis: +# database: 0 +# host: 127.0.0.1 +# jedis: +# pool: +# max-active: 200 +# max-idle: 10 +# max-wait: -1ms +# min-idle: 0 +# password: '' +# port: 6379 +# timeout: 1000ms +#swagger: +# enable: true +#eureka: +# instance: +# ip-address: 192.168.0.99 +## ip-address: 49.233.89.188 +##gatewayUrl: http://192.168.0.99/gateway/ +##notGatewayUrl: http://192.168.0.99/ +#gatewayUrl: https://test.tall.wiki/gateway/ +#notGatewayUrl: https://test.tall.wiki/ +#smsCode: 0 +#wx: +# prefixUrl: https://www.tall.wiki/wxconfigurer-api/ #file: -# domain: http://192.168.0.99/gateway/tall/v1.0/ -# imgDomain: http://192.168.0.99/gateway/tall/v1.0/uploads \ No newline at end of file +# path: /home/cloud/common/uploads/ +# domain: https://test.tall.wiki/gateway/common +# imgDomain: https://test.tall.wiki/gateway/common/uploads +# +##file: +## domain: http://192.168.0.99/gateway/tall/v1.0/ +## imgDomain: http://192.168.0.99/gateway/tall/v1.0/uploads \ No newline at end of file diff --git a/common/src/main/resources/application.yml b/common/src/main/resources/application.yml index 1d881c2f..b110a3d9 100644 --- a/common/src/main/resources/application.yml +++ b/common/src/main/resources/application.yml @@ -1,4 +1,4 @@ -spring: - profiles: - active: dev - include: util-dev,common \ No newline at end of file +#spring: +# profiles: +# active: dev +# include: util-dev,common \ No newline at end of file diff --git a/common/src/main/resources/druid-dev.yml b/common/src/main/resources/druid-dev.yml index bc14a1a7..86a5d824 100644 --- a/common/src/main/resources/druid-dev.yml +++ b/common/src/main/resources/druid-dev.yml @@ -1,35 +1,35 @@ -spring: - datasource: - druid: - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 - driverClassName: com.mysql.cj.jdbc.Driver - dynamicUrl: jdbc:mysql://localhost:3306/${schema} - filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - filterName: druidFilter - filterProfileEnable: true - filterUrlPattern: /* - filters: stat,wall - initialSize: 5 - maxActive: 20 - maxPoolPreparedStatementPerConnectionSize: 20 - maxWait: 60000 - minEvictableIdleTimeMillis: 300000 - minIdle: 5 - password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 - poolPreparedStatements: true - servletLogSlowSql: true - servletLoginPassword: 111111 - servletLoginUsername: druid - servletName: druidServlet - servletResetEnable: true - servletUrlMapping: /druid/* - testOnBorrow: false - testOnReturn: false - testWhileIdle: true - timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://49.233.89.188:3306/defaultwbs?useUnicode=true&characterEncoding=UTF-8 -# url: jdbc:mysql://49.233.89.188:3306/defaultwbs?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true -# url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true - username: root - validationQuery: SELECT 1 FROM DUAL - env: CCSENS_TALL \ No newline at end of file +#spring: +# datasource: +# druid: +# connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 +# driverClassName: com.mysql.cj.jdbc.Driver +# dynamicUrl: jdbc:mysql://localhost:3306/${schema} +# filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' +# filterName: druidFilter +# filterProfileEnable: true +# filterUrlPattern: /* +# filters: stat,wall +# initialSize: 5 +# maxActive: 20 +# maxPoolPreparedStatementPerConnectionSize: 20 +# maxWait: 60000 +# minEvictableIdleTimeMillis: 300000 +# minIdle: 5 +# password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 +# poolPreparedStatements: true +# servletLogSlowSql: true +# servletLoginPassword: 111111 +# servletLoginUsername: druid +# servletName: druidServlet +# servletResetEnable: true +# servletUrlMapping: /druid/* +# testOnBorrow: false +# testOnReturn: false +# testWhileIdle: true +# timeBetweenEvictionRunsMillis: 60000 +# url: jdbc:mysql://49.233.89.188:3306/defaultwbs?useUnicode=true&characterEncoding=UTF-8 +## url: jdbc:mysql://49.233.89.188:3306/defaultwbs?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true +## url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true +# username: root +# validationQuery: SELECT 1 FROM DUAL +# env: CCSENS_TALL \ No newline at end of file diff --git a/common/src/main/resources/druid-prod.yml b/common/src/main/resources/druid-prod.yml index c50d2fa7..256ab20f 100644 --- a/common/src/main/resources/druid-prod.yml +++ b/common/src/main/resources/druid-prod.yml @@ -1,34 +1,34 @@ -spring: - datasource: - druid: - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 - driverClassName: com.mysql.cj.jdbc.Driver - dynamicUrl: jdbc:mysql://127.0.0.1:3306/${schema} - filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - filterName: druidFilter - filterProfileEnable: true - filterUrlPattern: /* - filters: stat,wall - initialSize: 5 - maxActive: 20 - maxPoolPreparedStatementPerConnectionSize: 20 - maxWait: 60000 - minEvictableIdleTimeMillis: 300000 - minIdle: 5 -# password: 7cdefb88e0b8c8a401b66a83ee0cf80387461268074d1c3dcb146ab485318633 - password: - poolPreparedStatements: true - servletLogSlowSql: true - servletLoginPassword: 111111 - servletLoginUsername: druid - servletName: druidServlet - servletResetEnable: true - servletUrlMapping: /druid/* - testOnBorrow: false - testOnReturn: false - testWhileIdle: true - timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true - username: root - validationQuery: SELECT 1 FROM DUAL - env: CCSENS_HEALTH \ No newline at end of file +#spring: +# datasource: +# druid: +# connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 +# driverClassName: com.mysql.cj.jdbc.Driver +# dynamicUrl: jdbc:mysql://127.0.0.1:3306/${schema} +# filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' +# filterName: druidFilter +# filterProfileEnable: true +# filterUrlPattern: /* +# filters: stat,wall +# initialSize: 5 +# maxActive: 20 +# maxPoolPreparedStatementPerConnectionSize: 20 +# maxWait: 60000 +# minEvictableIdleTimeMillis: 300000 +# minIdle: 5 +## password: 7cdefb88e0b8c8a401b66a83ee0cf80387461268074d1c3dcb146ab485318633 +# password: +# poolPreparedStatements: true +# servletLogSlowSql: true +# servletLoginPassword: 111111 +# servletLoginUsername: druid +# servletName: druidServlet +# servletResetEnable: true +# servletUrlMapping: /druid/* +# testOnBorrow: false +# testOnReturn: false +# testWhileIdle: true +# timeBetweenEvictionRunsMillis: 60000 +# url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true +# username: root +# validationQuery: SELECT 1 FROM DUAL +# env: CCSENS_HEALTH \ No newline at end of file diff --git a/common/src/main/resources/druid-test.yml b/common/src/main/resources/druid-test.yml index cebc5fa6..2a5b4419 100644 --- a/common/src/main/resources/druid-test.yml +++ b/common/src/main/resources/druid-test.yml @@ -1,35 +1,35 @@ -spring: - datasource: - druid: - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 - driverClassName: com.mysql.cj.jdbc.Driver - dynamicUrl: jdbc:mysql://localhost:3306/${schema} - filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - filterName: druidFilter - filterProfileEnable: true - filterUrlPattern: /* - filters: stat,wall - initialSize: 5 - maxActive: 20 - maxPoolPreparedStatementPerConnectionSize: 20 - maxWait: 60000 - minEvictableIdleTimeMillis: 300000 - minIdle: 5 -# password: - password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 - poolPreparedStatements: true - servletLogSlowSql: true - servletLoginPassword: 111111 - servletLoginUsername: druid - servletName: druidServlet - servletResetEnable: true - servletUrlMapping: /druid/* - testOnBorrow: false - testOnReturn: false - testWhileIdle: true - timeBetweenEvictionRunsMillis: 60000 -# url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8 - url: jdbc:mysql://test.tall.wiki/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true - username: root - validationQuery: SELECT 1 FROM DUAL - env: CCSENS_TALL \ No newline at end of file +#spring: +# datasource: +# druid: +# connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 +# driverClassName: com.mysql.cj.jdbc.Driver +# dynamicUrl: jdbc:mysql://localhost:3306/${schema} +# filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' +# filterName: druidFilter +# filterProfileEnable: true +# filterUrlPattern: /* +# filters: stat,wall +# initialSize: 5 +# maxActive: 20 +# maxPoolPreparedStatementPerConnectionSize: 20 +# maxWait: 60000 +# minEvictableIdleTimeMillis: 300000 +# minIdle: 5 +## password: +# password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 +# poolPreparedStatements: true +# servletLogSlowSql: true +# servletLoginPassword: 111111 +# servletLoginUsername: druid +# servletName: druidServlet +# servletResetEnable: true +# servletUrlMapping: /druid/* +# testOnBorrow: false +# testOnReturn: false +# testWhileIdle: true +# timeBetweenEvictionRunsMillis: 60000 +## url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8 +# url: jdbc:mysql://test.tall.wiki/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true +# username: root +# validationQuery: SELECT 1 FROM DUAL +# env: CCSENS_TALL \ No newline at end of file diff --git a/common/src/main/resources/logback-spring.xml b/common/src/main/resources/logback-spring.xml index 0e29be06..f76392cd 100644 --- a/common/src/main/resources/logback-spring.xml +++ b/common/src/main/resources/logback-spring.xml @@ -1,196 +1,196 @@ - - - - - - - - - - logback - - - - - - - - - - - - - - - - - info - - - ${CONSOLE_LOG_PATTERN} - - UTF-8 - - - - - - - - - - ${log.path}/log_debug.log - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - UTF-8 - - - - - ${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log - - 100MB - - - 15 - - - - debug - ACCEPT - DENY - - - - - - - ${log.path}/log_info.log - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - UTF-8 - - - - - ${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log - - 100MB - - - 15 - - - - info - ACCEPT - DENY - - - - - - - ${log.path}/log_warn.log - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - UTF-8 - - - - ${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log - - 100MB - - - 15 - - - - warn - ACCEPT - DENY - - - - - - - - ${log.path}/log_error.log - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - UTF-8 - - - - ${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log - - 100MB - - - 15 - - - - ERROR - ACCEPT - DENY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/signin/src/main/resources/application.yml b/signin/src/main/resources/application.yml index b5408a3a..ebc544af 100644 --- a/signin/src/main/resources/application.yml +++ b/signin/src/main/resources/application.yml @@ -1,5 +1,5 @@ spring: profiles: - active: dev - include: util-dev,common + active: test + include: util-test,common