Commit 47109b33 by ljb

完善数据汇聚

parent bb8bd40d
......@@ -4,7 +4,7 @@ package com.zq.dataoperation.controller;
import com.zq.common.utils.AssertUtils;
import com.zq.common.vo.ResultVo;
//import com.zq.dataoperation.service.DataCleanService;
import com.zq.dataoperation.entity.DataCollect;
import com.zq.dataoperation.entity.DataCollectSetting;
import com.zq.dataoperation.service.DataCollectService;
import com.zq.dataoperation.vo.DataCollectReq;
import io.swagger.annotations.Api;
......@@ -25,8 +25,6 @@ public class DataCollectController {
@Resource
private DataCollectService dataCollectService;
// @Resource
// private DataCleanService dataCleanService;
@ApiOperation("获取数据汇聚任务列表")
@GetMapping(value = "/getAll")
......@@ -48,8 +46,8 @@ public class DataCollectController {
@ApiOperation("新增或修改数据汇聚设置")
@PostMapping(value = "/update")
public ResultVo selectDataCleanList(@RequestBody DataCollect dataCollect) {
boolean b = dataCollectService.saveOrUpdate(dataCollect);
public ResultVo selectDataCleanList(@RequestBody DataCollectSetting dataCollectSetting) {
boolean b = dataCollectService.saveOrUpdate(dataCollectSetting);
AssertUtils.isTrue(b, "操作失败");
return ResultVo.success("操作成功");
}
......
package com.zq.dataoperation.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.dataoperation.entity.DataCollect;
import com.zq.dataoperation.entity.DataCollectSetting;
public interface DataCollectDao extends BaseMapper<DataCollect> {
public interface DataCollectDao extends BaseMapper<DataCollectSetting> {
}
package com.zq.dataoperation.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.dataoperation.entity.DataCollectLog;
import com.zq.dataoperation.entity.DataCollectTaskLog;
public interface DataCollectLogDao extends BaseMapper<DataCollectLog> {
public interface DataCollectTaskLogDao extends BaseMapper<DataCollectTaskLog> {
}
......@@ -17,7 +17,7 @@ import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "data_collect_setting")
public class DataCollect {
public class DataCollectSetting {
/**
* 数据类型
......@@ -79,4 +79,3 @@ public class DataCollect {
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
}
\ No newline at end of file
......@@ -13,7 +13,7 @@ import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "data_collect_task_log")
public class DataCollectLog {
public class DataCollectTaskLog {
/**
* 数据汇聚表id
......
......@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zq.common.utils.PagingUtils;
import com.zq.common.vo.PageVo;
import com.zq.dataoperation.dao.DataCollectLogDao;
import com.zq.dataoperation.entity.DataCollectLog;
import com.zq.dataoperation.dao.DataCollectTaskLogDao;
import com.zq.dataoperation.entity.DataCollectTaskLog;
import com.zq.dataoperation.vo.DataCollectLogReq;
import org.springframework.stereotype.Service;
......@@ -13,13 +13,13 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class DataCollectLogService extends ServiceImpl<DataCollectLogDao, DataCollectLog> {
public class DataCollectLogService extends ServiceImpl<DataCollectTaskLogDao, DataCollectTaskLog> {
@Resource DataCollectLogDao dataCollectLogDao;
public PageVo<DataCollectLog> getPageDataCollectLog(DataCollectLogReq req) {
LambdaQueryWrapper<DataCollectLog> wrapper = new LambdaQueryWrapper<>();
return PagingUtils.paging(req,dataCollectLogDao,DataCollectLog.class,wrapper);
@Resource
DataCollectTaskLogDao dataCollectTaskLogDao;
public PageVo<DataCollectTaskLog> getPageDataCollectLog(DataCollectLogReq req) {
LambdaQueryWrapper<DataCollectTaskLog> wrapper = new LambdaQueryWrapper<>();
return PagingUtils.paging(req, dataCollectTaskLogDao, DataCollectTaskLog.class,wrapper);
}
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zq.common.utils.PagingUtils;
import com.zq.common.vo.PageVo;
import com.zq.dataoperation.dao.DataCollectDao;
import com.zq.dataoperation.entity.DataCollect;
import com.zq.dataoperation.entity.DataCollectSetting;
import com.zq.dataoperation.vo.DataCollectReq;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
......@@ -16,15 +16,18 @@ import javax.annotation.Resource;
@Slf4j
@RequiredArgsConstructor
@Service
public class DataCollectService extends ServiceImpl<DataCollectDao, DataCollect> {
public class DataCollectService extends ServiceImpl<DataCollectDao, DataCollectSetting> {
@Resource
private DataCollectDao dataCollectDao;
public PageVo<DataCollect> getPageDataCollect(DataCollectReq req) {
LambdaQueryWrapper<DataCollect> wrapper = new LambdaQueryWrapper<>();
return PagingUtils.paging(req,dataCollectDao,DataCollect.class,wrapper);
public PageVo<DataCollectSetting> getPageDataCollect(DataCollectReq req) {
LambdaQueryWrapper<DataCollectSetting> wrapper = new LambdaQueryWrapper<>();
return PagingUtils.paging(req,dataCollectDao, DataCollectSetting.class,wrapper);
}
public void getAll(String month, String tableName){
}
}
\ No newline at end of file
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