@@ -97,4 +97,6 @@ public interface GyeeuserMapper {
int updateByPrimaryKey(Gyeeuser record);
String queryIdByUserNamePassWord(Gyeeuser gyeeuser);
+
+ List<Gyeeuser> selectUserList();
}
@@ -151,9 +151,8 @@ public class GyeeuserService extends SocketToolService implements BaseService<Gy
public List<Gyeeuser> findUserlist(){
- GyeeuserExample example=new GyeeuserExample();
- example.setOrderByClause("id");
- List<Gyeeuser> list= gyeeuserMapper.selectByExample(example);
+ List<Gyeeuser> list= gyeeuserMapper.selectUserList();
return list;
@@ -321,4 +321,9 @@
select id from gyeeuser where username=#{username,jdbcType=VARCHAR} and password=#{password,jdbcType=VARCHAR}
</select>
+ <select id="selectUserList" resultMap="BaseResultMap">
+ select user.id,user.username,user.password,user.nickname,user.photo,user.remak1,role.name remak2,
+ user.remak3 from gyeeuser user,gyeerole role,gyeeuserrole ur where user.id=ur.userid
+ and ur.roleid=role.id order by user.id
+ </select>
</mapper>