统计线索的个数
<!-- 统计查询 -->
<select id="countTwmClew" parameterType="tf56.teamwork.query.TwmcClewCountQuery" resultType="java.lang.Integer">
SELECT count(clewId) as twmClew
FROM TwmClew
WHERE organizationIds = #{organizationIds,jdbcType=VARCHAR}
<if test="businessType != null and businessType != ''" > AND businessType = #{businessType,jdbcType=INTEGER}</if>
<if test="operatorId != null and operatorId != ''" > AND updateManId = #{operatorId,jdbcType=VARCHAR}</if>
<if test="operatorIdList !=null and operatorIdList.size > 0">
AND updateManId in
<foreach collection="operatorIdList" item="operatorId" open="(" close=")" separator=",">
#{operatorId}
</foreach>
</if>
<if test="startDate != null and startDate != ''">
<![CDATA[ AND inputDate >= #{startDate}]]>
</if>
<if test="endDate != null and endDate != ''">
<![CDATA[ AND inputDate <= #{endDate}]]>
</if>
AND isDeleted = 0
</select>
DAO层的返回类型:
/**
* 统计线索个数
* @param twmcClewCountQuery
* @return
*/
Integer countTwmClew(TwmcClewCountQuery twmcClewCountQuery);
注意返回的类型mapper文件:
代码层面: