1. Parameter injection
1.1 uses the form of #{0}, #{1}, 0 represents the first parameter, 1 represents the second parameter
public List
1.2Map or encapsulated object, workerId is the key in the map; if it is an object, workerId For attributes in objects, this method is very commonly used
public Integer queryCountByWorkerId(Map queryParam);
public Integer queryCountByWorkerId(@param(“workerId”)String workerId);
2. Return
2.1 mapping
2.2 Return the object directly
3. Execute native sql
3.1sql parameters: //getter setter omitted
}
3.2 interface:
/**
* @Function description: Create
* @return
*/
/**
* @Function description: Query
* @param vo
* @return
*/
public List
> excuteSelectSql(ParamVo vo);
3.3xml:
${sql}
${}Do not compile sql and execute it directly. If you use #{sql}, an error may be reported
4.2 Quote
SELECT COUNT(1)
SELECT ID id, WORKER_ID workerId, UPDATE_DATE updateDate,...

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Mac version
God-level code editing software (SublimeText3)

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Zend Studio 13.0.1
Powerful PHP integrated development environment
