改为单服务应用
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/.idea/
|
||||
**/debug/
|
||||
**/target/
|
||||
**/.idea/
|
||||
**/logs/
|
||||
16
pom.xml
16
pom.xml
@@ -27,15 +27,15 @@
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-openfeign</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--mysql-->
|
||||
<dependency>
|
||||
|
||||
@@ -3,8 +3,12 @@ package com.yxt.yythmall;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
//import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
@@ -16,9 +20,11 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
})
|
||||
// 启用自带定时任务
|
||||
@EnableScheduling
|
||||
@EnableFeignClients(basePackages = {})
|
||||
//@EnableFeignClients(basePackages = {})
|
||||
public class YxtYythmallApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(YxtYythmallApplication.class, args);
|
||||
ConfigurableApplicationContext context = SpringApplication.run(YxtYythmallApplication.class, args);
|
||||
Map<String, Object> beansWithAnnotation = context.getBeansWithAnnotation(RestController.class);
|
||||
beansWithAnnotation.forEach((k, v) -> System.out.println(k + ":" + v));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.yxt.yythmall.biz.empcardgift;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.nacos.client.naming.utils.CollectionUtils;
|
||||
//import com.alibaba.nacos.client.naming.utils.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
@@ -1004,7 +1004,8 @@ public class EmpCardGiftService extends MybatisBaseService<EmpCardGiftMapper, Em
|
||||
// LocalDate saturday = now.with(firstInMonth(DayOfWeek.SATURDAY));
|
||||
LocalDate saturday = now.with(DayOfWeek.SATURDAY);
|
||||
do {
|
||||
if (CollectionUtils.isEmpty(weekMap)) {
|
||||
// if (CollectionUtils.isEmpty(weekMap)) {
|
||||
if (weekMap.isEmpty()) {
|
||||
weekMap.add(saturday.toString());
|
||||
} else {
|
||||
weekMap.add(saturday.toString());
|
||||
@@ -1016,7 +1017,8 @@ public class EmpCardGiftService extends MybatisBaseService<EmpCardGiftMapper, Em
|
||||
// 第一个星期天
|
||||
LocalDate sunday = now.with(DayOfWeek.SUNDAY);
|
||||
do {
|
||||
if (CollectionUtils.isEmpty(weekMap)) {
|
||||
// if (CollectionUtils.isEmpty(weekMap)) {
|
||||
if (weekMap.isEmpty()) {
|
||||
weekMap.add(saturday.toString());
|
||||
} else {
|
||||
weekMap.add(sunday.toString());
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.yxt.yythmall.mallplus.biz.util;
|
||||
|
||||
import org.apache.commons.configuration.Configuration;
|
||||
import org.apache.commons.configuration.ConfigurationException;
|
||||
import org.apache.commons.configuration.PropertiesConfiguration;
|
||||
//import org.apache.commons.configuration.Configuration;
|
||||
//import org.apache.commons.configuration.ConfigurationException;
|
||||
//import org.apache.commons.configuration.PropertiesConfiguration;
|
||||
|
||||
/**
|
||||
* sql字段转java
|
||||
@@ -12,27 +12,27 @@ import org.apache.commons.configuration.PropertiesConfiguration;
|
||||
*/
|
||||
public class ColUtil {
|
||||
|
||||
/**
|
||||
* 转换mysql数据类型为java数据类型
|
||||
*
|
||||
* @param type 数据库字段类型
|
||||
* @return String
|
||||
*/
|
||||
static String cloToJava(String type) {
|
||||
Configuration config = getConfig();
|
||||
assert config != null;
|
||||
return config.getString(type, "unknowType");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配置信息
|
||||
*/
|
||||
public static PropertiesConfiguration getConfig() {
|
||||
try {
|
||||
return new PropertiesConfiguration("generator.properties");
|
||||
} catch (ConfigurationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// /**
|
||||
// * 转换mysql数据类型为java数据类型
|
||||
// *
|
||||
// * @param type 数据库字段类型
|
||||
// * @return String
|
||||
// */
|
||||
// static String cloToJava(String type) {
|
||||
// Configuration config = getConfig();
|
||||
// assert config != null;
|
||||
// return config.getString(type, "unknowType");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取配置信息
|
||||
// */
|
||||
// public static PropertiesConfiguration getConfig() {
|
||||
// try {
|
||||
// return new PropertiesConfiguration("generator.properties");
|
||||
// } catch (ConfigurationException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -3,20 +3,22 @@ spring:
|
||||
hikari:
|
||||
max-lifetime: 500000
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://39.104.100.138:3306/yxt_lpk_yythmall?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
||||
url: jdbc:mysql://127.0.0.1:3306/ss_ordermall?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
||||
# url: jdbc:mysql://39.104.100.138:3306/yxt_lpk_yythmall?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
||||
# url: jdbc:mysql://8.130.39.13:3306/yxt_lpk_yythmall?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
# password: 1LAiGz$t1*Iw
|
||||
password: yxt_mysql_138
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
namespace: lipinka
|
||||
server-addr: 39.104.100.138:8848
|
||||
register-enabled: false
|
||||
# password: yxt_mysql_138
|
||||
password: root
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
# namespace: lipinka
|
||||
# server-addr: 39.104.100.138:8848
|
||||
# register-enabled: false
|
||||
redis:
|
||||
database: 3 # Redis数据库索引(默认为0)
|
||||
host: 39.104.100.138
|
||||
host: 127.0.0.1
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
|
||||
Reference in New Issue
Block a user