-- 应用接入命名空间
#namespace("yp")
  #sql("getTaskInfo")
    select t1.*,t2.bx_name from t_yp_record as t1 inner join t_yp_bx as t2 on t1.bx_id=t2.bx_id
    where t1.task_id=#para(task_id) and t1.b_use=1 
    #if(bx_id)
        and  t1.bx_id=#para(bx_id)
    #end
    order by t1.bx_id
  #end

  #sql("listTask")
    select task_id,task_name,date_format(create_time,'%Y-%m-%d') as create_time,b_use,is_run
    from t_yp_task where b_use=1 order by task_id desc
  #end
#end