mysql接收list参数
List<MarketAnalysisCompanys> getCompanyReduceData(String companyId,List<String> labelNameList, String beginTime, String endTime);
<select id="getCompanyReduceData" resultType="com.spang.wechat.entity.MarketAnalysisCompanys">
SELECT max(production_plan) production_plan,label_company_name
FROM market_analysis_companys
where company_id =#{companyId}
and label_company_name in
<foreach item="item" index="index" collection="labelNameList" open="(" separator="," close=")">
#{item}
</foreach>
and data_time between #{beginTime} and #{endTime}
GROUP BY date_format(data_time,'%Y%m')
</select>
本文含有隐藏内容,请 开通VIP 后查看