增加用户管理功能。管理员可以添加删除用户、修改用户密码、重置pushkey
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.genersoft.iot.vmp.service;
|
||||
|
||||
import com.genersoft.iot.vmp.storager.dao.dto.User;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,4 +22,8 @@ public interface IUserService {
|
||||
int updateUsers(User user);
|
||||
|
||||
boolean checkPushAuthority(String callId, String sign);
|
||||
|
||||
PageInfo<User> getUsers(int page, int count);
|
||||
|
||||
int resetPushKey(int id);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.genersoft.iot.vmp.service.impl;
|
||||
import com.genersoft.iot.vmp.service.IUserService;
|
||||
import com.genersoft.iot.vmp.storager.dao.UserMapper;
|
||||
import com.genersoft.iot.vmp.storager.dao.dto.User;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -11,7 +13,7 @@ import java.util.List;
|
||||
|
||||
@Service
|
||||
public class UserServiceImpl implements IUserService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private UserMapper userMapper;
|
||||
|
||||
@@ -64,4 +66,16 @@ public class UserServiceImpl implements IUserService {
|
||||
return userMapper.checkPushAuthorityByCallIdAndSign(callId, sign).size() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<User> getUsers(int page, int count) {
|
||||
PageHelper.startPage(page, count);
|
||||
List<User> users = userMapper.getUsers();
|
||||
return new PageInfo<>(users);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int resetPushKey(int id) {
|
||||
return userMapper.resetPushKey(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user