提交修改
This commit is contained in:
parent
2e190a8edd
commit
7c2333d269
@ -48,6 +48,14 @@ public class RabbitConfig {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Queue createDataQueue(@Value("${eb.config.rabbitQueue.createDataQueue}") String queueName) {
|
||||||
|
return new Queue(queueName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Bean(name = "accountAmountQueueSimpleRabbitListenerContainerFactory")
|
@Bean(name = "accountAmountQueueSimpleRabbitListenerContainerFactory")
|
||||||
public SimpleRabbitListenerContainerFactory accountAmountQueueSimpleRabbitListenerContainerFactory() {
|
public SimpleRabbitListenerContainerFactory accountAmountQueueSimpleRabbitListenerContainerFactory() {
|
||||||
|
|||||||
@ -7,10 +7,16 @@ package com.heyu.api.data.dao.vv;
|
|||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2025-10-20
|
* @since 2025-10-20
|
||||||
*/
|
*/
|
||||||
import com.heyu.api.data.entity.vv.VvAllDataEntity;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.heyu.api.data.entity.vv.VvAllDataEntity;
|
||||||
|
import com.lz.mybatis.plugin.annotations.LIMIT;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface VvAllDataDao extends BaseMapper<VvAllDataEntity> {
|
public interface VvAllDataDao extends BaseMapper<VvAllDataEntity> {
|
||||||
|
|
||||||
@ -33,4 +39,8 @@ public interface VvAllDataDao extends BaseMapper<VvAllDataEntity> {
|
|||||||
int deleteVvAllDataById(@Param("id")Long id);
|
int deleteVvAllDataById(@Param("id")Long id);
|
||||||
|
|
||||||
|
|
||||||
|
@LIMIT
|
||||||
|
VvAllDataEntity selectVvAllDataByRunIdRunDate(Long runId, String runDate);
|
||||||
|
|
||||||
|
List<Map<String,Object>> selectSQL(String sql);
|
||||||
}
|
}
|
||||||
@ -11,6 +11,9 @@ import com.heyu.api.data.entity.vv.VvCreateDataConfigEntity;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface VvCreateDataConfigDao extends BaseMapper<VvCreateDataConfigEntity> {
|
public interface VvCreateDataConfigDao extends BaseMapper<VvCreateDataConfigEntity> {
|
||||||
|
|
||||||
@ -33,4 +36,5 @@ public interface VvCreateDataConfigDao extends BaseMapper<VvCreateDataConfigEnti
|
|||||||
int deleteVvCreateDataConfigById(@Param("id")Long id);
|
int deleteVvCreateDataConfigById(@Param("id")Long id);
|
||||||
|
|
||||||
|
|
||||||
|
List<VvCreateDataConfigEntity> selectVvCreateDataConfigByAll();
|
||||||
}
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.heyu.api.data.dto;
|
||||||
|
|
||||||
|
import com.heyu.api.data.entity.vv.VvCreateDataConfigEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class VvCreateDataConfigDTO extends VvCreateDataConfigEntity {
|
||||||
|
|
||||||
|
private String runDate ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -1,12 +1,11 @@
|
|||||||
package com.heyu.api.data.entity.vv;
|
package com.heyu.api.data.entity.vv;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import com.lz.mybatis.plugin.annotations.AS;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.util.Date;
|
||||||
import java.util.Date;import java.util.Date;
|
|
||||||
/**
|
/**
|
||||||
*所有数据表
|
*所有数据表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
@ -32,6 +31,8 @@ private static final long serialVersionUID = 1L;
|
|||||||
public final static String x_title = CLASS_NAME + "x_title"; // x 标题
|
public final static String x_title = CLASS_NAME + "x_title"; // x 标题
|
||||||
public final static String y_title = CLASS_NAME + "y_title"; // y 标题
|
public final static String y_title = CLASS_NAME + "y_title"; // y 标题
|
||||||
public final static String create_timestamp = CLASS_NAME + "create_timestamp"; // 创建日期
|
public final static String create_timestamp = CLASS_NAME + "create_timestamp"; // 创建日期
|
||||||
|
public final static String run_date = CLASS_NAME + "run_date"; // 运行日期
|
||||||
|
public final static String run_id = CLASS_NAME + "run_id"; // 运行id
|
||||||
//
|
//
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
@ -46,7 +47,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
//用户名
|
//用户名
|
||||||
private String x;
|
private String x;
|
||||||
//y值
|
//y值
|
||||||
private BigDecimal y;
|
private double y;
|
||||||
//头部标题
|
//头部标题
|
||||||
private String headerTitle;
|
private String headerTitle;
|
||||||
//x 标题
|
//x 标题
|
||||||
@ -55,6 +56,10 @@ private static final long serialVersionUID = 1L;
|
|||||||
private String yTitle;
|
private String yTitle;
|
||||||
//创建日期
|
//创建日期
|
||||||
private Long createTimestamp;
|
private Long createTimestamp;
|
||||||
|
//运行日期
|
||||||
|
private String runDate;
|
||||||
|
//运行id
|
||||||
|
private String runId;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -149,14 +154,14 @@ private static final long serialVersionUID = 1L;
|
|||||||
* y值
|
* y值
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public BigDecimal getY() {
|
public double getY() {
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* y值
|
* y值
|
||||||
* @param y
|
* @param y
|
||||||
*/
|
*/
|
||||||
public void setY(BigDecimal y) {
|
public void setY(double y) {
|
||||||
this.y = y;
|
this.y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,6 +225,36 @@ private static final long serialVersionUID = 1L;
|
|||||||
this.createTimestamp = createTimestamp;
|
this.createTimestamp = createTimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行日期
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getRunDate() {
|
||||||
|
return runDate;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 运行日期
|
||||||
|
* @param runDate
|
||||||
|
*/
|
||||||
|
public void setRunDate(String runDate) {
|
||||||
|
this.runDate = runDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getRunId() {
|
||||||
|
return runId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 运行id
|
||||||
|
* @param runId
|
||||||
|
*/
|
||||||
|
public void setRunId(String runId) {
|
||||||
|
this.runId = runId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "VvAllDataEntity{" +
|
return "VvAllDataEntity{" +
|
||||||
@ -234,6 +269,8 @@ private static final long serialVersionUID = 1L;
|
|||||||
",xTitle=" + xTitle +
|
",xTitle=" + xTitle +
|
||||||
",yTitle=" + yTitle +
|
",yTitle=" + yTitle +
|
||||||
",createTimestamp=" + createTimestamp +
|
",createTimestamp=" + createTimestamp +
|
||||||
|
",runDate=" + runDate +
|
||||||
|
",runId=" + runId +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,9 +71,15 @@ public class ExpressionParse {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
String a = "com.heyu.api.data.utils.SqlDateParse.addDaysReturnTimestamp('yyyy-MM-dd 00:00:00',-1)";
|
String a = "com.heyu.api.data.utils.SqlDateParse.addDaysReturnTimestamp('yyyy-MM-dd 00:00:00',-1)";
|
||||||
|
|
||||||
String b = "com.heyu.api.data.utils.SqlDateParse.addDaysReturnTimestamp('yyyy-MM-dd 23:59:59',-1)";
|
String b = "com.heyu.api.data.utils.SqlDateParse.addDaysReturnTimestamp('yyyy-MM-dd 23:59:59',-1)";
|
||||||
|
|
||||||
|
|
||||||
Long aTime= getValue(a);
|
Long aTime= getValue(a);
|
||||||
Long bTime = getValue(b);
|
Long bTime = getValue(b);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println(aTime);
|
System.out.println(aTime);
|
||||||
System.out.println(bTime);
|
System.out.println(bTime);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,5 +2,8 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.heyu.api.data.dao.vv.VvAllDataDao">
|
<mapper namespace="com.heyu.api.data.dao.vv.VvAllDataDao">
|
||||||
|
|
||||||
|
<select id="selectSQL" resultType="java.util.Map">
|
||||||
|
${sql}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ public class MysqlMain_update {
|
|||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
|
|
||||||
String a = "vv_request_log";
|
String a = "vv_all_data";
|
||||||
for (String s : a.split(",")) {
|
for (String s : a.split(",")) {
|
||||||
list.add(new TablesBean(s));
|
list.add(new TablesBean(s));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,71 @@
|
|||||||
|
package com.heyu.api.controller.vv;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.heyu.api.alibaba.request.vv.AppOrderRequest;
|
||||||
|
import com.heyu.api.common.annotation.Describe;
|
||||||
|
import com.heyu.api.data.dao.vv.VvAllDataDao;
|
||||||
|
import com.heyu.api.data.dao.vv.VvCreateDataConfigDao;
|
||||||
|
import com.heyu.api.data.entity.vv.VvAllDataEntity;
|
||||||
|
import com.heyu.api.data.entity.vv.VvCreateDataConfigEntity;
|
||||||
|
import com.heyu.api.data.utils.ExpressionParse;
|
||||||
|
import com.heyu.api.data.utils.R;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.text.StrSubstitutor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/test")
|
||||||
|
public class AppTestController {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private VvAllDataDao vvAllDataDao;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private VvCreateDataConfigDao vvCreateDataConfigDao;
|
||||||
|
// /app/test/insert
|
||||||
|
@Describe("测试数据插入")
|
||||||
|
@RequestMapping("/insert")
|
||||||
|
public R list(@RequestBody AppOrderRequest vvOrderRequest) {
|
||||||
|
VvCreateDataConfigEntity vvCreateDataConfigDTO = vvCreateDataConfigDao.selectVvCreateDataConfigById(16L);
|
||||||
|
|
||||||
|
|
||||||
|
String configSql = vvCreateDataConfigDTO.getSqlConfig();
|
||||||
|
String paramsConfig = vvCreateDataConfigDTO.getParamsConfig();
|
||||||
|
|
||||||
|
Map valuesMap = new HashMap();
|
||||||
|
Map<String, Object> paramMap = JSONObject.parseObject(paramsConfig, Map.class);
|
||||||
|
for (Map.Entry<String, Object> entry : paramMap.entrySet()) {
|
||||||
|
valuesMap.put(entry.getKey(), ExpressionParse.getValue(entry.getValue() + ""));
|
||||||
|
}
|
||||||
|
StrSubstitutor sub = new StrSubstitutor(valuesMap);
|
||||||
|
String resolvedString = sub.replace(configSql);
|
||||||
|
|
||||||
|
List<Map<String, Object>> mapList = vvAllDataDao.selectSQL(resolvedString);
|
||||||
|
if (!CollectionUtils.isEmpty(mapList)) {
|
||||||
|
for (Map<String, Object> objectMap : mapList) {
|
||||||
|
|
||||||
|
VvAllDataEntity vvAllDataEntity = JSONObject.parseObject(JSON.toJSONString(objectMap), VvAllDataEntity.class);
|
||||||
|
vvAllDataEntity.setCreateTimestamp(System.currentTimeMillis());
|
||||||
|
vvAllDataDao.insert(vvAllDataEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
package com.heyu.api.listener;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.heyu.api.data.dao.vv.VvAllDataDao;
|
||||||
|
import com.heyu.api.data.dto.VvCreateDataConfigDTO;
|
||||||
|
import com.heyu.api.data.entity.vv.VvAllDataEntity;
|
||||||
|
import com.heyu.api.data.utils.ExpressionParse;
|
||||||
|
import com.rabbitmq.client.Channel;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.text.StrSubstitutor;
|
||||||
|
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
|
||||||
|
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||||
|
import org.springframework.amqp.support.AmqpHeaders;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.messaging.handler.annotation.Header;
|
||||||
|
import org.springframework.messaging.handler.annotation.Payload;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class CreateDataQueueSimpleRabbitListener {
|
||||||
|
|
||||||
|
@Value("${eb.config.rabbitQueue.createDataQueue}")
|
||||||
|
private String createDataQueue;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private VvAllDataDao vvAllDataDao;
|
||||||
|
|
||||||
|
@RabbitHandler
|
||||||
|
@RabbitListener(queues = "#{createDataQueue.name}", containerFactory = "accountAmountQueueSimpleRabbitListenerContainerFactory")
|
||||||
|
public void consumeMessage(@Payload String message, @Header(AmqpHeaders.DELIVERY_TAG) long delivertTag, Channel channel) {
|
||||||
|
try {
|
||||||
|
VvCreateDataConfigDTO vvCreateDataConfigDTO = JSONObject.parseObject(message, VvCreateDataConfigDTO.class);
|
||||||
|
VvAllDataEntity vvAllData = vvAllDataDao.selectVvAllDataByRunIdRunDate(vvCreateDataConfigDTO.getId(), vvCreateDataConfigDTO.getRunDate());
|
||||||
|
if (vvAllData != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String configSql = vvCreateDataConfigDTO.getSqlConfig();
|
||||||
|
String paramsConfig = vvCreateDataConfigDTO.getParamsConfig();
|
||||||
|
Map valuesMap = new HashMap();
|
||||||
|
Map<String,Object> paramMap = JSONObject.parseObject(paramsConfig, Map.class);
|
||||||
|
for(Map.Entry<String,Object> entry : paramMap.entrySet()){
|
||||||
|
valuesMap.put(entry.getKey(), ExpressionParse.getValue(entry.getValue() + ""));
|
||||||
|
}
|
||||||
|
StrSubstitutor sub = new StrSubstitutor(valuesMap);
|
||||||
|
String resolvedString = sub.replace(configSql);
|
||||||
|
List<Map<String, Object>> mapList = vvAllDataDao.selectSQL(resolvedString);
|
||||||
|
if (!CollectionUtils.isEmpty(mapList)) {
|
||||||
|
for (Map<String, Object> objectMap : mapList) {
|
||||||
|
VvAllDataEntity vvAllDataEntity = JSONObject.parseObject(JSON.toJSONString(objectMap), VvAllDataEntity.class);
|
||||||
|
vvAllDataEntity.setCreateTimestamp(System.currentTimeMillis());
|
||||||
|
vvAllDataEntity.setRunId(vvCreateDataConfigDTO.getId()+"");
|
||||||
|
vvAllDataEntity.setRunDate(vvCreateDataConfigDTO.getRunDate());
|
||||||
|
vvAllDataDao.insert(vvAllDataEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("urlStatisticQueue handle", e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
log.info("urlStatisticQueue消息{},消息确认完成", message);
|
||||||
|
channel.basicAck(delivertTag, true);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("urlStatisticQueue消息确认异常", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -110,7 +110,7 @@ public class CronTriggerUtils {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public boolean isRun(Date time, String cronExpression) {
|
public static boolean isRun(Date time, String cronExpression) {
|
||||||
try {
|
try {
|
||||||
Date dateStr = DateUtils.formateDate(time, "yyyy-MM-dd HH:mm:00");
|
Date dateStr = DateUtils.formateDate(time, "yyyy-MM-dd HH:mm:00");
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|||||||
@ -1,15 +1,46 @@
|
|||||||
package com.heyu.api.schedule.impl;
|
package com.heyu.api.schedule.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.heyu.api.data.dao.vv.VvCreateDataConfigDao;
|
||||||
|
import com.heyu.api.data.dto.VvCreateDataConfigDTO;
|
||||||
|
import com.heyu.api.data.entity.vv.VvCreateDataConfigEntity;
|
||||||
|
import com.heyu.api.schedule.CronTriggerUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Component("testJob")
|
@Component("testJob")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class TestJob {
|
public class TestJob {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private VvCreateDataConfigDao createDataConfigDao;
|
||||||
|
|
||||||
|
|
||||||
|
@Value("${eb.config.rabbitQueue.createDataQueue}")
|
||||||
|
private String createDataQueue;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RabbitTemplate rabbitTemplate;
|
||||||
|
|
||||||
|
|
||||||
public void test() {
|
public void test() {
|
||||||
System.out.println("test");
|
List<VvCreateDataConfigEntity> vvCreateDataConfigEntityList = createDataConfigDao.selectVvCreateDataConfigByAll();
|
||||||
|
Date now = new Date();
|
||||||
|
for (VvCreateDataConfigEntity vvCreateDataConfigEntity : vvCreateDataConfigEntityList) {
|
||||||
|
if (CronTriggerUtils.isRun(now, vvCreateDataConfigEntity.getCronExp())) {
|
||||||
|
VvCreateDataConfigDTO dto = new VvCreateDataConfigDTO();
|
||||||
|
BeanUtils.copyProperties(vvCreateDataConfigEntity, dto);
|
||||||
|
dto.setRunDate(CronTriggerUtils.cronCurrentDate(now, vvCreateDataConfigEntity.getCronExp()));
|
||||||
|
rabbitTemplate.convertAndSend(createDataQueue, JSON.toJSONString(dto));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,6 +58,7 @@ eb:
|
|||||||
accountLogName: ACCOUNT_LOG_NAME
|
accountLogName: ACCOUNT_LOG_NAME
|
||||||
postCodeData: post_code_data
|
postCodeData: post_code_data
|
||||||
urlStatisticQueue: URL_STATISTIC_QUEUE
|
urlStatisticQueue: URL_STATISTIC_QUEUE
|
||||||
|
createDataQueue: CREATE_DATA_QUEUE
|
||||||
|
|
||||||
|
|
||||||
tencent:
|
tencent:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user