904118851 1 year ago
parent
commit
91f3048c63
2 changed files with 9 additions and 12 deletions
  1. 0 6
      lualib/tools.lua
  2. 9 6
      service/dbmgr/init.lua

+ 0 - 6
lualib/tools.lua

@@ -349,14 +349,8 @@ M.response_db_get_video_list_by_folder_id = function(fd,msg_body,isok,tab)
     local list = tab
     local folder_list = {}
     local total_count = 0 
-    -- M.dump(list)
-    -- skynet.error("list",list)
-    -- skynet.error("msg_body",msg_body)
-    -- M.dump(msg_body)
     list,total_count = M.getPageData(msg_body.page,msg_body.count,list)
     for i = 1, #list, 1 do
-        -- skynet.error("create_time")
-        -- M.dump(list[i])
         table.insert(folder_list,i,{template_id=list[i].template_id,video_state=list[i].video_state,video_url=list[i].video_url,create_time=list[i].create_time,file_id=list[i].id,info=list[i].generate_video_info,file_name=list[i].video_name,custom=list[i].custom})
     end
     if #list<=0  then

+ 9 - 6
service/dbmgr/init.lua

@@ -50,8 +50,8 @@ s.resp.parse_template_info = function(info,template_info)
     --     end
     -- end
 
-    if  template_info.piantou_video_data.random_folder_resource_data~=nil then
-        local data = template_info.piantou_video_data.random_folder_resource_data
+    if  template_info.piantou_video_data.select_video_file~=nil then
+        local data = template_info.piantou_video_data.select_video_file
         table.insert(head_video,1,{video_id =data.info.id,path =data.info.path,duration=data.info.duration,info=data })
         -- table.insert(head_video,1,data)
     end
@@ -159,8 +159,8 @@ s.resp.parse_template_info = function(info,template_info)
     --         skynet.error("参数错误!没有指定随机也没指定固定文件")
     --     end
     -- end
-    if  template_info.pianwei_video_data.random_folder_resource_data~=nil then
-        local data = template_info.pianwei_video_data.random_folder_resource_data
+    if  template_info.pianwei_video_data.select_video_file~=nil then
+        local data = template_info.pianwei_video_data.select_video_file
         table.insert(end_video,1,{video_id =data.info.id,path =data.info.path,duration=data.info.duration,info = data })
         -- table.insert(end_video,1,data)
     end
@@ -202,8 +202,8 @@ s.resp.parse_template_info = function(info,template_info)
     --         skynet.error("参数错误!没有指定随机也没指定固定文件")
     --     end
     -- end
-    if  template_info.bgm_audio_data.random_folder_resource_data~=nil then
-        local data = template_info.bgm_audio_data.random_folder_resource_data
+    if  template_info.bgm_audio_data.select_video_file~=nil then
+        local data = template_info.bgm_audio_data.select_video_file
         table.insert(bgm_audio,1,{video_id =data.info.id,path =data.info.path,duration=data.info.duration,info = data })
         -- table.insert(bgm_audio,1,data)
     end
@@ -920,7 +920,10 @@ end
 --获取生成视频文件夹列表
 s.resp.get_generate_video_folder_list = function(msg_body,fd)
     skynet.fork(function(_fd,_msg_body)
+        -- local count = msg_body.count
+        -- local page = (msg_body.page - 1) * count
         local sql = string.format("select * from generate_video_folder_list_tab where user_id = %d AND video_stype = %d",_msg_body.user_id,_msg_body.video_stype)
+        -- local sql = string.format("select * from generate_video_folder_list_tab where user_id = %d AND video_stype = %d  limit %d,%d",_msg_body.user_id,_msg_body.video_stype,page,count)
         local res = db:query(sql)
         -- skynet.error('folder_list',sql)
         -- 判断是否找到数据