wso2 dataservice创建生成响应

时间:2018-07-11 00:08:07

标签: postgresql api wso2 wso2-am wso2carbon

我想在wso2中通过查询创建数据服务吗?怎么做?查询将是这样:

with servicos as (
select cast(tec_servico as text) || '-' || ser_nome as servico,
       ser_metodo as metodo,
       coalesce(tec_vl_maximo, 0) as maximo,
       teh_tipo as origem,
       case when teh_dia_semana = 4410 then 0
            when teh_dia_semana = 4404 then 1
            when teh_dia_semana = 4405 then 2
            when teh_dia_semana = 4406 then 3
            when teh_dia_semana = 4407 then 4
            when teh_dia_semana = 4408 then 5
            when teh_dia_semana = 4409 then 6 end as dia,
       teh_hora_inicial_am as hora_inicial_am,
       teh_hora_final_am as hora_final_am,
       teh_hora_inicial_pm as hora_inicial_pm,
       teh_hora_final_pm as hora_final_pm
  from tb_gcc_ted_configuracao
  join tb_gfc_servico on (tec_servico = ser_cod_serial)
  join tb_gcc_ted_horario on (teh_servico = tec_servico)
  join tb_gen_registro on (reg_id_registro = teh_tipo)
 where reg_cod_registro = :origem
   and (tec_vl_maximo is null 
    or tec_vl_maximo > :valorLancamento)
)

select metodo
  from servicos
 where dia = extract(dow from current_date)
   and (current_time between hora_inicial_am and hora_final_am
    or current_time between hora_inicial_pm and hora_final_pm)
 order by metodo 
 limit 1

并给出以下错误:

SQL查询不适用于自动响应

我如何才能让wso2识别?

0 个答案:

没有答案