浏览代码

系统收费

zouxuan 4 年之前
父节点
当前提交
c35f08878d
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 12 1
      mec-biz/src/main/resources/config/mybatis/MemberRankSettingMapper.xml

+ 12 - 1
mec-biz/src/main/resources/config/mybatis/MemberRankSettingMapper.xml

@@ -52,12 +52,23 @@
 	
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="MemberRankSetting" parameterType="map">
-		SELECT * FROM member_rank_setting <include refid="global.limit"/>
+		SELECT * FROM member_rank_setting
+		<include refid="queryPageSql"/>
+		<include refid="global.limit"/>
 	</select>
+
+	<sql id="queryPageSql">
+		<where>
+			<if test="search != null and search != ''">
+				AND (name_ LIKE CONCAT('%',#{search},'%') OR id_ = #{search})
+			</if>
+		</where>
+	</sql>
 	
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM member_rank_setting
+		<include refid="queryPageSql"/>
 	</select>
 	
 	<select id="queryListByIsDefault" resultMap="MemberRankSetting" parameterType="map">