矩阵系统源码主要有三种框架:Spring、Struts和Hibernate。Spring框架是一个全栈式的Java应用程序开发框架,提供了IOC容器、AOP、事务管理等功能。Struts框架是一个MVC架构的Web应用程序框架,用于将数据模型、Web应用程序的用户界面和控制器逻辑分离。Hibernate框架是一个面向对象的数据库访问框架,提供了ORM(对象关系映射)机制,允许开发人员使用面向对象的方式来操作数据库。这三种框架结合使用,可以提高开发效率,降低代码复杂度,提高系统性能和稳定性。
video' => [
'type' => 1,
'title' => '视频素材('.($material_model->getMaterialCountByVideo($da_id, 1)).')',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=1",
],
'image' => [
'type' => 3,
'title' => '图片素材('.($material_model->getMaterialCountByVideo($da_id, 3)).')',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=3",
],
'audio' => [
'type' => 2,
'title' => '音频素材('.($material_model->getMaterialCountByVideo($da_id, 2)).')',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=2",
],
'title' => [
'type' => 4,
'title' => '标题素材('.($material_model->getMaterialCountByVideo($da_id, 4)).')',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=4",
],
'write' => [
'type' => 5,
'title' => '文案素材('.($material_model->getMaterialCountByVideo($da_id, 5)).')',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=5",
],
/*
'dubin' => [
'type' => 6,
'title' => '配音选择',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=6",
],
*/
'background' => [
'type' => 7,
'title' => '背景选择('.($material_model->getMaterialCountByVideo($da_id, 7)).')',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=7",
],
'mixcut' => [
'type' => 0,
'title' => 'AI混剪视频('.($temp_video_count).')',
'url' => "/dydqtshoppc/video/videoTemplateList?dv_id={$da_id}&type=0",
],
];
switch ($video_mode) {
case 1 :
case 2 :
case 3 :
case 4 :
unset($type_list['image']);
break;
case 11 :
unset($type_list['video']);
$type = $type == 1 ? 3 : $type;
break;
default :
break;
}
$type_list_single = array_column($type_list,'title','type');
$this->output['now_type'] = $type;
$this->output['type_list'] = $type_list;
$this->output['type_list_single'] = $type_list_single;
//获取素材组合信息
$pailie_model = new App_Model_Douyin_MysqlVideoMaterialPailieStorage();
$pailie_row = $pailie_model->getRowByDvid($da_id);
$pailie_row['dvmp_pailie_have'] = $pailie_row['dvmp_total']-$pailie_row['dvmp_used'];
//视频混剪模式
$this->output['pailie_row'] = $pailie_row;
$this->output['temp_video_count'] = $temp_video_count;
$this->output['project_mode'] = plum_parse_config('project_mixed_mode','dydqt/project')[$video_mode];
//输出操作指引
$index = [
1 => [
'order' => 1,
'title' => '视频素材',
'desc' => '根据混剪模式,必须上传',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=1",
],
2 => [
'order' => 2,
'title' => '音频素材',
'desc' => '背景音与文案配音,可二选一',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=2",
],
3 => [
'order' => 3,
'title' => '标题素材',
'desc' => '视频上半部分的标题,可不传',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=4",
],
4 => [
'order' => 4,
'title' => '文案素材',
'desc' => '视频下半部分的文案,可不传',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=5",
],
];
if ($video_mode == 11) {
$index[1] = [
'order' => 1,
'title' => '图片素材',
'desc' => '根据混剪模式,必须上传',
'url' => "/dydqtshoppc/video/materialList?dv_id={$da_id}&type=3",
];
}
$this->output['oper_index'] = $index;
}
/*
* 素材管理
*/
public function materialListAction(){
//面包屑
$breadcrumbs = [
['title' => '视频管理', 'link' => '/video/videoList'],
['title' => '素材管理', 'link' => '#'],
];
$this->buildBreadcrumbs($breadcrumbs);
$dv_id = $this->request->getIntParam('dv_id'); //活动ID
$type = $this->request->getIntParam('type',0); //素材类型
$keyword_type = $this->request->getStrParam('keyword_type');
$keyword = $this->request->getStrParam('keyword');
$scene = $this->request->getIntParam('scene',0);
//获取视频信息
$video_model = new App_Model_Douyin_MysqlVideoStorage();
$video_info = $video_model->getRowByIdSid($dv_id, $this->sid);
if(empty($video_info)){
plum_redirect_with_msg('该视频不存在');
}
$mixed_video_mode = $video_info['dv_video_mode'];
if (in_array($mixed_video_mode, [11])) { //智能图片组合
$type = in_array($type, [0,1]) ? 3 : $type; //默认为图片素材类型
} else {
$type = in_array($type, [0, 3]) ? 1 : $type; //默认为视频素材类型
}
//获取素材列表
$where = [
['name' => 'dvm_ds_id', 'oper' => '=', 'value' => $this->sid],
['name' => 'dvm_dv_id', 'oper' => '=', 'value' => $dv_id],
['name' => 'dvm_material_type', 'oper' => '=', 'value' => $type]
];
//视频类型,区分混剪模式
if ($type == 1) {
$where[] = ['name' => 'dvm_video_mixed_mode', 'oper' => '=', 'value'