From f73ac016eeed7515c5e79adffd3d0e05f343110d Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Fri, 10 May 2024 23:45:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E9=9B=86=E8=B0=83=E6=95=B4=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/PlayletItemController.java | 10 ++ .../src/main/resources/application.yml | 2 +- .../templates/system/playlet/item/add.html | 39 +++---- .../templates/system/playlet/item/edit.html | 71 ++++++------ .../templates/system/playlet/item/item.html | 104 ++++++++++++++++-- .../playlet/system/domain/PlayletItem.java | 17 ++- .../service/impl/PlayletItemServiceImpl.java | 22 ++-- .../mapper/system/PlayletItemMapper.xml | 22 +++- 8 files changed, 204 insertions(+), 83 deletions(-) diff --git a/playlet-admin/src/main/java/com/playlet/web/controller/system/PlayletItemController.java b/playlet-admin/src/main/java/com/playlet/web/controller/system/PlayletItemController.java index 0b71e99..39d1647 100644 --- a/playlet-admin/src/main/java/com/playlet/web/controller/system/PlayletItemController.java +++ b/playlet-admin/src/main/java/com/playlet/web/controller/system/PlayletItemController.java @@ -2,6 +2,7 @@ package com.playlet.web.controller.system; import java.util.List; +import com.playlet.common.core.domain.entity.SysUser; import com.playlet.system.domain.PlayletItemType; import com.playlet.system.service.IPlayletItemTypeService; import com.playlet.system.service.ISysDictDataService; @@ -148,4 +149,13 @@ public class PlayletItemController extends BaseController { { return toAjax(playletItemService.deletePlayletItemByIds(ids)); } + + @Log(title = "短剧管理", businessType = BusinessType.UPDATE) + @RequiresPermissions("system:item:edit") + @PostMapping("/changeStatus") + @ResponseBody + public AjaxResult changeStatus(PlayletItem playletItem) + { + return toAjax(playletItemService.updatePlayletItem(playletItem)); + } } diff --git a/playlet-admin/src/main/resources/application.yml b/playlet-admin/src/main/resources/application.yml index 84525b1..3331b13 100644 --- a/playlet-admin/src/main/resources/application.yml +++ b/playlet-admin/src/main/resources/application.yml @@ -134,7 +134,7 @@ shiro: cipherKey: session: # Session超时时间,-1代表永不过期(默认30分钟) - expireTime: 30 + expireTime: 720 # 同步session到数据库的周期(默认1分钟) dbSyncPeriod: 1 # 相隔多久检查一次session的有效性,默认就是10分钟 diff --git a/playlet-admin/src/main/resources/templates/system/playlet/item/add.html b/playlet-admin/src/main/resources/templates/system/playlet/item/add.html index 01a36d3..30076c2 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/item/add.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/item/add.html @@ -73,6 +73,12 @@ +
+ +
+ +
+
@@ -98,7 +104,7 @@
- +
@@ -110,16 +116,7 @@
- -
-
- - -
-
-
-
- +
@@ -152,16 +149,20 @@ } } - $("input[name='releaseTime']").datetimepicker({ - format: "yyyy-mm-dd hh:mm", - minView: "month", - autoclose: true - }); + // $("input[name='releaseTime']").datetimepicker({ + // format: 'yyyy-mm-dd hh:ii', + // todayBtn: true, + // dateFormat: 'yyyy-mm-dd',//日期显示格式 + // timeFormat: 'HH:mm:ss',//时间显示格式 + // autoclose: true, + // }); $("input[name='upTime']").datetimepicker({ - format: "yyyy-mm-dd hh:mm", - minView: "month", - autoclose: true + format: 'yyyy-mm-dd hh:ii', + todayBtn: true, + dateFormat: 'yyyy-mm-dd',//日期显示格式 + timeFormat: 'HH:mm:ss',//时间显示格式 + autoclose: true, }); diff --git a/playlet-admin/src/main/resources/templates/system/playlet/item/edit.html b/playlet-admin/src/main/resources/templates/system/playlet/item/edit.html index d89b7de..653e3e1 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/item/edit.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/item/edit.html @@ -15,27 +15,25 @@
- + +
+ +
+
+
+ +
+ +
+
+
+
-
- -
- -
-
-
- -
- -
-
@@ -74,6 +72,12 @@
+
+ +
+ +
+
@@ -93,25 +97,16 @@
- +
- +
- - -
-
-
-
- -
-
- +
@@ -138,16 +133,18 @@ } } - $("input[name='releaseTime']").datetimepicker({ - format: "yyyy-mm-dd hh:mm", - minView: "month", - autoclose: true - }); + // $("input[name='releaseTime']").datetimepicker({ + // format: "yyyy-mm-dd hh:mm", + // minView: "month", + // autoclose: true + // }); $("input[name='upTime']").datetimepicker({ - format: "yyyy-mm-dd hh:mm", - minView: "month", - autoclose: true + format: 'yyyy-mm-dd hh:ii', + todayBtn: true, + dateFormat: 'yyyy-mm-dd',//日期显示格式 + timeFormat: 'HH:mm:ss',//时间显示格式 + autoclose: true, }); diff --git a/playlet-admin/src/main/resources/templates/system/playlet/item/item.html b/playlet-admin/src/main/resources/templates/system/playlet/item/item.html index 66e98d4..68a8210 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/item/item.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/item/item.html @@ -77,15 +77,37 @@ title: '任务ID' }, { + visible: false, field: 'itemTypeName', title: '剧场' }, { - field: 'sourceType', - title: '来源类型', + field: 'producer', + title: '出品方' + }, + { + field: 'tags', + title: '推荐标签' + }, + { + title: '抖音', align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(typeDict, value); + 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); } }, { @@ -96,10 +118,6 @@ field: 'actorName', title: '主角名' }, - { - field: 'producer', - title: '出品方' - }, { field: 'completeNot', title: '视频是否完结', @@ -146,7 +164,7 @@ }, { field: 'numberEpisode', - title: '前端剧集' + title: '总剧集' }, { field: 'numberCost', @@ -158,8 +176,8 @@ visible: false }, { - field: 'releaseTime', - title: '上映时间' + field: 'createTime', + title: '创建时间' }, { field: 'remark', @@ -179,6 +197,70 @@ }; $.table.init(options); }); + + function dyStatusTools(row) { + if (row.dyStatus === '01') { + return ' '; + } else { + return ' '; + } + } + + 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 ' '; + } else { + return ' '; + } + } + + 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 ' '; + } else { + return ' '; + } + } + + 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" }); + }) + } + \ No newline at end of file diff --git a/playlet-system/src/main/java/com/playlet/system/domain/PlayletItem.java b/playlet-system/src/main/java/com/playlet/system/domain/PlayletItem.java index c8d0c24..b5d0552 100644 --- a/playlet-system/src/main/java/com/playlet/system/domain/PlayletItem.java +++ b/playlet-system/src/main/java/com/playlet/system/domain/PlayletItem.java @@ -41,6 +41,15 @@ public class PlayletItem extends BaseEntity{ @ApiModelProperty(value = "来源类型 1.抖音 2.快手 3.视频号") private Long sourceType; + @ApiModelProperty(value = "抖音上架状态") + private String dyStatus; + + @ApiModelProperty(value = "快手上架状态") + private String ksStatus; + + @ApiModelProperty(value = "视频上架状态") + private String dspStatus; + @TableField(exist = false) private String [] sourceTypeIds; @@ -70,14 +79,18 @@ public class PlayletItem extends BaseEntity{ @ApiModelProperty(value = "出品方") private String producer; + @Excel(name = "推荐标签") + @ApiModelProperty(value = "推荐标签") + private String tags; + /** 上映时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "出品时间", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty(value = "出品时间") private Date releaseTime; - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "上线时间", width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd hh:mm") + @Excel(name = "上线时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm") @ApiModelProperty(value = "上线日期") private Date upTime; diff --git a/playlet-system/src/main/java/com/playlet/system/service/impl/PlayletItemServiceImpl.java b/playlet-system/src/main/java/com/playlet/system/service/impl/PlayletItemServiceImpl.java index 7043b6a..dccb654 100644 --- a/playlet-system/src/main/java/com/playlet/system/service/impl/PlayletItemServiceImpl.java +++ b/playlet-system/src/main/java/com/playlet/system/service/impl/PlayletItemServiceImpl.java @@ -63,23 +63,21 @@ public class PlayletItemServiceImpl extends ServiceImpl + + + + - select id, item_id,task_id, number_cost, source_type, video_name, complete_not, cover_pic, actor_name, producer, connect_site, release_time, video_type, label_type, item_type, number_episode, up_time, is_delete, special_item, for_user, remark, create_by, update_by, create_time, update_time from playlet_item + select id, item_id,task_id, number_cost, source_type, dy_status, ks_status, dsp_status, video_name, complete_not, cover_pic, actor_name, producer, tags, connect_site, release_time, video_type, label_type, item_type, number_episode, up_time, is_delete, special_item, for_user, remark, create_by, update_by, create_time, update_time from playlet_item