mysql接收list参数以及日期格式化

mysql接收list参数

java 复制代码
List<MarketAnalysisCompanys> getCompanyReduceData(String companyId,List<String> labelNameList, String beginTime, String endTime);
xml 复制代码
    <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>
相关推荐
键盘上的猫头鹰2 小时前
【MySQL 教程(八)】索引、事务、用户管理、导入导出与分页查询
数据库·python·mysql
Royzst2 小时前
数据库知识点
数据库
雪的季节3 小时前
企业级 Qt 全功能项目
开发语言·数据库·qt
宋浮檀s3 小时前
应急响应——Web漏洞:命令执行+SSRF+弱口令
运维·数据库·sql·网络安全·oracle·应急响应
yurenpai(27届找实习中)5 小时前
redis_点评(21.好友关注——关注、取关功能实现;共同关注功能实现)
数据库·redis·缓存
Rick19935 小时前
索引的排序和分组
数据库·mysql
爱莉希雅&&&5 小时前
zabbix快速搭建和使用
android·linux·数据库·zabbix·监控
不爱编程的小陈5 小时前
事务的进化:从MySQL单机事务到TiDB分布式事务的探究
分布式·mysql·tidb
JohnYan5 小时前
工作笔记 - PG分组极值
数据库·后端·postgresql
清溪5495 小时前
DataEase H2 JDBC-RCE(CVE-2025-32966)复现
数据库·安全