当前位置:网站首页>Collections SQL communes
Collections SQL communes
2022-07-03 21:18:00 【Capture d'images】
@valid Méthode de vérification:
Si vous êtes springboot Projets,Il n'est donc pas nécessaire d'introduire,Déjà introduit,Il existe au cœur de web Dans le kit de développement.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.0.5.RELEASE</version>
</dependency>
Si ce n'est pas le cas, springboot Projets,Ensuite, vous pouvez introduire les dépendances suivantes:
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.4.1.Final</version>
</dependency>
Introduire des annotations entre les classes d'entités
/** Nom */
@NotBlank(message = "Veuillez saisir un nom")
@Length(message = "Les noms ne peuvent pas dépasser {max} Les caractères", max = 10)
public String name;
/** Âge */
@NotNull(message = "Veuillez entrer l'âge")
@Range(message = "La tranche d'âge est {min} À {max} Entre", min = 1, max = 100)
public Integer age;
Informations anormales:
Requête floue plus foreachOpérations par lots:
<select id="searchPrivate" resultType="">
select *
from customer c LEFT JOIN base_user bu ON c.cur_uid = bu.id AND bu.status = 1
<where>
c.del_flag = 0
<if test="param.cusName != null and param.cusName != ''">
and c.cus_name like concat('%',#{
param.cusName},'%')
</if>
<if test="param.cusId != null and param.cusId != ''">
and c.cus_id = #{
param.cusId}
</if>
<if test="param.intentElecStart != null">
and <![CDATA[ c.intent_elec >= #{
param.intentElecStart} ]]>
</if>
<if test="param.intentElecEnd != null">
and <![CDATA[ c.intent_elec <= #{
param.intentElecEnd} ]]>
</if>
<if test="param.cusType != null">
and c.cus_type = #{
param.cusType}
</if>
<if test="null != param.userIdList and param.userIdList.size() > 0">
and c.cur_uid in (
<foreach collection="param.userIdList" item="item" separator=",">
#{
item}
</foreach>
)
</if>
<if test="null != param.cusIds and param.cusIds.size() > 0">
or c.cus_id in (
<foreach collection="param.cusIds" item="item" separator=",">
#{
item}
</foreach>
)
</if>
</where>
order by c.update_time desc
</select>
边栏推荐
- Yiwen teaches you how to choose your own NFT trading market
- Mysql database ----- common commands of database (based on database)
- Operate BOM objects (key)
- MySQL——SQL注入问题
- 强化学习-学习笔记1 | 基础概念
- MySQL - idea connects to MySQL
- 强化學習-學習筆記1 | 基礎概念
- Offset related concepts + drag modal box case
- 仿网易云音乐小程序
- 技术管理进阶——如何在面试中考察候选人并增大入职概率
猜你喜欢
90 後,辭職創業,說要卷死雲數據庫
The post-90s resigned and started a business, saying they would kill cloud database
leetcode-540. A single element in an ordered array
Use nodejs+express+mongodb to complete the data persistence project (with modified source code)
【愚公系列】2022年7月 Go教学课程 002-Go语言环境安装
90 后,辞职创业,说要卷死云数据库
Tidb's initial experience of ticdc6.0
treevalue——Master Nested Data Like Tensor
@Transactional注解失效的场景
Visiontransformer (I) -- embedded patched and word embedded
随机推荐
How to choose cache read / write strategies in different business scenarios?
Custom view incomplete to be continued
MySQL——SQL注入问题
Analyse de REF nerf
鹏城杯 WEB_WP
JS three families
2022 low voltage electrician examination and low voltage electrician simulation examination question bank
jvm jni 及 pvm pybind11 大批量数据传输及优化
TLS environment construction and plaintext analysis
Hcie security Day10: six experiments to understand VRRP and reliability
Pengcheng cup Web_ WP
Kubernetes abnormal communication network fault solution ideas
Idea shortcut word operation
2022-02-15 Daily: 2022 AAAI fellow release
Basic preprocessing and data enhancement of image data
Measurement fitting based on Halcon learning -- Practice [1]
Goodbye 2021, how do programmers go to the top of the disdain chain?
Single page application architecture
Haven't expressed the artifact yet? Valentine's Day is coming. Please send her a special gift~
Hcie security Day12: supplement the concept of packet filtering and security policy