任务调整完成
This commit is contained in:
parent
f73ac016ee
commit
2ec8f44b4e
|
|
@ -4,7 +4,9 @@ import java.util.List;
|
||||||
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.playlet.common.core.domain.Result;
|
import com.playlet.common.core.domain.Result;
|
||||||
|
import com.playlet.system.domain.PlayletItem;
|
||||||
import com.playlet.system.service.IPlayletItemService;
|
import com.playlet.system.service.IPlayletItemService;
|
||||||
|
import com.playlet.system.service.ISysDictTypeService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
@ -39,6 +41,8 @@ public class PlayletTaskController extends BaseController {
|
||||||
|
|
||||||
private final IPlayletItemService playletItemService;
|
private final IPlayletItemService playletItemService;
|
||||||
|
|
||||||
|
private final ISysDictTypeService sysDictTypeService;
|
||||||
|
|
||||||
@RequiresPermissions("playlet:task:view")
|
@RequiresPermissions("playlet:task:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String task() {
|
public String task() {
|
||||||
|
|
@ -54,6 +58,12 @@ public class PlayletTaskController extends BaseController {
|
||||||
public TableDataInfo list(PlayletTask playletTask) {
|
public TableDataInfo list(PlayletTask playletTask) {
|
||||||
startPage();
|
startPage();
|
||||||
List<PlayletTask> list = playletTaskService.selectPlayletTaskList(playletTask);
|
List<PlayletTask> list = playletTaskService.selectPlayletTaskList(playletTask);
|
||||||
|
list.forEach(model->{
|
||||||
|
PlayletItem playletItem = playletItemService.getById(model.getItemId());
|
||||||
|
if(playletItem != null){
|
||||||
|
model.setItemName(playletItem.getVideoName());
|
||||||
|
}
|
||||||
|
});
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,6 +85,7 @@ public class PlayletTaskController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/add")
|
@GetMapping("/add")
|
||||||
public String add(ModelMap modelMap) {
|
public String add(ModelMap modelMap) {
|
||||||
|
modelMap.put("sourceTypes", sysDictTypeService.selectDictDataByType("playlet_source_type"));
|
||||||
modelMap.put("playletItems", playletItemService.lambdaQuery().list());
|
modelMap.put("playletItems", playletItemService.lambdaQuery().list());
|
||||||
return prefix + "/add";
|
return prefix + "/add";
|
||||||
}
|
}
|
||||||
|
|
@ -145,4 +156,14 @@ public class PlayletTaskController extends BaseController {
|
||||||
public AjaxResult removeTask(@RequestParam(value = "ids") String ids) {
|
public AjaxResult removeTask(@RequestParam(value = "ids") String ids) {
|
||||||
return toAjax(playletTaskService.deletePlayletTaskByIds(ids));
|
return toAjax(playletTaskService.deletePlayletTaskByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "任务管理", businessType = BusinessType.UPDATE)
|
||||||
|
@RequiresPermissions("playlet:task:edit")
|
||||||
|
@PostMapping("/changeStatus")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult changeStatus(PlayletTask playletTask)
|
||||||
|
{
|
||||||
|
return toAjax(playletTaskService.updatePlayletTask(playletTask));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ public class PlayletUserItemAppServiceImpl implements PlayletUserItemAppService
|
||||||
log.info("请求入参:{}, 地址:{}, 返回:{}", body, url, result.body());
|
log.info("请求入参:{}, 地址:{}, 返回:{}", body, url, result.body());
|
||||||
com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(result.body());
|
com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(result.body());
|
||||||
if("1".equals(json.getString("code"))){
|
if("1".equals(json.getString("code"))){
|
||||||
return json.getJSONObject("data").getString("monitor");
|
return "kwai://miniapp?appId=ks715227916484291037&path=" + json.getJSONObject("data").getString("path");
|
||||||
}else {
|
}else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@
|
||||||
if (row.dyStatus === '01') {
|
if (row.dyStatus === '01') {
|
||||||
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enableDy(\'' + row.id + '\')"></i> ';
|
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enableDy(\'' + row.id + '\')"></i> ';
|
||||||
} else {
|
} else {
|
||||||
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disableDy(\'' + row.userId + '\')"></i> ';
|
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disableDy(\'' + row.id + '\')"></i> ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -223,7 +223,7 @@
|
||||||
if (row.ksStatus === '01') {
|
if (row.ksStatus === '01') {
|
||||||
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enableKs(\'' + row.id + '\')"></i> ';
|
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enableKs(\'' + row.id + '\')"></i> ';
|
||||||
} else {
|
} else {
|
||||||
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disableKs(\'' + row.userId + '\')"></i> ';
|
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disableKs(\'' + row.id + '\')"></i> ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -235,7 +235,7 @@
|
||||||
|
|
||||||
/* 上架快手 */
|
/* 上架快手 */
|
||||||
function disableKs(id) {
|
function disableKs(id) {
|
||||||
$.modal.confirm("确认下架抖音平台吗?", function() {
|
$.modal.confirm("确认下架快手平台吗?", function() {
|
||||||
$.operate.post(prefix + "/changeStatus", { "id": id, "ksStatus": "01" });
|
$.operate.post(prefix + "/changeStatus", { "id": id, "ksStatus": "01" });
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -244,7 +244,7 @@
|
||||||
if (row.dspStatus === '01') {
|
if (row.dspStatus === '01') {
|
||||||
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enableDsp(\'' + row.id + '\')"></i> ';
|
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enableDsp(\'' + row.id + '\')"></i> ';
|
||||||
} else {
|
} else {
|
||||||
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disableDsp(\'' + row.userId + '\')"></i> ';
|
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disableDsp(\'' + row.id + '\')"></i> ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('新增任务')" />
|
<th:block th:include="include :: header('新增任务')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
|
@ -20,6 +21,14 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">平台:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<label th:each="sourceType:${sourceTypes}" class="check-box">
|
||||||
|
<input name="sourceType" type="checkbox" th:value="${sourceType.dictValue}" th:text="${sourceType.dictLabel}">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">任务名称:</label>
|
<label class="col-sm-3 control-label is-required">任务名称:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -29,13 +38,19 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">任务开始时间:</label>
|
<label class="col-sm-3 control-label is-required">任务开始时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input id="startTime" name="startTime" class="form-control time-input" type="text">
|
<div class="input-group date">
|
||||||
|
<input name="startTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">任务结束时间:</label>
|
<label class="col-sm-3 control-label is-required">任务结束时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input id="endTime" name="endTime" class="form-control time-input" type="text">
|
<div class="input-group date">
|
||||||
|
<input name="endTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -50,12 +65,6 @@
|
||||||
<textarea name="commissionRate" class="form-control" required></textarea>
|
<textarea name="commissionRate" class="form-control" required></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label is-required">推荐标签:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<textarea name="recommendLabel" class="form-control" required></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">任务链接:</label>
|
<label class="col-sm-3 control-label is-required">任务链接:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -80,12 +89,6 @@
|
||||||
<input name="totalBonus" class="form-control" type="text" required>
|
<input name="totalBonus" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label is-required">任务状态:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="state" class="form-control" type="text" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">任务介绍:</label>
|
<label class="col-sm-3 control-label">任务介绍:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -101,6 +104,7 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var prefix = ctx + "system/playlet/task"
|
var prefix = ctx + "system/playlet/task"
|
||||||
$("#form-task-add").validate({
|
$("#form-task-add").validate({
|
||||||
|
|
@ -109,10 +113,29 @@
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
$.operate.save(prefix + "/add", $('#form-task-add').serialize());
|
var data = $("#form-task-add").serializeArray();
|
||||||
|
var sourceTypeIds = $.form.selectCheckeds("sourceType");
|
||||||
|
data.push({"name": "sourceTypeIds", "value": sourceTypeIds});
|
||||||
|
$.operate.save(prefix + "/add", data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("input[name='startTime']").datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii',
|
||||||
|
todayBtn: true,
|
||||||
|
dateFormat: 'yyyy-mm-dd',//日期显示格式
|
||||||
|
timeFormat: 'HH:mm:ss',//时间显示格式
|
||||||
|
autoclose: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='endTime']").datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii',
|
||||||
|
todayBtn: true,
|
||||||
|
dateFormat: 'yyyy-mm-dd',//日期显示格式
|
||||||
|
timeFormat: 'HH:mm:ss',//时间显示格式
|
||||||
|
autoclose: true,
|
||||||
|
});
|
||||||
|
|
||||||
laydate.render({
|
laydate.render({
|
||||||
elem: '#startTime',
|
elem: '#startTime',
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,6 @@
|
||||||
<textarea name="commissionRate" th:field="*{commissionRate}" class="form-control" required></textarea>
|
<textarea name="commissionRate" th:field="*{commissionRate}" class="form-control" required></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label is-required">推荐标签:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<textarea name="recommendLabel" th:field="*{recommendLabel}" class="form-control" required></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">任务链接:</label>
|
<label class="col-sm-3 control-label is-required">任务链接:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -62,7 +56,7 @@
|
||||||
<label class="col-sm-3 control-label is-required">开始时间:</label>
|
<label class="col-sm-3 control-label is-required">开始时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="startTime" th:value="${#dates.format(playletTask.startTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
<input name="startTime" th:value="${#dates.format(playletTask.startTime, 'yyyy-MM-dd hh:mm')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -71,29 +65,11 @@
|
||||||
<label class="col-sm-3 control-label is-required">结束时间:</label>
|
<label class="col-sm-3 control-label is-required">结束时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="endTime" th:value="${#dates.format(playletTask.endTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
<input name="endTime" th:value="${#dates.format(playletTask.endTime, 'yyyy-MM-dd hh:mm')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label is-required">基础佣金:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="totalBonus" th:field="*{baseBonus}" class="form-control" type="text" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label is-required">总佣金:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="totalBonus" th:field="*{totalBonus}" class="form-control" type="text" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label is-required">任务状态:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="state" th:field="*{state}" class="form-control" type="text" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">任务介绍:</label>
|
<label class="col-sm-3 control-label is-required">任务介绍:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -123,15 +99,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$("input[name='startTime']").datetimepicker({
|
$("input[name='startTime']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
format: 'yyyy-mm-dd hh:ii',
|
||||||
minView: "month",
|
todayBtn: true,
|
||||||
autoclose: true
|
dateFormat: 'yyyy-mm-dd',//日期显示格式
|
||||||
|
timeFormat: 'HH:mm:ss',//时间显示格式
|
||||||
|
autoclose: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name='endTime']").datetimepicker({
|
$("input[name='endTime']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
format: 'yyyy-mm-dd hh:ii',
|
||||||
minView: "month",
|
todayBtn: true,
|
||||||
autoclose: true
|
dateFormat: 'yyyy-mm-dd',//日期显示格式
|
||||||
|
timeFormat: 'HH:mm:ss',//时间显示格式
|
||||||
|
autoclose: true,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -69,13 +69,34 @@
|
||||||
title: '任务id'
|
title: '任务id'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'itemId',
|
field: 'itemName',
|
||||||
title: '短剧id'
|
title: '短剧名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'name',
|
||||||
title: '任务名称'
|
title: '任务名称'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '抖音',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return dyStatusTools(row);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '快手',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return ksStatusTools(row);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '视频',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return dspStatusTools(row);
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'peopleNumber',
|
field: 'peopleNumber',
|
||||||
title: '参与人数'
|
title: '参与人数'
|
||||||
|
|
@ -84,17 +105,21 @@
|
||||||
field: 'commissionRate',
|
field: 'commissionRate',
|
||||||
title: '提成比例'
|
title: '提成比例'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'recommendLabel',
|
|
||||||
title: '推荐标签'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'taskUrl',
|
field: 'taskUrl',
|
||||||
title: '任务链接'
|
title: '任务链接',
|
||||||
|
formatter: function(value) {
|
||||||
|
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">任务链接<a/>';}
|
||||||
|
else {return '<a>无<a/>'}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'taskDiskUrl',
|
field: 'taskDiskUrl',
|
||||||
title: '网盘链接'
|
title: '网盘链接',
|
||||||
|
formatter: function(value) {
|
||||||
|
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">网盘链接<a/>';}
|
||||||
|
else {return '<a>无<a/>'}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'startTime',
|
field: 'startTime',
|
||||||
|
|
@ -104,25 +129,25 @@
|
||||||
field: 'endTime',
|
field: 'endTime',
|
||||||
title: '任务结束时间'
|
title: '任务结束时间'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'platformType',
|
|
||||||
title: '任务短剧平台'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'baseBonus',
|
field: 'baseBonus',
|
||||||
title: '基础奖金'
|
title: '基础奖金',
|
||||||
|
visible: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'totalBonus',
|
field: 'totalBonus',
|
||||||
title: '任务总奖金'
|
title: '任务总奖金',
|
||||||
|
visible: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'state',
|
field: 'state',
|
||||||
title: '任务状态'
|
title: '任务状态',
|
||||||
|
visible: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'taskContent',
|
field: 'taskContent',
|
||||||
title: '任务介绍'
|
title: '任务介绍',
|
||||||
|
visible: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'remark',
|
field: 'remark',
|
||||||
|
|
@ -141,6 +166,70 @@
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function dyStatusTools(row) {
|
||||||
|
if (row.dyStatus === '01') {
|
||||||
|
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enableDy(\'' + row.id + '\')"></i> ';
|
||||||
|
} else {
|
||||||
|
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disableDy(\'' + row.id + '\')"></i> ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function enableDy(id) {
|
||||||
|
$.modal.confirm("确认要上架抖音平台吗?", function() {
|
||||||
|
$.operate.post(prefix + "/changeStatus", { "id": id, "dyStatus": "02" });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 上架抖音 */
|
||||||
|
function disableDy(id) {
|
||||||
|
$.modal.confirm("确认下架抖音平台吗?", function() {
|
||||||
|
$.operate.post(prefix + "/changeStatus", { "id": id, "dyStatus": "01" });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function ksStatusTools(row) {
|
||||||
|
if (row.ksStatus === '01') {
|
||||||
|
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enableKs(\'' + row.id + '\')"></i> ';
|
||||||
|
} else {
|
||||||
|
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disableKs(\'' + row.id + '\')"></i> ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function enableKs(id) {
|
||||||
|
$.modal.confirm("确认要上架快手平台吗?", function() {
|
||||||
|
$.operate.post(prefix + "/changeStatus", { "id": id, "ksStatus": "02" });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 上架快手 */
|
||||||
|
function disableKs(id) {
|
||||||
|
$.modal.confirm("确认下架快手平台吗?", function() {
|
||||||
|
$.operate.post(prefix + "/changeStatus", { "id": id, "ksStatus": "01" });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function dspStatusTools(row) {
|
||||||
|
if (row.dspStatus === '01') {
|
||||||
|
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enableDsp(\'' + row.id + '\')"></i> ';
|
||||||
|
} else {
|
||||||
|
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disableDsp(\'' + row.id + '\')"></i> ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function enableDsp(id) {
|
||||||
|
$.modal.confirm("确认要上架视频平台吗?", function() {
|
||||||
|
$.operate.post(prefix + "/changeStatus", { "id": id, "dspStatus": "02" });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 上架抖音 */
|
||||||
|
function disableDsp(id) {
|
||||||
|
$.modal.confirm("确认下架视频平台吗?", function() {
|
||||||
|
$.operate.post(prefix + "/changeStatus", { "id": id, "dspStatus": "01" });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -33,6 +33,9 @@ public class PlayletTask extends BaseEntity {
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String [] sourceTypeIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务id 保留字段
|
* 任务id 保留字段
|
||||||
*/
|
*/
|
||||||
|
|
@ -40,6 +43,15 @@ public class PlayletTask extends BaseEntity {
|
||||||
@ApiModelProperty(value = "任务id")
|
@ApiModelProperty(value = "任务id")
|
||||||
private String taskId;
|
private String taskId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "抖音上架状态")
|
||||||
|
private String dyStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "快手上架状态")
|
||||||
|
private String ksStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "视频上架状态")
|
||||||
|
private String dspStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务名称
|
* 任务名称
|
||||||
*/
|
*/
|
||||||
|
|
@ -51,6 +63,9 @@ public class PlayletTask extends BaseEntity {
|
||||||
@ApiModelProperty(value = "短剧ID")
|
@ApiModelProperty(value = "短剧ID")
|
||||||
private Long itemId;
|
private Long itemId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "短剧")
|
@ApiModelProperty(value = "短剧")
|
||||||
private PlayletItem playletItem;
|
private PlayletItem playletItem;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.playlet.system.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.ArrayUtils;
|
||||||
import com.playlet.common.utils.DateUtils;
|
import com.playlet.common.utils.DateUtils;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -54,6 +55,19 @@ public class PlayletTaskServiceImpl extends ServiceImpl<PlayletTaskMapper, Playl
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertPlayletTask(PlayletTask playletTask) {
|
public int insertPlayletTask(PlayletTask playletTask) {
|
||||||
|
if(ArrayUtils.isNotEmpty(playletTask.getSourceTypeIds())){
|
||||||
|
for (String sourceTypeId : playletTask.getSourceTypeIds()) {
|
||||||
|
if("1".equals(sourceTypeId)){
|
||||||
|
playletTask.setDyStatus("02");
|
||||||
|
}
|
||||||
|
if("2".equals(sourceTypeId)){
|
||||||
|
playletTask.setKsStatus("02");
|
||||||
|
}
|
||||||
|
if("3".equals(sourceTypeId)){
|
||||||
|
playletTask.setDspStatus("02");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
playletTask.setCreateTime(DateUtils.getNowDate());
|
playletTask.setCreateTime(DateUtils.getNowDate());
|
||||||
return playletTaskMapper.insertPlayletTask(playletTask);
|
return playletTaskMapper.insertPlayletTask(playletTask);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,9 @@
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="dyStatus" column="dy_status" />
|
||||||
|
<result property="ksStatus" column="ks_status" />
|
||||||
|
<result property="dspStatus" column="dsp_status" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectPlayletTaskVo">
|
<sql id="selectPlayletTaskVo">
|
||||||
|
|
@ -48,6 +51,9 @@
|
||||||
base_bonus,
|
base_bonus,
|
||||||
total_bonus,
|
total_bonus,
|
||||||
state,
|
state,
|
||||||
|
ks_status,
|
||||||
|
dy_status,
|
||||||
|
dsp_status,
|
||||||
task_content,
|
task_content,
|
||||||
comment_count,
|
comment_count,
|
||||||
star_count,
|
star_count,
|
||||||
|
|
@ -67,6 +73,9 @@
|
||||||
<if test="taskId != null and taskId != ''">and task_id = #{taskId}</if>
|
<if test="taskId != null and taskId != ''">and task_id = #{taskId}</if>
|
||||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||||
<if test="state != null ">and state = #{state}</if>
|
<if test="state != null ">and state = #{state}</if>
|
||||||
|
<if test="ksStatus != null ">and ks_status = #{ksStatus}</if>
|
||||||
|
<if test="dyStatus != null ">and dy_status = #{dyStatus}</if>
|
||||||
|
<if test="dspStatus != null ">and dsp_status = #{dspStatus}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -76,6 +85,9 @@
|
||||||
playlet_task.task_id,
|
playlet_task.task_id,
|
||||||
playlet_task.name,
|
playlet_task.name,
|
||||||
playlet_task.item_id,
|
playlet_task.item_id,
|
||||||
|
playlet_task.ks_status,
|
||||||
|
playlet_task.dy_status,
|
||||||
|
playlet_task.dsp_status,
|
||||||
playlet_task.people_number,
|
playlet_task.people_number,
|
||||||
playlet_task.commission_rate,
|
playlet_task.commission_rate,
|
||||||
playlet_task.recommend_label,
|
playlet_task.recommend_label,
|
||||||
|
|
@ -143,6 +155,9 @@
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="ksStatus != null">ks_status,</if>
|
||||||
|
<if test="dyStatus != null">dy_status,</if>
|
||||||
|
<if test="dspStatus != null">dsp_status,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="taskId != null and taskId != ''">#{taskId},</if>
|
<if test="taskId != null and taskId != ''">#{taskId},</if>
|
||||||
|
|
@ -165,6 +180,9 @@
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="ksStatus != null">#{ksStatus},</if>
|
||||||
|
<if test="dyStatus != null">#{dyStatus},</if>
|
||||||
|
<if test="dspStatus != null">#{dspStatus},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -191,6 +209,9 @@
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="ksStatus != null">ks_status = #{ksStatus},</if>
|
||||||
|
<if test="dyStatus != null">dy_status = #{dyStatus},</if>
|
||||||
|
<if test="dspStatus != null">dsp_status = #{dspStatus},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue