<mapper?namespace="Message">
??<resultMap?type="com.ljm.java.entity.Message"?id="MessageResult">
????<id?column="ID"?jdbcType="INTEGER"?property="id"/>
????<result?column="COMMAND"?jdbcType="VARCHAR"?property="command"/>
????<result?column="DESCRIPTION"?jdbcType="VARCHAR"?property="description"/>
????<result?column="CONTENT"?jdbcType="VARCHAR"?property="content"/>
??</resultMap>
??<select?id="queryMessageList"?parameterType="com.ljm.java.entity.Message"?resultMap="MessageResult">
????select?ID,COMMAND,DESCRIPTION,CONTENT?from?MESSAGE
????<where>
???? <if?test="command?!=?null?and?!"".equals(command.trim())">
???? and?COMMAND?like?'%'?#{command}'%'
????</if>
????<if?test="description?!=?null?and?!"".equals(description.trim())">
???? and?DESCRIPTION?like?'%'?#{description}?'%'?
????</if>
????</where>
??</select>
添加回答
舉報
0/150
提交
取消
