修复查询问题
This commit is contained in:
@@ -81,8 +81,12 @@
|
|||||||
<if test="userId != null "> and user_id = #{userId}</if>
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
|
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
|
||||||
<if test="password != null and password != ''"> and password = #{password}</if>
|
<if test="password != null and password != ''"> and password = #{password}</if>
|
||||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
<if test="phone != null and phone != ''">
|
||||||
<if test="nickname != null and nickname != ''"> and nickname like concat('%', #{nickname}, '%')</if>
|
or phone like concat('%', #{phone}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="nickname != null and nickname != ''">
|
||||||
|
or nickname like concat('%', #{nickname}, '%')
|
||||||
|
</if>
|
||||||
<if test="sex != null "> and sex = #{sex}</if>
|
<if test="sex != null "> and sex = #{sex}</if>
|
||||||
<if test="birthday != null "> and birthday = #{birthday}</if>
|
<if test="birthday != null "> and birthday = #{birthday}</if>
|
||||||
<if test="addr != null and addr != ''"> and addr = #{addr}</if>
|
<if test="addr != null and addr != ''"> and addr = #{addr}</if>
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
phone: null,
|
||||||
|
nickname: null,
|
||||||
searchKey: null
|
searchKey: null
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -139,11 +141,22 @@ export default {
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
// 如果有搜索关键字,同时设置手机号和昵称参数
|
||||||
|
if (this.queryParams.searchKey) {
|
||||||
|
this.queryParams.phone = this.queryParams.searchKey;
|
||||||
|
this.queryParams.nickname = this.queryParams.searchKey;
|
||||||
|
} else {
|
||||||
|
this.queryParams.phone = null;
|
||||||
|
this.queryParams.nickname = null;
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
|
this.queryParams.phone = null;
|
||||||
|
this.queryParams.nickname = null;
|
||||||
|
this.queryParams.searchKey = null;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 状态修改 */
|
/** 状态修改 */
|
||||||
|
|||||||
Reference in New Issue
Block a user