Commit 4393a5da authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/develop' into develop

parents 76f7f3e1 11fa2dbd
......@@ -258,7 +258,7 @@
<profiles.active>dev</profiles.active>
<!-- 天翼云-->
<my.hub.host>hub.yifucenter.com:5500</my.hub.host>
<map.group.name>dev-mvp</map.group.name>
<map.group.name>qas-mvp</map.group.name>
<!-- 众多参数配置 -->
</properties>
</profile>
......
spring:
config:
#import:
# - classpath: application-test.yml
activate:
on-profile: dev
mvc:
pathmatch:
matching-strategy: ant_path_matcher
redis:
host: 127.0.0.1
password: '@yf_2017'
cloud:
sentinel:
eager: true
transport:
dashboard: yifu-sentinel:5003
# 数据源
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
freemarker:
allow-request-override: false
allow-session-override: false
cache: true
charset: UTF-8
check-template-location: true
content-type: text/html
enabled: true
expose-request-attributes: false
expose-session-attributes: false
expose-spring-macro-helpers: true
prefer-file-system-access: true
suffix: .ftl
template-loader-path: classpath:/templates/
spring:
config:
#import:
# - classpath: application-test.yml
activate:
on-profile: test
mvc:
pathmatch:
matching-strategy: ant_path_matcher
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
cloud:
sentinel:
eager: true
transport:
dashboard: yifu-sentinel:5003
# 数据源
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
#url: jdbc:mysql://127.0.0.1:3306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
freemarker:
allow-request-override: false
allow-session-override: false
cache: true
charset: UTF-8
check-template-location: true
content-type: text/html
enabled: true
expose-request-attributes: false
expose-session-attributes: false
expose-spring-macro-helpers: true
prefer-file-system-access: true
suffix: .ftl
template-loader-path: classpath:/templates/
\ No newline at end of file
......@@ -52,84 +52,3 @@ security:
spring:
application:
name: @artifactId@
\ No newline at end of file
---
spring:
config:
#import:
# - classpath: application-test.yml
activate:
on-profile: test
mvc:
pathmatch:
matching-strategy: ant_path_matcher
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
cloud:
sentinel:
eager: true
transport:
dashboard: yifu-sentinel:5003
# 数据源
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
#url: jdbc:mysql://127.0.0.1:3306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
freemarker:
allow-request-override: false
allow-session-override: false
cache: true
charset: UTF-8
check-template-location: true
content-type: text/html
enabled: true
expose-request-attributes: false
expose-session-attributes: false
expose-spring-macro-helpers: true
prefer-file-system-access: true
suffix: .ftl
template-loader-path: classpath:/templates/
---
spring:
config:
#import:
# - classpath: application-test.yml
activate:
on-profile: dev
mvc:
pathmatch:
matching-strategy: ant_path_matcher
redis:
host: 127.0.0.1
password: '@yf_2017'
cloud:
sentinel:
eager: true
transport:
dashboard: yifu-sentinel:5003
# 数据源
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
freemarker:
allow-request-override: false
allow-session-override: false
cache: true
charset: UTF-8
check-template-location: true
content-type: text/html
enabled: true
expose-request-attributes: false
expose-session-attributes: false
expose-spring-macro-helpers: true
prefer-file-system-access: true
suffix: .ftl
template-loader-path: classpath:/templates/
......@@ -146,4 +146,9 @@ public interface ErrorCodes {
* 已存在对应编码的字典
*/
String SYS_DICT_ADD_TYPE_EXISTS = "sys.dict.add.type.exist";
/**
* 已存在对应值的字典项
*/
String SYS_DICT_ITEM_ADD_VALUE_EXIST = "sys.dict.item.add.value.exist";
}
......@@ -36,7 +36,7 @@ public class Common {
}
public static boolean isNotNull(String obj) {
if (null != obj || !"".equals(obj) || !"undefined".equals(obj)){
if (null != obj && !"".equals(obj) && !"undefined".equals(obj)){
return true;
}
return false;
......
......@@ -29,6 +29,7 @@ sys.dict.delete.system=\u7CFB\u7EDF\u5185\u7F6E\u5B57\u5178\u9879\u76EE\u4E0D\u8
sys.dict.update.system=\u7CFB\u7EDF\u5185\u7F6E\u5B57\u5178\u9879\u76EE\u4E0D\u80FD\u4FEE\u6539
sys.dict.delete.existing=\u5B57\u5178\u5B58\u5728\u4E0B\u7EA7\u8282\u70B9\u4E0D\u80FD\u5220\u9664
sys.dict.add.type.exist=\u5DF2\u5B58\u5728\u5BF9\u5E94\u7F16\u7801\u7684\u5B57\u5178
sys.dict.item.add.value.exist=\u5DF2\u5B58\u5728\u5BF9\u5E94\u503C\u7684\u5B57\u5178\u9879
sys.role.delete.system=\u7CFB\u7EDF\u5185\u7F6E\u89D2\u8272\u4E0D\u80FD\u5220\u9664
sys.role.update.system=\u7CFB\u7EDF\u5185\u7F6E\u89D2\u8272\u4E0D\u80FD\u4FEE\u6539
......
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.common.security.component;
import cn.hutool.core.util.ReUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import lombok.Getter;
import lombok.Setter;
......@@ -76,6 +77,11 @@ public class PermitAllUrlProperties implements InitializingBean, ApplicationCont
Optional.ofNullable(controller).ifPresent(inner -> info.getPatternsCondition().getPatterns()
.forEach(url -> urls.add(ReUtil.replaceAll(url.toString(), PATTERN, "*"))));
});
if (Common.isNotNull(urls)){
for (String url:urls){
log.info(url.toString());
}
}
}
@Override
......
......@@ -16,22 +16,15 @@
*/
package com.yifu.cloud.plus.v1.consumer.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.consumer.entity.Consumer;
import com.yifu.cloud.plus.v1.consumer.mapper.ConsumerMapper;
import com.yifu.cloud.plus.v1.consumer.service.ConsumerService;
import com.yifu.cloud.plus.v1.provider.entity.Provider;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprProviderProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.data.redis.support.collections.RedisStore;
import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -53,7 +46,7 @@ public class ConsumerServiceImpl extends ServiceImpl<ConsumerMapper, Consumer> i
@Transactional
@Override
public Boolean saveTestSeata(Consumer consumer) {
Provider provider = new Provider();
/*Provider provider = new Provider();
provider.setNicename(consumer.getNicename());
provider.setUsername(consumer.getUsername());
provider.setCreateBy(consumer.getCreateBy());
......@@ -62,7 +55,7 @@ public class ConsumerServiceImpl extends ServiceImpl<ConsumerMapper, Consumer> i
provider.setUpdateTime(consumer.getUpdateTime());
R result = HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(), "/provider", provider, Provider.class,null);
baseMapper.insert(consumer);
baseMapper.insert(consumer);*/
return true;
}
}
# 数据源配置
spring:
redis:
host: 127.0.0.1
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_job?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
config:
activate:
on-profile: dev
# 数据源配置
spring:
redis:
host: 127.0.0.1
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_job?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
config:
activate:
on-profile: test
\ No newline at end of file
......@@ -80,36 +80,3 @@ springdoc:
- group: job
#按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.job.controller
\ No newline at end of file
---
# 数据源配置
spring:
redis:
host: 127.0.0.1
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_job?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
config:
activate:
on-profile: test
---
# 数据源配置
spring:
redis:
host: 127.0.0.1
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_job?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
config:
activate:
on-profile: dev
......@@ -180,6 +180,14 @@ public class DictController {
@PostMapping("/item")
@CacheEvict(value = CacheConstants.DICT_DETAILS, allEntries = true)
public R<Boolean> save(@RequestBody SysDictItem sysDictItem) {
SysDictItem item = sysDictItemService.getOne(Wrappers.<SysDictItem>query().lambda()
.eq(SysDictItem::getType,sysDictItem.getType())
.eq(SysDictItem::getValue,sysDictItem.getValue())
.eq(SysDictItem::getDelFlag,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(item)){
return R.failed(MsgUtils.getMessage(ErrorCodes.SYS_DICT_ITEM_ADD_VALUE_EXIST));
}
return R.ok(sysDictItemService.save(sysDictItem));
}
......@@ -191,6 +199,15 @@ public class DictController {
@SysLog("修改字典项")
@PutMapping("/item")
public R updateById(@RequestBody SysDictItem sysDictItem) {
SysDictItem item = sysDictItemService.getOne(Wrappers.<SysDictItem>query().lambda()
.eq(SysDictItem::getType,sysDictItem.getType())
.ne(SysDictItem::getId,sysDictItem.getDictId())
.eq(SysDictItem::getValue,sysDictItem.getValue())
.eq(SysDictItem::getDelFlag,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(item)){
return R.failed(MsgUtils.getMessage(ErrorCodes.SYS_DICT_ITEM_ADD_VALUE_EXIST));
}
return R.ok(sysDictItemService.updateDictItem(sysDictItem));
}
......
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: dev
redis:
host: 127.0.0.1
port: 6379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: test
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
#url: jdbc:mysql://127.0.0.1:3306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
\ No newline at end of file
......@@ -96,44 +96,3 @@ springdoc:
- group: upms
#按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.yifu.admin.controller
---
spring:
config:
activate:
on-profile: test
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
#url: jdbc:mysql://127.0.0.1:3306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
---
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: dev
redis:
host: 127.0.0.1
port: 6379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
......@@ -63,11 +63,6 @@
</filter>
</appender>
<!--nacos 心跳 INFO 屏蔽-->
<logger name="com.alibaba.nacos" level="OFF">
<appender-ref ref="error"/>
</logger>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="INFO">
<appender-ref ref="console"/>
......
# 数据源配置
spring:
config:
activate:
on-profile: dev
redis:
host: 127.0.0.1
port: 6379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_codegen?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
web:
resources:
static-locations: classpath:/static/,classpath:/views/
# 数据源配置
spring:
config:
activate:
on-profile: test
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_codegen?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
web:
resources:
static-locations: classpath:/static/,classpath:/views/
\ No newline at end of file
......@@ -41,43 +41,3 @@ springdoc:
- group: codegen
#按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.yifu.codegen.controller
\ No newline at end of file
---
# 数据源配置
spring:
config:
activate:
on-profile: test
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_codegen?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
web:
resources:
static-locations: classpath:/static/,classpath:/views/
---
# 数据源配置
spring:
config:
activate:
on-profile: dev
redis:
host: 127.0.0.1
port: 6379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_codegen?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
web:
resources:
static-locations: classpath:/static/,classpath:/views/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment