| | |
| | | <if test="level != null "> |
| | | and level= #{level} |
| | | </if> |
| | | <if test="name != null "> |
| | | and level_name like concat('%',#{name},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getName" resultMap="BaseResultMap"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | FROM t_subject |
| | | where name = #{name} |
| | | </select> |
| | | |
| | | <select id="getNames" resultMap="BaseResultMap"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | FROM t_subject |
| | | where name in |
| | | <foreach item="name" collection="names" open="(" separator="," |
| | | close=")"> |
| | | #{name} |
| | | </foreach> |
| | | |
| | | </select> |
| | | |
| | | </mapper> |