---
title: "pfw中totalFound有值,result却没有值"
author: "zhou_wu"
date: "2011-03-15T17:41:34Z"
tags: []
categories: ["企业架构"]
slug: "pfw-totalfound-result"
draft: false
lastmod: "2011-03-15T17:43:02Z"
id: 963399
url: "https://leesmart.iteye.com/blog/963399"
---

pfw里的配置

```xml
<map-sql id="/order/getOrderList" type="query"
		param-map="/order/getOrderListParams"
		result-map="/order/getOrderListResults">
		<![cdata[
			select *
			from tbl_ss_order
			where 1=1
			<isNotEmpty property="domainId">
				AND DOMAIN_ID = ##domainId##
			</isNotEmpty>
			<isNotEmpty property="orderType">
				AND ORDER_TYPE = ##orderType##
			</isNotEmpty>
			<isNotEmpty property="orderStatus">
				AND ORDER_STATUS = ##orderStatus##
			</isNotEmpty>
			
			<dynamic prepend="ORDER BY">
				<isNotEmpty property="sortOrder">
					#sortOrder# #orderType#
				</isNotEmpty>
			</dynamic>
		]]>
	</map-sql>
```


错误原因：
orderType是pfw里的关键字，而我们的sql语句中还是用到了orderType这个变量，一般情况下是由于Class的路径不正确