|
|
|
@ -14,9 +14,31 @@ import java.util.Iterator;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <pre>
|
|
|
|
|
*
|
|
|
|
|
* query xml : mybatis 기본 문법 지원
|
|
|
|
|
* #{var} --> .setParameter("var", "")
|
|
|
|
|
* ? --> .setParameter(1, "")
|
|
|
|
|
* <if text="id != null"> and id in (:ids)</if>
|
|
|
|
|
* --> .setParameter("ids", Arrays.asList("id1", "id2")
|
|
|
|
|
*
|
|
|
|
|
* <where>
|
|
|
|
|
* <if text= "">AND ...</if>
|
|
|
|
|
* <if text= "">AND ...</if>
|
|
|
|
|
* </where>
|
|
|
|
|
*
|
|
|
|
|
* <switch>
|
|
|
|
|
* <case text=" " >...</case>
|
|
|
|
|
* <case text=" " >...</case>
|
|
|
|
|
* <otherwise>
|
|
|
|
|
* .....
|
|
|
|
|
* </otherwise>
|
|
|
|
|
* </switch>
|
|
|
|
|
*
|
|
|
|
|
* lib use
|
|
|
|
|
* implementation 'dom4j:dom4j:1.6.1'
|
|
|
|
|
* implementation 'jaxen:jaxen:1.2.0'
|
|
|
|
|
* </pre>
|
|
|
|
|
*/
|
|
|
|
|
public class QueryGenerator {
|
|
|
|
|
|
|
|
|
|