<![CDATA[
select * from (
select rownum rowcount,a.city_code city_code,a.order_id order_id,a.create_date create_date,a.gift_package_name gift_package_name,b.product_name product_name,a.number_resource number_resource,a.fee_value fee_value,a.PAY_WAY_NAME
from(
select a.city_code,a.order_id,a.resource_id,a.create_date,a.gift_package_name,b.number_resource,a.fee_value,a.PAY_WAY_NAME
from(
select a.city_code,a.order_id,a.resource_id,a.create_date,b.gift_package_name gift_package_name,a.fee_value,a.PAY_WAY_NAME
from(
select a.city_code,a.order_id,d.resource_id,f.create_date,e.fee_value,g.PAY_WAY_NAME
from es_order_info_t a,es_order_prod_inst_t b,es_product_inst_t c,es_prod_item_inst_t d,es_pay_fee_item_t e,es_shop_alipay_control_t f,es_pay_way_t g
where a.order_id = b.order_id
and b.product_inst_id = c.product_inst_id
and c.product_inst_id = d.product_inst_id
and d.product_inst_id = e.product_inst_id
and a.order_id = f.register_number
and a.PAY_WAY = g.PAY_WAY
and c.product_id = #productId#
<isEqual property ="payWay" compareValue ="0" >
and a.pay_way in (1,2)
</isEqual>
<isNotEqual property = "payWay" compareValue ="0" >
and a.pay_way = #payWay#
</isNotEqual>
and a.complete_status in ('1','2')
and f.accept_status in ('1','0')
) a inner join es_mobile_package_t b on a.resource_id = b.gift_package_id
) a left join
(
select a.city_code,a.order_id,a.resource_id,a.create_date,b.number_resource number_resource,a.PAY_WAY_NAME
from(
select a.city_code,a.order_id,d.resource_id,f.create_date,e.fee_value,g.PAY_WAY_NAME
from es_order_info_t a,es_order_prod_inst_t b,es_product_inst_t c,es_prod_item_inst_t d,es_pay_fee_item_t e,es_shop_alipay_control_t f,es_pay_way_t g
where a.order_id = b.order_id
and b.product_inst_id = c.product_inst_id
and c.product_inst_id = d.product_inst_id
and d.product_inst_id = e.product_inst_id
and a.order_id = f.register_number
and a.PAY_WAY = g.PAY_WAY
and c.product_id = #productId#
<isEqual property ="payWay" compareValue ="0" >
and a.pay_way in (1,2)
</isEqual>
<isNotEqual property = "payWay" compareValue ="0" >
and a.pay_way = #payWay#
</isNotEqual>
and a.complete_status in ('1','2')
and f.accept_status in ('1','0')
) a inner join es_number_resource_t b on a.resource_id = b.number_resource
) b on a.order_id = b.order_id
) a left join
(
select a.city_code,a.order_id,a.resource_id,a.create_date,b.product_name product_name,a.fee_value,a.PAY_WAY_NAME
from(
select a.city_code,a.order_id,d.resource_id,f.create_date,e.fee_value,g.PAY_WAY_NAME
from es_order_info_t a,es_order_prod_inst_t b,es_product_inst_t c,es_prod_item_inst_t d,es_pay_fee_item_t e,es_shop_alipay_control_t f,es_pay_way_t g
where a.order_id = b.order_id
and b.product_inst_id = c.product_inst_id
and c.product_inst_id = d.product_inst_id
and d.product_inst_id = e.product_inst_id
and a.order_id = f.register_number
and a.PAY_WAY = g.PAY_WAY
and c.product_id = #productId#
<isEqual property ="payWay" compareValue ="0" >
and a.pay_way in (1,2)
</isEqual>
<isNotEqual property = "payWay" compareValue ="0" >
and a.pay_way = #payWay#
</isNotEqual>
and a.complete_status in ('1','2')
and f.accept_status in ('1','0')
) a inner join es_main_product_t b on a.resource_id = b.product_suite_id
) b on a.order_id = b.order_id
where a.city_code = #cityCode#
and a.create_date >= to_date(#beginDate#,'yyyy-mm-dd hh24:mi:ss')
and a.create_date <= to_date(#endDate#,'yyyy-mm-dd hh24:mi:ss')
and rownum < #endRowCount#
) where rowcount >= #beginRowCount#
]]>
</select>
本来可以正常运行但是加上<isEqual property ="payWay" compareValue ="0" >
and a.pay_way in (1,2)
</isEqual>
<isNotEqual property = "payWay" compareValue ="0" >
and a.pay_way = #payWay#
</isNotEqual>
就会报题目的异常 哪个大侠给看看
1 个解决方案
#1
<isEqual property ="payWay" compareValue ="0" >
and a.pay_way in (1,2)
</isEqual>
<isNotEqual property = "payWay" compareValue ="0" >
and a.pay_way = #payWay#
</isNotEqual>
你的这个a.pay_way 是啥呀,
看你最后的SQL是啥咯, 放在数据库里执行一下,
and a.pay_way in (1,2), 这里不行的话, 就改成 and a.pay_way in ('1','2')
and a.pay_way = #payWay# 这里改成 and a.pay_way = '#payWay#'
and a.pay_way in (1,2)
</isEqual>
<isNotEqual property = "payWay" compareValue ="0" >
and a.pay_way = #payWay#
</isNotEqual>
你的这个a.pay_way 是啥呀,
看你最后的SQL是啥咯, 放在数据库里执行一下,
and a.pay_way in (1,2), 这里不行的话, 就改成 and a.pay_way in ('1','2')
and a.pay_way = #payWay# 这里改成 and a.pay_way = '#payWay#'
#1
<isEqual property ="payWay" compareValue ="0" >
and a.pay_way in (1,2)
</isEqual>
<isNotEqual property = "payWay" compareValue ="0" >
and a.pay_way = #payWay#
</isNotEqual>
你的这个a.pay_way 是啥呀,
看你最后的SQL是啥咯, 放在数据库里执行一下,
and a.pay_way in (1,2), 这里不行的话, 就改成 and a.pay_way in ('1','2')
and a.pay_way = #payWay# 这里改成 and a.pay_way = '#payWay#'
and a.pay_way in (1,2)
</isEqual>
<isNotEqual property = "payWay" compareValue ="0" >
and a.pay_way = #payWay#
</isNotEqual>
你的这个a.pay_way 是啥呀,
看你最后的SQL是啥咯, 放在数据库里执行一下,
and a.pay_way in (1,2), 这里不行的话, 就改成 and a.pay_way in ('1','2')
and a.pay_way = #payWay# 这里改成 and a.pay_way = '#payWay#'