<select id="getOilStaticListByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="Base_Column_List"/>
from oilstation
<where>
<if test="universalCode!=null and universalCode!=''">
and UniversalCode = #{universalCode}
</if>
</where>
</select>
要把where改成标签,否则sql语句报错!!
SELECT COUNT(*) FROM
(SELECT
UniversalCode,
Address,
IsFacilityPay,
Location,
OUCode
FROM
oilstation
WHERE) tmp_count