parent
7779ee2b69
commit
d03384efc2
|
@ -0,0 +1,125 @@
|
||||||
|
# 项目相关配置
|
||||||
|
ruoyi:
|
||||||
|
# 名称
|
||||||
|
name: youshi
|
||||||
|
# 版本
|
||||||
|
version: 3.8.7
|
||||||
|
# 版权年份
|
||||||
|
copyrightYear: 2024
|
||||||
|
# 文件路径 示例( Windows配置 F:/home/youshi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
|
profile: F:/home/youshi/uploadPath
|
||||||
|
# 获取ip地址开关
|
||||||
|
addressEnabled: false
|
||||||
|
# 验证码类型 math 数字计算 char 字符验证
|
||||||
|
captchaType: math
|
||||||
|
# 根路径地址 https://youshi.bj.cn/prod-api http://localhost/dev-api
|
||||||
|
baseUrl: http://localhost/dev-api
|
||||||
|
|
||||||
|
rocketmq:
|
||||||
|
name-server: localhost:9876
|
||||||
|
producer:
|
||||||
|
group: abc
|
||||||
|
send-message-timeout: 60000
|
||||||
|
retry-times-when-send-failed: 3
|
||||||
|
retry-times-when-send-async-failed: 3
|
||||||
|
customized-trace-topic: ai
|
||||||
|
|
||||||
|
# 日志配置
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.ruoyi: debug
|
||||||
|
org.springframework: warn
|
||||||
|
|
||||||
|
# Swagger配置
|
||||||
|
swagger:
|
||||||
|
# 是否开启swagger
|
||||||
|
enabled: true
|
||||||
|
# 请求前缀
|
||||||
|
pathMapping: /dev-api
|
||||||
|
|
||||||
|
schedule:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# 数据源配置
|
||||||
|
spring:
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: localhost
|
||||||
|
# 端口,默认
|
||||||
|
port: 6379
|
||||||
|
# 数据库索引
|
||||||
|
database: 0
|
||||||
|
# 密码
|
||||||
|
password:
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
||||||
|
datasource:
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
druid:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://bj-cdb-7ezuofce.sql.tencentcdb.com:21965/youshi_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: youshi
|
||||||
|
password: youshi@2024
|
||||||
|
# 从库数据源
|
||||||
|
slave:
|
||||||
|
# 从数据源开关/默认关闭
|
||||||
|
enabled: false
|
||||||
|
url:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
# 初始连接数
|
||||||
|
initialSize: 5
|
||||||
|
# 最小连接池数量
|
||||||
|
minIdle: 10
|
||||||
|
# 最大连接池数量
|
||||||
|
maxActive: 20
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
maxWait: 60000
|
||||||
|
# 配置连接超时时间
|
||||||
|
connectTimeout: 30000
|
||||||
|
# 配置网络超时时间
|
||||||
|
socketTimeout: 60000
|
||||||
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||||
|
minEvictableIdleTimeMillis: 300000
|
||||||
|
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||||
|
maxEvictableIdleTimeMillis: 900000
|
||||||
|
# 配置检测连接是否有效
|
||||||
|
validationQuery: SELECT 1 FROM DUAL
|
||||||
|
testWhileIdle: true
|
||||||
|
testOnBorrow: false
|
||||||
|
testOnReturn: false
|
||||||
|
webStatFilter:
|
||||||
|
enabled: true
|
||||||
|
statViewServlet:
|
||||||
|
enabled: true
|
||||||
|
# 设置白名单,不填则允许所有访问
|
||||||
|
allow:
|
||||||
|
url-pattern: /druid/*
|
||||||
|
# 控制台管理用户名和密码
|
||||||
|
login-username: ruoyi
|
||||||
|
login-password: 123456
|
||||||
|
filter:
|
||||||
|
stat:
|
||||||
|
enabled: true
|
||||||
|
# 慢SQL记录
|
||||||
|
log-slow-sql: true
|
||||||
|
slow-sql-millis: 1000
|
||||||
|
merge-sql: true
|
||||||
|
wall:
|
||||||
|
config:
|
||||||
|
multi-statement-allow: true
|
|
@ -1,5 +1,70 @@
|
||||||
|
# 项目相关配置
|
||||||
|
ruoyi:
|
||||||
|
# 名称
|
||||||
|
name: youshi
|
||||||
|
# 版本
|
||||||
|
version: 3.8.7
|
||||||
|
# 版权年份
|
||||||
|
copyrightYear: 2024
|
||||||
|
# 文件路径 示例( Windows配置 F:/home/youshi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
|
profile: /home/ruoyi/uploadPath
|
||||||
|
# 获取ip地址开关
|
||||||
|
addressEnabled: false
|
||||||
|
# 验证码类型 math 数字计算 char 字符验证
|
||||||
|
captchaType: math
|
||||||
|
# 根路径地址 https://youshi.bj.cn/prod-api http://localhost/dev-api
|
||||||
|
baseUrl: https://youshi.bj.cn/prod-api
|
||||||
|
|
||||||
|
|
||||||
|
rocketmq:
|
||||||
|
name-server: 49.232.250.68:9876
|
||||||
|
producer:
|
||||||
|
group: abc
|
||||||
|
send-message-timeout: 60000
|
||||||
|
retry-times-when-send-failed: 3
|
||||||
|
retry-times-when-send-async-failed: 3
|
||||||
|
customized-trace-topic: ai
|
||||||
|
|
||||||
|
# 日志配置
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.ruoyi: error
|
||||||
|
org.springframework: warn
|
||||||
|
|
||||||
|
# Swagger配置
|
||||||
|
swagger:
|
||||||
|
# 是否开启swagger
|
||||||
|
enabled: false
|
||||||
|
# 请求前缀
|
||||||
|
pathMapping: /prod-api
|
||||||
|
|
||||||
|
schedule:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
# 数据源配置
|
# 数据源配置
|
||||||
spring:
|
spring:
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: 43.140.224.18
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6379
|
||||||
|
# 数据库索引
|
||||||
|
database: 0
|
||||||
|
# 密码
|
||||||
|
password: xxhy@2024
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
||||||
datasource:
|
datasource:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
@ -42,7 +107,7 @@ spring:
|
||||||
webStatFilter:
|
webStatFilter:
|
||||||
enabled: true
|
enabled: true
|
||||||
statViewServlet:
|
statViewServlet:
|
||||||
enabled: true
|
enabled: false
|
||||||
# 设置白名单,不填则允许所有访问
|
# 设置白名单,不填则允许所有访问
|
||||||
allow:
|
allow:
|
||||||
url-pattern: /druid/*
|
url-pattern: /druid/*
|
||||||
|
@ -51,7 +116,7 @@ spring:
|
||||||
login-password: 123456
|
login-password: 123456
|
||||||
filter:
|
filter:
|
||||||
stat:
|
stat:
|
||||||
enabled: true
|
enabled: false
|
||||||
# 慢SQL记录
|
# 慢SQL记录
|
||||||
log-slow-sql: true
|
log-slow-sql: true
|
||||||
slow-sql-millis: 1000
|
slow-sql-millis: 1000
|
|
@ -0,0 +1,125 @@
|
||||||
|
# 项目相关配置
|
||||||
|
ruoyi:
|
||||||
|
# 名称
|
||||||
|
name: youshi
|
||||||
|
# 版本
|
||||||
|
version: 3.8.7
|
||||||
|
# 版权年份
|
||||||
|
copyrightYear: 2024
|
||||||
|
# 文件路径 示例( Windows配置 F:/home/youshi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
|
profile: F:/home/youshi/uploadPath
|
||||||
|
# 获取ip地址开关
|
||||||
|
addressEnabled: false
|
||||||
|
# 验证码类型 math 数字计算 char 字符验证
|
||||||
|
captchaType: math
|
||||||
|
# 根路径地址 https://youshi.bj.cn/prod-api http://localhost/dev-api
|
||||||
|
baseUrl: http://localhost/dev-api
|
||||||
|
|
||||||
|
rocketmq:
|
||||||
|
name-server: 49.232.250.68:9876
|
||||||
|
producer:
|
||||||
|
group: abc
|
||||||
|
send-message-timeout: 60000
|
||||||
|
retry-times-when-send-failed: 3
|
||||||
|
retry-times-when-send-async-failed: 3
|
||||||
|
customized-trace-topic: ai
|
||||||
|
|
||||||
|
# 日志配置
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.ruoyi: debug
|
||||||
|
org.springframework: warn
|
||||||
|
|
||||||
|
# Swagger配置
|
||||||
|
swagger:
|
||||||
|
# 是否开启swagger
|
||||||
|
enabled: true
|
||||||
|
# 请求前缀
|
||||||
|
pathMapping: /dev-api
|
||||||
|
|
||||||
|
schedule:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# 数据源配置
|
||||||
|
spring:
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: 49.232.250.68
|
||||||
|
# 端口,默认
|
||||||
|
port: 16379
|
||||||
|
# 数据库索引
|
||||||
|
database: 0
|
||||||
|
# 密码
|
||||||
|
password: MjJUyaRZ_HDgZ2w_6XxK
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
||||||
|
datasource:
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
druid:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://bj-cdb-7ezuofce.sql.tencentcdb.com:21965/youshi_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: youshi
|
||||||
|
password: youshi@2024
|
||||||
|
# 从库数据源
|
||||||
|
slave:
|
||||||
|
# 从数据源开关/默认关闭
|
||||||
|
enabled: false
|
||||||
|
url:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
# 初始连接数
|
||||||
|
initialSize: 5
|
||||||
|
# 最小连接池数量
|
||||||
|
minIdle: 10
|
||||||
|
# 最大连接池数量
|
||||||
|
maxActive: 20
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
maxWait: 60000
|
||||||
|
# 配置连接超时时间
|
||||||
|
connectTimeout: 30000
|
||||||
|
# 配置网络超时时间
|
||||||
|
socketTimeout: 60000
|
||||||
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||||
|
minEvictableIdleTimeMillis: 300000
|
||||||
|
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||||
|
maxEvictableIdleTimeMillis: 900000
|
||||||
|
# 配置检测连接是否有效
|
||||||
|
validationQuery: SELECT 1 FROM DUAL
|
||||||
|
testWhileIdle: true
|
||||||
|
testOnBorrow: false
|
||||||
|
testOnReturn: false
|
||||||
|
webStatFilter:
|
||||||
|
enabled: true
|
||||||
|
statViewServlet:
|
||||||
|
enabled: true
|
||||||
|
# 设置白名单,不填则允许所有访问
|
||||||
|
allow:
|
||||||
|
url-pattern: /druid/*
|
||||||
|
# 控制台管理用户名和密码
|
||||||
|
login-username: ruoyi
|
||||||
|
login-password: 123456
|
||||||
|
filter:
|
||||||
|
stat:
|
||||||
|
enabled: true
|
||||||
|
# 慢SQL记录
|
||||||
|
log-slow-sql: true
|
||||||
|
slow-sql-millis: 1000
|
||||||
|
merge-sql: true
|
||||||
|
wall:
|
||||||
|
config:
|
||||||
|
multi-statement-allow: true
|
|
@ -1,20 +1,3 @@
|
||||||
# 项目相关配置
|
|
||||||
ruoyi:
|
|
||||||
# 名称
|
|
||||||
name: youshi
|
|
||||||
# 版本
|
|
||||||
version: 3.8.7
|
|
||||||
# 版权年份
|
|
||||||
copyrightYear: 2024
|
|
||||||
# 文件路径 示例( Windows配置 F:/home/youshi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
|
||||||
profile: /home/ruoyi/uploadPath
|
|
||||||
# 获取ip地址开关
|
|
||||||
addressEnabled: false
|
|
||||||
# 验证码类型 math 数字计算 char 字符验证
|
|
||||||
captchaType: math
|
|
||||||
# 根路径地址 https://youshi.bj.cn/prod-api http://localhost/dev-api
|
|
||||||
baseUrl: https://youshi.bj.cn/prod-api
|
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
|
@ -33,21 +16,6 @@ server:
|
||||||
# Tomcat启动初始化的线程数,默认值10
|
# Tomcat启动初始化的线程数,默认值10
|
||||||
min-spare: 100
|
min-spare: 100
|
||||||
|
|
||||||
rocketmq:
|
|
||||||
name-server: 49.232.250.68:9876
|
|
||||||
producer:
|
|
||||||
group: abc
|
|
||||||
send-message-timeout: 60000
|
|
||||||
retry-times-when-send-failed: 3
|
|
||||||
retry-times-when-send-async-failed: 3
|
|
||||||
customized-trace-topic: ai
|
|
||||||
|
|
||||||
# 日志配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
com.ruoyi: debug
|
|
||||||
org.springframework: warn
|
|
||||||
|
|
||||||
# 用户配置
|
# 用户配置
|
||||||
user:
|
user:
|
||||||
password:
|
password:
|
||||||
|
@ -63,7 +31,9 @@ spring:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
basename: i18n/messages
|
basename: i18n/messages
|
||||||
profiles:
|
profiles:
|
||||||
active: druid
|
# active: test
|
||||||
|
active: prod
|
||||||
|
# active: dev
|
||||||
# 文件上传
|
# 文件上传
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
|
@ -76,33 +46,6 @@ spring:
|
||||||
restart:
|
restart:
|
||||||
# 热部署开关
|
# 热部署开关
|
||||||
enabled: true
|
enabled: true
|
||||||
# redis 配置
|
|
||||||
redis:
|
|
||||||
# 地址
|
|
||||||
host: 43.140.224.18
|
|
||||||
# host: 49.232.250.68
|
|
||||||
# host: localhost
|
|
||||||
# 端口,默认为6379
|
|
||||||
port: 6379
|
|
||||||
# port: 16379
|
|
||||||
# 数据库索引
|
|
||||||
database: 0
|
|
||||||
# 密码
|
|
||||||
password: xxhy@2024
|
|
||||||
# password: MjJUyaRZ_HDgZ2w_6XxK
|
|
||||||
# password:
|
|
||||||
# 连接超时时间
|
|
||||||
timeout: 10s
|
|
||||||
lettuce:
|
|
||||||
pool:
|
|
||||||
# 连接池中的最小空闲连接
|
|
||||||
min-idle: 0
|
|
||||||
# 连接池中的最大空闲连接
|
|
||||||
max-idle: 8
|
|
||||||
# 连接池的最大数据库连接数
|
|
||||||
max-active: 8
|
|
||||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
|
||||||
max-wait: -1ms
|
|
||||||
|
|
||||||
# token配置
|
# token配置
|
||||||
token:
|
token:
|
||||||
|
|
|
@ -7,6 +7,7 @@ import org.quartz.JobKey;
|
||||||
import org.quartz.Scheduler;
|
import org.quartz.Scheduler;
|
||||||
import org.quartz.SchedulerException;
|
import org.quartz.SchedulerException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.ruoyi.common.constant.ScheduleConstants;
|
import com.ruoyi.common.constant.ScheduleConstants;
|
||||||
|
@ -31,6 +32,9 @@ public class SysJobServiceImpl implements ISysJobService
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysJobMapper jobMapper;
|
private SysJobMapper jobMapper;
|
||||||
|
|
||||||
|
@Value("${schedule.enabled}")
|
||||||
|
private Boolean scheduleEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目启动时,初始化定时器 主要是防止手动修改数据库导致未同步到定时任务处理(注:不能手动修改数据库ID和任务组名,否则会导致脏数据)
|
* 项目启动时,初始化定时器 主要是防止手动修改数据库导致未同步到定时任务处理(注:不能手动修改数据库ID和任务组名,否则会导致脏数据)
|
||||||
*/
|
*/
|
||||||
|
@ -38,12 +42,14 @@ public class SysJobServiceImpl implements ISysJobService
|
||||||
public void init() throws SchedulerException, TaskException
|
public void init() throws SchedulerException, TaskException
|
||||||
{
|
{
|
||||||
scheduler.clear();
|
scheduler.clear();
|
||||||
|
if(scheduleEnabled){
|
||||||
List<SysJob> jobList = jobMapper.selectJobAll();
|
List<SysJob> jobList = jobMapper.selectJobAll();
|
||||||
for (SysJob job : jobList)
|
for (SysJob job : jobList)
|
||||||
{
|
{
|
||||||
ScheduleUtils.createScheduleJob(scheduler, job);
|
ScheduleUtils.createScheduleJob(scheduler, job);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取quartz调度器的计划任务列表
|
* 获取quartz调度器的计划任务列表
|
||||||
|
|
|
@ -60,5 +60,5 @@ public interface IMeituanService {
|
||||||
void getReturnInfo(Long id);
|
void getReturnInfo(Long id);
|
||||||
|
|
||||||
String getComment(Long id);
|
String getComment(Long id);
|
||||||
String receiveTime(String storeCode,String cookie,String orderNo);
|
String receiveTime(String getUrl,String storeCode,String cookie,String orderNo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,47 +63,6 @@ public class AiConsumer {
|
||||||
BusStoreInfo busStoreInfo = mqDataInfo.getStoreInfo();
|
BusStoreInfo busStoreInfo = mqDataInfo.getStoreInfo();
|
||||||
BusOrderInfo busOrderInfo = mqDataInfo.getBusOrderInfo();
|
BusOrderInfo busOrderInfo = mqDataInfo.getBusOrderInfo();
|
||||||
BusStoreConfigInfo busStoreConfigInfo = mqDataInfo.getBusStoreConfigInfo();
|
BusStoreConfigInfo busStoreConfigInfo = mqDataInfo.getBusStoreConfigInfo();
|
||||||
// try {
|
|
||||||
// if ("2".equals(busStoreInfo.getReturnVisitStatus())) {
|
|
||||||
// System.out.println("未开启营销的跳出");
|
|
||||||
// return;// 未开启营销的跳出
|
|
||||||
// }
|
|
||||||
// // 配置规则
|
|
||||||
// BusStoreConfigInfo busStoreConfigInfo = new BusStoreConfigInfo();
|
|
||||||
// busStoreConfigInfo.setStoreCode(busStoreInfo.getStoreCode());
|
|
||||||
// busStoreConfigInfo = iBusStoreConfigInfoService.selectBusStoreConfigInfoList(busStoreConfigInfo).get(0);
|
|
||||||
//
|
|
||||||
// List<BusOrderInfo> list = new ArrayList<>();
|
|
||||||
// if ("1".equals(busStoreInfo.getSelfDeliveryStatus())) {
|
|
||||||
// System.out.println("自动营销");
|
|
||||||
// list = orderInfoService.selectBusOrderInfoListToAi(busStoreInfo.getStoreCode(), mqDataInfo.getT1(), mqDataInfo.getT2());
|
|
||||||
// } else if ("2".equals(busStoreInfo.getSelfDeliveryStatus())) {
|
|
||||||
// System.out.println("自配送营销");
|
|
||||||
// LocalDateTime dateTime = LocalDateTime.parse(mqDataInfo.getNow(), dateTimeFormatter);
|
|
||||||
// LocalDateTime tN = dateTime.minusMinutes(busStoreConfigInfo.getSelfDeliveryDuration());
|
|
||||||
// String time = tN.format(dateTimeFormatter);
|
|
||||||
// // 自配送前推时间处理
|
|
||||||
// list = orderInfoService.selectBusZpsOrderInfoListToAi(busStoreInfo.getStoreCode(), time);
|
|
||||||
// }
|
|
||||||
// if (list.size() == 0) return;
|
|
||||||
//
|
|
||||||
// BusAgentInfo agentInfo = agentInfoService.selectBusAgentInfoById(busStoreInfo.getBindId());
|
|
||||||
// List<BusOrderInfo> newList = list.stream().distinct().collect(Collectors.toList());
|
|
||||||
// if (agentInfo == null || "2".equals(agentInfo.getDelStatus())) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//// int cha = agentInfoL.get(0).getAiDurationBalance() - agentInfoL.get(0).getAiRealTimeNum();
|
|
||||||
// int cha = agentInfo.getAiDurationBalance();
|
|
||||||
// if (cha < list.size()&&(cha - 1)>0) {
|
|
||||||
// list.subList(0, cha - 1);
|
|
||||||
// System.out.println("积分不足截取部分订单营销");
|
|
||||||
// agentInfo.setAiRealTimeNum(agentInfo.getAiDurationBalance());
|
|
||||||
// } else if(cha < 0){
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//// agentInfoService.updateBusAgentInfo(agentInfoL.get(0));
|
|
||||||
//// } else break;
|
|
||||||
// for (BusOrderInfo busOrderInfo : newList) {
|
|
||||||
try {
|
try {
|
||||||
if(busReturnVisitInfoMapper.returnVisitInfoList(busOrderInfo.getPrivcyPhone())>0){
|
if(busReturnVisitInfoMapper.returnVisitInfoList(busOrderInfo.getPrivcyPhone())>0){
|
||||||
return;
|
return;
|
||||||
|
@ -130,9 +89,7 @@ public class AiConsumer {
|
||||||
LocalTime start = LocalTime.parse(busStoreConfigInfo.getStartTime());
|
LocalTime start = LocalTime.parse(busStoreConfigInfo.getStartTime());
|
||||||
LocalTime end = LocalTime.parse(busStoreConfigInfo.getEndTime());
|
LocalTime end = LocalTime.parse(busStoreConfigInfo.getEndTime());
|
||||||
// 时区
|
// 时区
|
||||||
// ZoneId zoneId = ZoneId.systemDefault();
|
|
||||||
LocalDateTime orderDateTime = LocalDateTime.parse(busOrderInfo.getCompleteTime(), dateTimeFormatter);
|
LocalDateTime orderDateTime = LocalDateTime.parse(busOrderInfo.getCompleteTime(), dateTimeFormatter);
|
||||||
// LocalDateTime orderDateTime = busOrderInfo.getOrderTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
|
||||||
LocalTime orderTime = orderDateTime.toLocalTime();
|
LocalTime orderTime = orderDateTime.toLocalTime();
|
||||||
if (orderTime.isBefore(start) || end.isBefore(orderTime)) {
|
if (orderTime.isBefore(start) || end.isBefore(orderTime)) {
|
||||||
System.out.println("营销时间区间拦截成功");
|
System.out.println("营销时间区间拦截成功");
|
||||||
|
@ -193,7 +150,6 @@ public class AiConsumer {
|
||||||
}
|
}
|
||||||
BusReturnVisitInfo returnVisitInfo = new BusReturnVisitInfo();
|
BusReturnVisitInfo returnVisitInfo = new BusReturnVisitInfo();
|
||||||
returnVisitInfo.setPhoneNumber(busOrderInfo.getPrivcyPhone());
|
returnVisitInfo.setPhoneNumber(busOrderInfo.getPrivcyPhone());
|
||||||
// redisTemplate.opsForValue().set(busStoreConfigInfo.getStoreCode() + now.format(dateTimeFormatterNow), quota + "");
|
|
||||||
BusFifteenInfo fifteenInfo = new BusFifteenInfo();
|
BusFifteenInfo fifteenInfo = new BusFifteenInfo();
|
||||||
fifteenInfo.setCustomId(busOrderInfo.getCustomId());
|
fifteenInfo.setCustomId(busOrderInfo.getCustomId());
|
||||||
List<BusFifteenInfo> listInfo = fifteenInfoService.selectBusFifteenInfoList(fifteenInfo);
|
List<BusFifteenInfo> listInfo = fifteenInfoService.selectBusFifteenInfoList(fifteenInfo);
|
||||||
|
@ -265,11 +221,6 @@ public class AiConsumer {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
// }catch (Exception e){
|
|
||||||
// e.printStackTrace();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
System.out.println(("一共耗时time: " + (System.currentTimeMillis() - startTime) / 1000 + " s"));
|
System.out.println(("一共耗时time: " + (System.currentTimeMillis() - startTime) / 1000 + " s"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -461,7 +461,7 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
|
|
||||||
orderInfo.setStoreName(storeInfo1.getStoreName());
|
orderInfo.setStoreName(storeInfo1.getStoreName());
|
||||||
|
|
||||||
String reachTime = receiveTime(wmPoiId,cookie,wmOrderViewId);
|
String reachTime = receiveTime(getUrl,wmPoiId,cookie,wmOrderViewId);
|
||||||
|
|
||||||
orderInfo.setCompleteTime(date+" "+reachTime);
|
orderInfo.setCompleteTime(date+" "+reachTime);
|
||||||
orderInfo.setOrderStatus(statusDesc);
|
orderInfo.setOrderStatus(statusDesc);
|
||||||
|
@ -594,15 +594,15 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
jsonObject = JSONObject.parseObject(resp);
|
jsonObject = JSONObject.parseObject(resp);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
// jsonObject.put("code","403");
|
orderInfo(valueFromCookie("wmPoiId", cookie), date, cookie);
|
||||||
}
|
}
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String receiveTime(String storeCode,String cookie,String orderNo){
|
public String receiveTime(String getUrl,String storeCode,String cookie,String orderNo){
|
||||||
CloseableHttpClient client = proxyHttpClient();
|
CloseableHttpClient client = proxyHttpClient(getUrl);
|
||||||
String url = "https://e.waimai.meituan.com/api/logistics/logs";
|
String url = "https://e.waimai.meituan.com/api/logistics/logs";
|
||||||
Map<String, Object> params = new LinkedHashMap<>();
|
Map<String, Object> params = new LinkedHashMap<>();
|
||||||
params.put("region_id", valueFromCookie("region_id",cookie));
|
params.put("region_id", valueFromCookie("region_id",cookie));
|
||||||
|
@ -1053,6 +1053,8 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
|
|
||||||
// private CloseableHttpClient proxyHttpClient() {
|
// private CloseableHttpClient proxyHttpClient() {
|
||||||
private CloseableHttpClient proxyHttpClient(String ipPort) {
|
private CloseableHttpClient proxyHttpClient(String ipPort) {
|
||||||
|
// JDK 8u111版本后,目标页面为HTTPS协议,启用proxy用户密码鉴权
|
||||||
|
System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
|
||||||
String proxyHost = ipPort.split(":")[0];
|
String proxyHost = ipPort.split(":")[0];
|
||||||
int proxyPort = Integer.valueOf(ipPort.split(":")[1]);
|
int proxyPort = Integer.valueOf(ipPort.split(":")[1]);
|
||||||
String username = proxyProperties.getAccount();
|
String username = proxyProperties.getAccount();
|
||||||
|
@ -1105,6 +1107,8 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
private CloseableHttpClient proxyHttpClient() {
|
private CloseableHttpClient proxyHttpClient() {
|
||||||
|
// JDK 8u111版本后,目标页面为HTTPS协议,启用proxy用户密码鉴权
|
||||||
|
System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
|
||||||
String proxyHost = proxyProperties.getProxyAddr();
|
String proxyHost = proxyProperties.getProxyAddr();
|
||||||
int proxyPort = proxyProperties.getProxyPort();
|
int proxyPort = proxyProperties.getProxyPort();
|
||||||
String username = proxyProperties.getAccount();
|
String username = proxyProperties.getAccount();
|
||||||
|
|
Loading…
Reference in New Issue