<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>
qq_飘随风_0
相关分类