我这的原因是 在sql中使用as ,使用as时 别名必须与resultType返回实体类中的属性一致,不能使用引号带的别名;
<select id="analyzeFranchisee" parameterType="string" resultType="com.dny.website.entity.Analyze">
select case when principal is null then '统计' else principal end as principal,count(*) as quantum,
sum(case when communicate='1' then 1 else 0 end) as communicate,
sum(case when communicate='0' then 1 else 0 end) as not_communicate,
sum(case when intention='1' then 1 else 0 end) as intention,
sum(case when intention='0' then 1 else 0 end) not_intention,
sum(case when custo_Signing='1' then 1 else 0 end) as signing,
sum(case when custo_Signing='0' then 1 else 0 end) as not_signing,
Ifnull(sum(Signing_money),0) as money
from franchisee
<where>
principal!='not'
<if test="source!=null and source!=''">
and source=#{source}
</if>
<if test="minTime!=null and minTime!=''">
and commit_time>=concat('',${minTime},'00:00:00')
</if>
<if test="maxTime!=null and maxTime!=''">
and commit_time<=concat('',${maxTime},'23:59:59')
</if>
</where>
group by principal with rollup
</select>