huwhois преди 4 години
родител
ревизия
6d985fef46

+ 3 - 3
src/main/java/io/renren/modules/admin/controller/MemberController.java

149
    @RequiresPermissions("admin:member:list")
149
    @RequiresPermissions("admin:member:list")
150
    public R repassword(@RequestParam Map<String, Object> params){
150
    public R repassword(@RequestParam Map<String, Object> params){
151
        String name = params.get("name").toString();
151
        String name = params.get("name").toString();
152
        List<Map<String, Object>> list = memberService.getListByName();
153
                
154
        return R.ok().put("page", page);
152
        List<Map<String, Object>> list = memberService.getListByName(name);
153
154
        return R.ok().put("list", list);
155
    }
155
    }
156
}
156
}

+ 11 - 0
src/main/java/io/renren/modules/admin/dao/MemberDao.java

1
package io.renren.modules.admin.dao;
1
package io.renren.modules.admin.dao;
2
2
3
import java.util.List;
4
import java.util.Map;
5
3
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
7
5
import org.apache.ibatis.annotations.Mapper;
8
import org.apache.ibatis.annotations.Mapper;
19
public interface MemberDao extends BaseMapper<MemberEntity> {
22
public interface MemberDao extends BaseMapper<MemberEntity> {
20
	@Update("update member set is_check=#{isCheck} where id=#{id}")
23
	@Update("update member set is_check=#{isCheck} where id=#{id}")
21
    int updateStatus(Long id, Integer isCheck);
24
    int updateStatus(Long id, Integer isCheck);
25
26
    /**
27
     * 根据真实姓名模糊查询id
28
     * @param truename
29
     * @return
30
     */
31
    @Select("select id,truename,organization from member where is_del=0 and truename like '%${truename}%';")
32
    List<Map<String, Object>> selectListByName(String truename);
22
}
33
}

+ 3 - 0
src/main/java/io/renren/modules/admin/service/MemberService.java

1
package io.renren.modules.admin.service;
1
package io.renren.modules.admin.service;
2
2
3
import java.util.List;
3
import java.util.Map;
4
import java.util.Map;
4
5
5
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
6
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
43
	 * @return
44
	 * @return
44
	 */
45
	 */
45
	MemberEntity getByUserName(String username);
46
	MemberEntity getByUserName(String username);
47
48
	List<Map<String, Object>> getListByName(String truename);
46
}
49
}
47
50

+ 5 - 0
src/main/java/io/renren/modules/admin/service/impl/MemberServiceImpl.java

125
    public MemberEntity getByUserName(String username) {
125
    public MemberEntity getByUserName(String username) {
126
        return this.getOne(new QueryWrapper<MemberEntity>().eq("username", username));
126
        return this.getOne(new QueryWrapper<MemberEntity>().eq("username", username));
127
    }
127
    }
128
129
    @Override
130
    public List<Map<String, Object>> getListByName(String truename) {
131
        return baseMapper.selectListByName(truename);
132
    }
128
}
133
}