当前位置:网站首页>MySQL circulates multiple values foreach, XML writing method
MySQL circulates multiple values foreach, XML writing method
2022-06-11 05:23:00 【Bug repair robot】
1.dao Layer interface :
List<User> getUsers(@Param("statusList")List statusList,@Param("startDate")Date startDate,@Param("endDate") Date endDate);2.xml file :
<select id="getUsers" resultType="User">
SELECT
*
FROM
user a
WHERE
<if test="statusList != null and statusList.size()>0">
a.maintain_status in
<foreach item="status" index="index" collection="statusList" open="(" close=")" separator=",">
#{status}
</foreach>
</if>
and DATE_FORMAT(a.update_date, '%Y-%m-%d') between date_format(#{startDate}, '%Y-%m-%d')
and date_format(#{endDate}, '%Y-%m-%d')
</select>If you pass in an object
dao layer
@Param("statusList")List<user> statusListxml The middle parameter is :#{status.status}
边栏推荐
- [NIPS2021]MLP-Mixer: An all-MLP Architecture for Vision
- MySQL string to array, merge result set, and convert to array
- Number of atoms (easy to understand)
- The central rural work conference has released important signals. Ten ways for AI technology to help agriculture can be expected in the future
- 22. Generate parentheses
- Analysis while experiment - a little optimization of memory leakage in kotlin
- Zed2 camera manual
- Wechat applet uploads the data obtained from database 1 to database 2
- Share | guide language image pre training to achieve unified visual language understanding and generation
- js promise,async,await简单笔记
猜你喜欢

Tianchi - student test score forecast

JVM tuning 6: GC log analysis and constant pool explanation

(十五)红外通信

NVIDIA SMI has failed because it could't communicate with the NVIDIA driver

Share 𞓜 jointly pre training transformers on unpaired images and text

Yolov5 training personal data set summary

点击图标不灵敏咋整?

Analyzing while experimenting - memory leakage caused by non static inner classes

Carrier coordinate system inertial coordinate system world coordinate system

Zed2 camera calibration -- binocular, IMU, joint calibration
随机推荐
截取文件扩展名
Huawei device configuration bgp/mpls IP virtual private network command
Paper recommendation: relicv2, can the new self supervised learning surpass supervised learning on RESNET?
2021 iccv paper sharing - occlusion boundary detection
GAMES101作业7-Path Tracing实现过程&代码详细解读
Section III: structural characteristics of cement concrete pavement
Paper reproduction: pare
oh my zsh正确安装姿势
49. grouping of acronyms
Oh my Zsh correct installation posture
Sealem finance builds Web3 decentralized financial platform infrastructure
KD-Tree and LSH
Preliminary test of running vins-fusion with zed2 binocular camera
Click the icon is not sensitive how to adjust?
The programmers of a large factory after 95 were dissatisfied with the department leaders, and were sentenced for deleting the database and running away
[aaai 2021 timing action nomination generation] detailed interpretation of bsn++ long article
Zed2 camera manual
22、生成括号
Common methods of tool class objectutil
【入门级基础】Node基础知识总结