<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Api id="__0coZLqxYOlqJ99su81W">
  <name>课程章信息</name>
  <parentId>__LgZds5MVHW3o08T7UcX</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <status>published</status>
  <apiGroup></apiGroup>
  <encode>UTF-8</encode>
  <requestType>get</requestType>
  <requestUrl>/lesson/chapterInfo/{lessonId}</requestUrl>
  <tags></tags>
  <responseType>json</responseType>
  <responseScript><![CDATA[#include "sysfunction";
(function(){    
    var lessonId=getParameter("lessonId"); 
  var chapterName=getParameter("chapterName"); 
    var chapterId=getParameter("chapterId");   
  var whereStr =" and 1=1 ";
  if(isNotNull(chapterId)){
  whereStr +=" and id = '"+chapterId+"' ";
}
    if(isNotNull(chapterName)){
  whereStr +=" and ITEM_CHAPTERNAME like '%"+chapterName+"%' ";
}
    var sql = "select '"+getDomainid()+"' as domainid,"+
        "ID,"+
"ID as ITEM_ID,"+
        "ITEM_CHAPTERNAME," + //章节名称
        "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_LESSONID" + //课程Id
     " from tlk_lesson_chapter where ITEM_LESSONID = '"+lessonId+"' "+whereStr;
  sql += " limit 1000"
   var sqlDatas = queryByDSName("organizationAuth", sql);
return sqlDatas; 
    })();]]></responseScript>
</Api>