diff --git a/eladmin-system/pom.xml b/eladmin-system/pom.xml
index 6ccc148..3c0ea45 100644
--- a/eladmin-system/pom.xml
+++ b/eladmin-system/pom.xml
@@ -86,6 +86,15 @@
oshi-core
5.0.1
+
+
+
+
+ com.spatial4j
+ spatial4j
+ 0.5
+
+
diff --git a/eladmin-system/src/main/java/me/zhengjie/common/CommonResponse.java b/eladmin-system/src/main/java/me/zhengjie/common/http/CommonResponse.java
similarity index 98%
rename from eladmin-system/src/main/java/me/zhengjie/common/CommonResponse.java
rename to eladmin-system/src/main/java/me/zhengjie/common/http/CommonResponse.java
index e307759..85a37eb 100644
--- a/eladmin-system/src/main/java/me/zhengjie/common/CommonResponse.java
+++ b/eladmin-system/src/main/java/me/zhengjie/common/http/CommonResponse.java
@@ -1,4 +1,4 @@
-package me.zhengjie.common;
+package me.zhengjie.common.http;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
diff --git a/eladmin-system/src/main/java/me/zhengjie/common/ResponseCode.java b/eladmin-system/src/main/java/me/zhengjie/common/http/ResponseCode.java
similarity index 97%
rename from eladmin-system/src/main/java/me/zhengjie/common/ResponseCode.java
rename to eladmin-system/src/main/java/me/zhengjie/common/http/ResponseCode.java
index 7c50eb6..f5507b9 100644
--- a/eladmin-system/src/main/java/me/zhengjie/common/ResponseCode.java
+++ b/eladmin-system/src/main/java/me/zhengjie/common/http/ResponseCode.java
@@ -1,4 +1,4 @@
-package me.zhengjie.common;
+package me.zhengjie.common.http;
/**
* FileName: ResponseCode
diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/taskrecord/rest/dto/PushDBJsonContent.java b/eladmin-system/src/main/java/me/zhengjie/common/json/PushDBJsonContent.java
similarity index 85%
rename from eladmin-system/src/main/java/me/zhengjie/modules/taskrecord/rest/dto/PushDBJsonContent.java
rename to eladmin-system/src/main/java/me/zhengjie/common/json/PushDBJsonContent.java
index 1652f16..dd5d9e0 100644
--- a/eladmin-system/src/main/java/me/zhengjie/modules/taskrecord/rest/dto/PushDBJsonContent.java
+++ b/eladmin-system/src/main/java/me/zhengjie/common/json/PushDBJsonContent.java
@@ -1,4 +1,4 @@
-package me.zhengjie.modules.taskrecord.rest.dto;
+package me.zhengjie.common.json;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
import java.util.List;
/**
- * 用于向下游进行推送的Json转换实体
+ * 用于向下游进行推送的Json转换实体 - 用于外呼端通用
*/
@Data
@AllArgsConstructor
diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/abmessage/rest/AbMessageController.java b/eladmin-system/src/main/java/me/zhengjie/modules/abmessage/rest/AbMessageController.java
index 2d708ba..7a58581 100644
--- a/eladmin-system/src/main/java/me/zhengjie/modules/abmessage/rest/AbMessageController.java
+++ b/eladmin-system/src/main/java/me/zhengjie/modules/abmessage/rest/AbMessageController.java
@@ -16,8 +16,8 @@
package me.zhengjie.modules.abmessage.rest;
import me.zhengjie.annotation.Log;
-import me.zhengjie.common.CommonResponse;
-import me.zhengjie.common.ResponseCode;
+import me.zhengjie.common.http.CommonResponse;
+import me.zhengjie.common.http.ResponseCode;
import me.zhengjie.modules.abmessage.domain.AbMessage;
import me.zhengjie.modules.abmessage.service.AbMessageService;
import me.zhengjie.modules.abmessage.service.dto.AbMessageDto;
diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/domain/BuildRecord.java b/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/domain/BuildRecord.java
index aaefb75..742f984 100644
--- a/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/domain/BuildRecord.java
+++ b/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/domain/BuildRecord.java
@@ -39,8 +39,8 @@ public class BuildRecord implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
@ApiModelProperty(value = "id")
- private Integer id;
+ private Integer id;
@Column(name = "gmt_create")
@ApiModelProperty(value = "创建时间")
private Timestamp gmtCreate;
@@ -89,6 +89,10 @@ public class BuildRecord implements Serializable {
@ApiModelProperty(value = "上次发送总记录数")
private Long sendTotal;
+ @Column(name = "task_build_id")
+ @ApiModelProperty(value = "活动任务ID")
+ private Long taskBuildId;
+
public void copy(BuildRecord source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}
diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/rest/BuildRecordController.java b/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/rest/BuildRecordController.java
index 02a89c0..904e5b5 100644
--- a/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/rest/BuildRecordController.java
+++ b/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/rest/BuildRecordController.java
@@ -15,19 +15,33 @@
*/
package me.zhengjie.modules.buildrecord.rest;
+import cn.hutool.core.bean.BeanUtil;
+import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.annotation.Log;
+import me.zhengjie.common.http.CommonResponse;
+import me.zhengjie.common.http.ResponseCode;
import me.zhengjie.modules.buildrecord.domain.BuildRecord;
+import me.zhengjie.modules.buildrecord.rest.vo.BuildRecordBuildVO;
+import me.zhengjie.modules.buildrecord.rest.vo.BuildRecordSendVO;
import me.zhengjie.modules.buildrecord.service.BuildRecordService;
+import me.zhengjie.modules.buildrecord.service.dto.BuildRecordDto;
import me.zhengjie.modules.buildrecord.service.dto.BuildRecordQueryCriteria;
+import me.zhengjie.modules.buildrecord.task.ProduceBigDataTask;
+import me.zhengjie.modules.buildrecord.task.SendBigDataTask;
+import me.zhengjie.modules.buildrecord.task.dto.SendBigDataDTO;
+import me.zhengjie.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import java.io.IOException;
+import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
@@ -43,6 +57,11 @@ public class BuildRecordController {
private final BuildRecordService buildRecordService;
+ @Autowired
+ private ProduceBigDataTask produceBigDataTask;
+ @Autowired
+ private SendBigDataTask sendBigDataTask;
+
@Log("导出数据")
@ApiOperation("导出数据")
@GetMapping(value = "/download")
@@ -84,4 +103,70 @@ public class BuildRecordController {
buildRecordService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
+
+
+ // ========================= 自定义的大数据平台相关的接口 start =========================
+ /**
+ * 新建课包任务
+ *
+ * @param taskRecordBuildVO 新建任务对应的VO映射
+ * @return 返回建立任务完成的状态
+ */
+ @PostMapping("/buildTask")
+ @Log("新建课包任务")
+ @ApiOperation("新建课包任务")
+// @PreAuthorize("@el.check('taskRecord:add')")
+ @AnonymousAccess // fixme 需要测试完成后进行去除和使用上面的权限注解
+ public ResponseEntity