insert into business_task(operate, task_cron, task_name, state, b_id, template_id, task_id)
values (#{operate}, #{taskCron}, #{taskName}, #{state}, #{bId}, #{templateId}, #{taskId})
select t.operate,t.task_cron,t.task_cron taskCron,t.create_time,t.create_time createTime,t.task_name,t.task_name
taskName,t.state,t.b_id,t.b_id bId,t.template_id,t.template_id templateId,t.task_id,t.task_id taskId
from business_task t
where 1 =1
and t.operate= #{operate}
and t.task_cron= #{taskCron}
and t.create_time= #{createTime}
and t.task_name= #{taskName}
and t.state= #{state}
and t.b_id= #{bId}
and t.template_id= #{templateId}
and t.task_id= #{taskId}
insert into task(
task_cron,create_time,task_name,status_cd,state,b_id,template_id,task_id
) select t.task_cron,t.create_time,t.task_name,'0',t.state,t.b_id,t.template_id,t.task_id from business_task t
where 1=1
and t.operate= 'ADD'
and t.task_cron= #{taskCron}
and t.create_time= #{createTime}
and t.task_name= #{taskName}
and t.state= #{state}
and t.b_id= #{bId}
and t.template_id= #{templateId}
and t.task_id= #{taskId}
select t.task_cron,t.task_cron taskCron,t.create_time,t.create_time createTime,t.task_name,t.task_name
taskName,t.status_cd,t.status_cd statusCd,t.state,t.b_id,t.b_id bId,t.template_id,t.template_id
templateId,t.task_id,t.task_id taskId,tt.template_name templateName
from task t,task_template tt
where 1 =1
and t.template_id = tt.template_Id
and t.task_cron= #{taskCron}
and t.create_time= #{createTime}
and t.task_name like '%${taskName}%'
and t.status_cd= #{statusCd}
and t.state= #{state}
and t.b_id= #{bId}
and t.template_id= #{templateId}
and tt.template_name like '%${templateName}%'
and t.task_id= #{taskId}
order by t.create_time desc
limit #{page}, #{row}
update task t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.task_cron= #{taskCron}
, t.task_name= #{taskName}
, t.state= #{state}
, t.template_id= #{templateId}
where 1=1
and t.b_id= #{bId}
and t.task_id= #{taskId}
select count(1) count
from task t,task_template tt
where 1 =1
and t.template_id = tt.template_Id
and t.task_cron= #{taskCron}
and t.create_time= #{createTime}
and t.task_name like '%${taskName}%'
and t.status_cd= #{statusCd}
and t.state= #{state}
and t.b_id= #{bId}
and t.template_id= #{templateId}
and tt.template_name like '%${templateName}%'
and t.task_id= #{taskId}
select count(1) count
from task_template t
where 1 =1
and t.template_id= #{templateId}
and t.template_name= #{templateName}
and t.class_bean= #{className}
and t.status_cd= #{statusCd}
select t.template_id templateId,t.template_name templateName,t.template_desc templateDesc,t.create_time
createTime,t.class_bean classBean
from task_template t
where 1 =1
and t.template_id= #{templateId}
and t.template_name= #{templateName}
and t.class_bean= #{className}
and t.status_cd= #{statusCd}
order by t.create_time desc
limit #{page}, #{row}
select count(1) count
from task_template_spec t
where 1 =1
and t.template_id= #{templateId}
and t.spec_cd= #{specCd}
and t.is_show= #{isShow}
and t.spec_desc= #{specDesc}
and t.status_cd= #{statusCd}
select t.template_id templateId,t.spec_id specId,t.spec_cd specCd,t.create_time createTime,t.spec_name specName,
t.spec_desc specDesc,t.is_show isShow
from task_template_spec t
where 1 =1
and t.template_id= #{templateId}
and t.spec_cd= #{specCd}
and t.is_show= #{isShow}
and t.spec_desc= #{specDesc}
and t.status_cd= #{statusCd}