<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Api id="__kXLvXtn7UOduiNE1BG9">
  <name>课程节信息</name>
  <parentId>__LgZds5MVHW3o08T7UcX</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <status>published</status>
  <apiGroup></apiGroup>
  <encode>UTF-8</encode>
  <requestType>get</requestType>
  <requestUrl>/lesson/sectionInfo/{chapterId}</requestUrl>
  <tags></tags>
  <responseType>json</responseType>
  <responseScript><![CDATA[#include "sysfunction";
(function(){      
 var chapterId=getParameter("chapterId");  
var sectionId=getParameter("sectionId");   
var sectionName = getParameter("sectionName"); 
 var whereStr=" and 1=1 "
  if(isNotNull(sectionId)){
  whereStr += " and ID = '"+sectionId+"' ";
}
  if(isNotNull(sectionName)){
  whereStr += " and ITEM_SECTIONNAME like '%"+sectionName+"%' ";
}
var sql = "select '"+getDomainid()+"' as domainid,"+
    "ID,ITEM_LESSONCHAPTERID," + //章id
    "ITEM_LESSONRESOURCENAME," + //节资源
    "ITEM_SECTIONNAME," + //节名称
    "ITEM_COVERURL," + //课程封面
    "ITEM_DESCRIPTION," + //课程简介
    "ITEM_SEQ," + //节排序
    "ITEM_ISACTIVE," + //是否启用
    "DATE_FORMAT(ITEM_CREATEDTIME, '%Y-%m-%d %H:%i:%S' ) as ITEM_CREATEDTIME," + //创建时间
    "DATE_FORMAT(ITEM_UPDATEDTIME, '%Y-%m-%d %H:%i:%S' ) as ITEM_UPDATEDTIME," + //更新时间
    "ITEM_SECTIONRESURL," + //节资源url
    "ITEM_SECTIONRESOURCEFORMAT," + //节资源类型
    "ITEM_SECTIONRESOURCEID," + //节资源Id
    "ITEM_SECTIONTYPE," + //
    "ITEM_TOPICBANKNAME," + //题库名称
    "ITEM_TOPICBANKID," + //题库id
    "ITEM_ISCOMPLETED," + //是否已完成
    "ITEM_ISAUTHFACE," + //是否人脸采集
    "ITEM_SECTIONTIME," + //视频时长
    "ITEM_ISONFACE" + //
" from tlk_lesson_section where ITEM_LESSONCHAPTERID = '"+chapterId+"' "+whereStr;   
  sql += " limit 1000"
  //sql += " order by "
   var sqlDatas = queryByDSName("organizationAuth", sql);
return sqlDatas;    
      })();]]></responseScript>
</Api>