新增华为数据归因分析
This commit is contained in:
parent
1e0e6c8f6b
commit
97aa4d579c
7
pom.xml
7
pom.xml
|
|
@ -32,12 +32,19 @@
|
||||||
<lombok.version>1.18.12</lombok.version>
|
<lombok.version>1.18.12</lombok.version>
|
||||||
<minio.version>8.5.5</minio.version>
|
<minio.version>8.5.5</minio.version>
|
||||||
<qiniu.version>7.4.0</qiniu.version>
|
<qiniu.version>7.4.0</qiniu.version>
|
||||||
|
<hutool.version>5.8.22</hutool.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>${hutool.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.minio</groupId>
|
<groupId>io.minio</groupId>
|
||||||
<artifactId>minio</artifactId>
|
<artifactId>minio</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.system.domain.TaskData;
|
||||||
|
import com.ruoyi.system.service.ITaskDataService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归因数据回传Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-29
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/system/data")
|
||||||
|
public class TaskDataController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "system/data";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITaskDataService taskDataService;
|
||||||
|
|
||||||
|
@RequiresPermissions("system:data:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String data()
|
||||||
|
{
|
||||||
|
return prefix + "/data";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询归因数据回传列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:data:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(TaskData taskData)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<TaskData> list = taskDataService.selectTaskDataList(taskData);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出归因数据回传列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:data:export")
|
||||||
|
@Log(title = "归因数据回传", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(TaskData taskData)
|
||||||
|
{
|
||||||
|
List<TaskData> list = taskDataService.selectTaskDataList(taskData);
|
||||||
|
ExcelUtil<TaskData> util = new ExcelUtil<TaskData>(TaskData.class);
|
||||||
|
return util.exportExcel(list, "归因数据回传数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增归因数据回传
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存归因数据回传
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:data:add")
|
||||||
|
@Log(title = "归因数据回传", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(TaskData taskData)
|
||||||
|
{
|
||||||
|
return toAjax(taskDataService.insertTaskData(taskData));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改归因数据回传
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:data:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
TaskData taskData = taskDataService.selectTaskDataById(id);
|
||||||
|
mmap.put("taskData", taskData);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存归因数据回传
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:data:edit")
|
||||||
|
@Log(title = "归因数据回传", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(TaskData taskData)
|
||||||
|
{
|
||||||
|
return toAjax(taskDataService.updateTaskData(taskData));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除归因数据回传
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:data:remove")
|
||||||
|
@Log(title = "归因数据回传", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(taskDataService.deleteTaskDataByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增归因数据回传')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-data-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">消耗日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="costDate" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">来源App:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="sourceApp" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">总花费:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="totalCost" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">曝光次数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="exposure" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">点击次数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="click" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">点击率:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="clickRate" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">下载次数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="download" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">下载率:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="downloadRate" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">每次下载花费:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="downloadAvgCost" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/data"
|
||||||
|
$("#form-data-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-data-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,154 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('归因数据回传列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<!-- <div class="col-sm-12 search-collapse">-->
|
||||||
|
<!-- <form id="formId">-->
|
||||||
|
<!-- <div class="select-list">-->
|
||||||
|
<!-- <ul>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>消耗日期:</label>-->
|
||||||
|
<!-- <input type="text" name="costDate"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>来源App:</label>-->
|
||||||
|
<!-- <input type="text" name="sourceApp"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>总花费:</label>-->
|
||||||
|
<!-- <input type="text" name="totalCost"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>曝光次数:</label>-->
|
||||||
|
<!-- <input type="text" name="exposure"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>点击次数:</label>-->
|
||||||
|
<!-- <input type="text" name="click"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>点击率:</label>-->
|
||||||
|
<!-- <input type="text" name="clickRate"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>下载次数:</label>-->
|
||||||
|
<!-- <input type="text" name="download"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>下载率:</label>-->
|
||||||
|
<!-- <input type="text" name="downloadRate"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>每次下载花费:</label>-->
|
||||||
|
<!-- <input type="text" name="downloadAvgCost"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>-->
|
||||||
|
<!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- </ul>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </form>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:data:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:data:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:data:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:data:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('system:data:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('system:data:remove')}]];
|
||||||
|
var prefix = ctx + "system/data";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "归因数据回传",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '主键id',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'costDate',
|
||||||
|
title: '消耗日期'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'sourceApp',
|
||||||
|
title: '来源App'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'totalCost',
|
||||||
|
title: '总花费'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'exposure',
|
||||||
|
title: '曝光次数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'click',
|
||||||
|
title: '点击次数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'clickRate',
|
||||||
|
title: '点击率'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'download',
|
||||||
|
title: '下载次数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'downloadRate',
|
||||||
|
title: '下载率'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'downloadAvgCost',
|
||||||
|
title: '每次下载花费'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
title: '备注'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改归因数据回传')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-data-edit" th:object="${taskData}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">消耗日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="costDate" th:field="*{costDate}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">来源App:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="sourceApp" th:field="*{sourceApp}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">总花费:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="totalCost" th:field="*{totalCost}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">曝光次数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="exposure" th:field="*{exposure}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">点击次数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="click" th:field="*{click}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">点击率:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="clickRate" th:field="*{clickRate}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">下载次数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="download" th:field="*{download}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">下载率:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="downloadRate" th:field="*{downloadRate}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">每次下载花费:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="downloadAvgCost" th:field="*{downloadAvgCost}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/data";
|
||||||
|
$("#form-data-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-data-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -17,6 +17,11 @@
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Spring框架基本的核心工具 -->
|
<!-- Spring框架基本的核心工具 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,11 @@
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-system</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.ruoyi.quartz.service;
|
||||||
|
|
||||||
|
public interface HuaWeiDataRespService {
|
||||||
|
|
||||||
|
public void getTodayData();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.ruoyi.quartz.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.ruoyi.quartz.service.HuaWeiDataRespService;
|
||||||
|
import com.ruoyi.system.domain.TaskData;
|
||||||
|
import com.ruoyi.system.service.ITaskDataService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class HuaWeiDataRespServiceImpl implements HuaWeiDataRespService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITaskDataService taskDataService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getTodayData() {
|
||||||
|
String authorization = this.getToken();
|
||||||
|
String clientId = "1262989161703450304";
|
||||||
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
JSONObject contentObject = new JSONObject();
|
||||||
|
contentObject.put("startDate", format.format(new Date()));
|
||||||
|
contentObject.put("endDate",format.format(new Date()));
|
||||||
|
List<String> taskIds = new ArrayList<>();
|
||||||
|
taskIds.add("108366615");
|
||||||
|
JSONObject appJosn = new JSONObject();
|
||||||
|
appJosn.put("appIds", taskIds);
|
||||||
|
contentObject.put("filtering", appJosn);
|
||||||
|
HttpRequest httpRequest = HttpUtil.createPost("https://connect-api.cloud.huawei.com/api/marketing-api/v1/report/ad/subtask");
|
||||||
|
Map<String, String> headerMap = new HashMap<>();
|
||||||
|
headerMap.put("client_id", clientId);
|
||||||
|
headerMap.put("Authorization", authorization);
|
||||||
|
httpRequest.addHeaders(headerMap);
|
||||||
|
httpRequest.body(contentObject.toJSONString());
|
||||||
|
try {
|
||||||
|
HttpResponse response = httpRequest.execute();
|
||||||
|
log.info(response.body());
|
||||||
|
JSONObject taskJson = JSONObject.parseObject(response.body());
|
||||||
|
if("20770001".equals(taskJson.getString("code"))){
|
||||||
|
JSONObject dataJson = taskJson.getJSONArray("datas").getJSONObject(0);
|
||||||
|
TaskData taskData = new TaskData();
|
||||||
|
taskData.setClick(dataJson.getLong("click"));
|
||||||
|
taskData.setDownload(dataJson.getLong("download"));
|
||||||
|
taskData.setCostDate(dataJson.getString("statDate"));
|
||||||
|
taskData.setExposure(dataJson.getLong("exposure"));
|
||||||
|
taskData.setClickRate(dataJson.getString("clickRate"));
|
||||||
|
taskData.setDownloadRate(dataJson.getString("downloadRate"));
|
||||||
|
taskData.setTotalCost(dataJson.getString("cost"));
|
||||||
|
taskData.setSourceApp("华为");
|
||||||
|
taskData.setDownloadAvgCost(dataJson.getString("downloadAverageCost"));
|
||||||
|
taskData.setCreateTime(new Date());
|
||||||
|
taskDataService.insertTaskData(taskData);
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getToken(){
|
||||||
|
JSONObject contentJson = new JSONObject();
|
||||||
|
contentJson.put("grant_type","client_credentials");
|
||||||
|
contentJson.put("client_id","1262989161703450304");
|
||||||
|
contentJson.put("client_secret","57A572E30208BF67AD2FD19B3F58C0B07FFBD4AE3AB775617138BD69B85AB7C3");
|
||||||
|
String result = HttpUtil.post("https://connect-api.cloud.huawei.com/api/oauth2/v1/token", contentJson.toJSONString());
|
||||||
|
JSONObject resultJson = JSONObject.parseObject(result);
|
||||||
|
return "Bearer " + resultJson.getString("access_token");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ruoyi.quartz.task;
|
||||||
|
|
||||||
|
import com.ruoyi.quartz.service.HuaWeiDataRespService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>华为归因数据取回</p>
|
||||||
|
* @author clunt
|
||||||
|
*/
|
||||||
|
@Component("huaWeiDataRespTask")
|
||||||
|
public class HuaWeiDataRespTask {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HuaWeiDataRespService huaWeiDataRespService;
|
||||||
|
|
||||||
|
public void ryParams() {
|
||||||
|
huaWeiDataRespService.getTodayData();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归因数据回传对象 task_data
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class TaskData extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键id */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 消耗日期 */
|
||||||
|
@Excel(name = "消耗日期")
|
||||||
|
private String costDate;
|
||||||
|
|
||||||
|
/** 来源App */
|
||||||
|
@Excel(name = "来源App")
|
||||||
|
private String sourceApp;
|
||||||
|
|
||||||
|
/** 总花费 */
|
||||||
|
@Excel(name = "总花费")
|
||||||
|
private String totalCost;
|
||||||
|
|
||||||
|
/** 曝光次数 */
|
||||||
|
@Excel(name = "曝光次数")
|
||||||
|
private Long exposure;
|
||||||
|
|
||||||
|
/** 点击次数 */
|
||||||
|
@Excel(name = "点击次数")
|
||||||
|
private Long click;
|
||||||
|
|
||||||
|
/** 点击率 */
|
||||||
|
@Excel(name = "点击率")
|
||||||
|
private String clickRate;
|
||||||
|
|
||||||
|
/** 下载次数 */
|
||||||
|
@Excel(name = "下载次数")
|
||||||
|
private Long download;
|
||||||
|
|
||||||
|
/** 下载率 */
|
||||||
|
@Excel(name = "下载率")
|
||||||
|
private String downloadRate;
|
||||||
|
|
||||||
|
/** 每次下载花费 */
|
||||||
|
@Excel(name = "每次下载花费")
|
||||||
|
private String downloadAvgCost;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.TaskData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归因数据回传Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-29
|
||||||
|
*/
|
||||||
|
public interface TaskDataMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询归因数据回传
|
||||||
|
*
|
||||||
|
* @param id 归因数据回传主键
|
||||||
|
* @return 归因数据回传
|
||||||
|
*/
|
||||||
|
public TaskData selectTaskDataById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询归因数据回传列表
|
||||||
|
*
|
||||||
|
* @param taskData 归因数据回传
|
||||||
|
* @return 归因数据回传集合
|
||||||
|
*/
|
||||||
|
public List<TaskData> selectTaskDataList(TaskData taskData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增归因数据回传
|
||||||
|
*
|
||||||
|
* @param taskData 归因数据回传
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTaskData(TaskData taskData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改归因数据回传
|
||||||
|
*
|
||||||
|
* @param taskData 归因数据回传
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTaskData(TaskData taskData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除归因数据回传
|
||||||
|
*
|
||||||
|
* @param id 归因数据回传主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTaskDataById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除归因数据回传
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTaskDataByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.TaskData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归因数据回传Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-29
|
||||||
|
*/
|
||||||
|
public interface ITaskDataService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询归因数据回传
|
||||||
|
*
|
||||||
|
* @param id 归因数据回传主键
|
||||||
|
* @return 归因数据回传
|
||||||
|
*/
|
||||||
|
public TaskData selectTaskDataById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询归因数据回传列表
|
||||||
|
*
|
||||||
|
* @param taskData 归因数据回传
|
||||||
|
* @return 归因数据回传集合
|
||||||
|
*/
|
||||||
|
public List<TaskData> selectTaskDataList(TaskData taskData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增归因数据回传
|
||||||
|
*
|
||||||
|
* @param taskData 归因数据回传
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTaskData(TaskData taskData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改归因数据回传
|
||||||
|
*
|
||||||
|
* @param taskData 归因数据回传
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTaskData(TaskData taskData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除归因数据回传
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的归因数据回传主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTaskDataByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除归因数据回传信息
|
||||||
|
*
|
||||||
|
* @param id 归因数据回传主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTaskDataById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.system.mapper.TaskDataMapper;
|
||||||
|
import com.ruoyi.system.domain.TaskData;
|
||||||
|
import com.ruoyi.system.service.ITaskDataService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归因数据回传Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TaskDataServiceImpl implements ITaskDataService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TaskDataMapper taskDataMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询归因数据回传
|
||||||
|
*
|
||||||
|
* @param id 归因数据回传主键
|
||||||
|
* @return 归因数据回传
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TaskData selectTaskDataById(Long id)
|
||||||
|
{
|
||||||
|
return taskDataMapper.selectTaskDataById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询归因数据回传列表
|
||||||
|
*
|
||||||
|
* @param taskData 归因数据回传
|
||||||
|
* @return 归因数据回传
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TaskData> selectTaskDataList(TaskData taskData)
|
||||||
|
{
|
||||||
|
return taskDataMapper.selectTaskDataList(taskData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增归因数据回传
|
||||||
|
*
|
||||||
|
* @param taskData 归因数据回传
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertTaskData(TaskData taskData)
|
||||||
|
{
|
||||||
|
taskData.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return taskDataMapper.insertTaskData(taskData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改归因数据回传
|
||||||
|
*
|
||||||
|
* @param taskData 归因数据回传
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateTaskData(TaskData taskData)
|
||||||
|
{
|
||||||
|
taskData.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return taskDataMapper.updateTaskData(taskData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除归因数据回传
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的归因数据回传主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTaskDataByIds(String ids)
|
||||||
|
{
|
||||||
|
return taskDataMapper.deleteTaskDataByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除归因数据回传信息
|
||||||
|
*
|
||||||
|
* @param id 归因数据回传主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTaskDataById(Long id)
|
||||||
|
{
|
||||||
|
return taskDataMapper.deleteTaskDataById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.system.mapper.TaskDataMapper">
|
||||||
|
|
||||||
|
<resultMap type="TaskData" id="TaskDataResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="costDate" column="cost_date" />
|
||||||
|
<result property="sourceApp" column="source_app" />
|
||||||
|
<result property="totalCost" column="total_cost" />
|
||||||
|
<result property="exposure" column="exposure" />
|
||||||
|
<result property="click" column="click" />
|
||||||
|
<result property="clickRate" column="click_rate" />
|
||||||
|
<result property="download" column="download" />
|
||||||
|
<result property="downloadRate" column="download_rate" />
|
||||||
|
<result property="downloadAvgCost" column="download_avg_cost" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectTaskDataVo">
|
||||||
|
select id, cost_date, source_app, total_cost, exposure, click, click_rate, download, download_rate, download_avg_cost, create_by, create_time, update_by, update_time, remark from task_data
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTaskDataList" parameterType="TaskData" resultMap="TaskDataResult">
|
||||||
|
<include refid="selectTaskDataVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="costDate != null and costDate != ''"> and cost_date = #{costDate}</if>
|
||||||
|
<if test="sourceApp != null and sourceApp != ''"> and source_app = #{sourceApp}</if>
|
||||||
|
<if test="totalCost != null and totalCost != ''"> and total_cost = #{totalCost}</if>
|
||||||
|
<if test="exposure != null "> and exposure = #{exposure}</if>
|
||||||
|
<if test="click != null "> and click = #{click}</if>
|
||||||
|
<if test="clickRate != null and clickRate != ''"> and click_rate = #{clickRate}</if>
|
||||||
|
<if test="download != null "> and download = #{download}</if>
|
||||||
|
<if test="downloadRate != null and downloadRate != ''"> and download_rate = #{downloadRate}</if>
|
||||||
|
<if test="downloadAvgCost != null "> and download_avg_cost = #{downloadAvgCost}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTaskDataById" parameterType="Long" resultMap="TaskDataResult">
|
||||||
|
<include refid="selectTaskDataVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertTaskData" parameterType="TaskData" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into task_data
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="costDate != null">cost_date,</if>
|
||||||
|
<if test="sourceApp != null">source_app,</if>
|
||||||
|
<if test="totalCost != null">total_cost,</if>
|
||||||
|
<if test="exposure != null">exposure,</if>
|
||||||
|
<if test="click != null">click,</if>
|
||||||
|
<if test="clickRate != null">click_rate,</if>
|
||||||
|
<if test="download != null">download,</if>
|
||||||
|
<if test="downloadRate != null">download_rate,</if>
|
||||||
|
<if test="downloadAvgCost != null">download_avg_cost,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="costDate != null">#{costDate},</if>
|
||||||
|
<if test="sourceApp != null">#{sourceApp},</if>
|
||||||
|
<if test="totalCost != null">#{totalCost},</if>
|
||||||
|
<if test="exposure != null">#{exposure},</if>
|
||||||
|
<if test="click != null">#{click},</if>
|
||||||
|
<if test="clickRate != null">#{clickRate},</if>
|
||||||
|
<if test="download != null">#{download},</if>
|
||||||
|
<if test="downloadRate != null">#{downloadRate},</if>
|
||||||
|
<if test="downloadAvgCost != null">#{downloadAvgCost},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateTaskData" parameterType="TaskData">
|
||||||
|
update task_data
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="costDate != null">cost_date = #{costDate},</if>
|
||||||
|
<if test="sourceApp != null">source_app = #{sourceApp},</if>
|
||||||
|
<if test="totalCost != null">total_cost = #{totalCost},</if>
|
||||||
|
<if test="exposure != null">exposure = #{exposure},</if>
|
||||||
|
<if test="click != null">click = #{click},</if>
|
||||||
|
<if test="clickRate != null">click_rate = #{clickRate},</if>
|
||||||
|
<if test="download != null">download = #{download},</if>
|
||||||
|
<if test="downloadRate != null">download_rate = #{downloadRate},</if>
|
||||||
|
<if test="downloadAvgCost != null">download_avg_cost = #{downloadAvgCost},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteTaskDataById" parameterType="Long">
|
||||||
|
delete from task_data where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteTaskDataByIds" parameterType="String">
|
||||||
|
delete from task_data where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue