- 在参数不确定是否需要的时候
@Select({"<script>",
"SELECT p1.`id`,p1.`name`, p1.`ssn`, p1.`sex`,p2.`A`,p2.`A1` ,p2.`A2`,p2.`A3`,p2.`A4`,p2.`B1` FROM person_data p1",
"INNER JOIN person_credit p2 ON p1.`id` = p2.`person_id`",
"WHERE",
"<when test='ssn!=null'>",
"ssn = #{ssn}",
"</when>",
"<when test='name!=null and ssn!=null'>",
"and",
"</when>",
"<when test='name!=null'>",
"name like CONCAT(#{name},'%')",
"</when>",
"</script>"})