公会-运营负责人-统计-后台-暴露后台用户
This commit is contained in:
@@ -260,19 +260,6 @@ public class AdminUserService extends BaseService {
|
||||
adminLoginRecordMapper.insert(adminLoginRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 发送短信:27分钟内使用旧验证码,否则生成新验证码
|
||||
* @author qiudonglin
|
||||
* @date 2020/1/13/0013
|
||||
*/
|
||||
private String buildSmsCode(String account) {
|
||||
String smsCode = jedisService.get(RedisKey.admin_use_old_sms_code.getKey(account));
|
||||
if (StringUtils.isEmpty(smsCode)) {
|
||||
smsCode = String.valueOf(RandomUtil.getFiveRandomNumber());
|
||||
}
|
||||
return smsCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 检查发送验证码次数是否大于后台限制
|
||||
* @author qiudonglin
|
||||
@@ -410,6 +397,11 @@ public class AdminUserService extends BaseService {
|
||||
return adminUsers.stream().collect(Collectors.toMap(AdminUser::getId, au -> au.getUsername()));
|
||||
}
|
||||
|
||||
public List<AdminUser> listAll() {
|
||||
AdminUserExample example = new AdminUserExample();
|
||||
return adminUserMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public AdminUserVo getByAdminId(Integer adminId) {
|
||||
AdminUser adminUserById = this.getAdminUserById(adminId);
|
||||
List<AdminRefUserRoleKey> roleByAdminId = adminRoleService.getRoleByAdminId(adminId);
|
||||
|
@@ -51,7 +51,7 @@ public class GuildOperatorAdminController extends BaseController {
|
||||
return BusiResult.success(page);
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@ApiOperation("保存")
|
||||
@PostMapping("/save")
|
||||
public BusiResult<Void> save(@RequestBody GuildOperator guildOperator) {
|
||||
int admin = getAdminId();
|
||||
|
@@ -13,7 +13,7 @@ import com.accompany.admin.util.AdminUtil;
|
||||
import com.accompany.admin.util.ImageType;
|
||||
import com.accompany.admin.vo.AdminMenuVo;
|
||||
import com.accompany.admin.vo.AdminRoleVo;
|
||||
import com.accompany.business.service.api.QinniuService;
|
||||
import com.accompany.common.result.BusiResult;
|
||||
import com.accompany.common.tencent.cos.TencentCosUploadService;
|
||||
import com.accompany.common.utils.BlankUtil;
|
||||
import com.accompany.common.utils.StringUtils;
|
||||
@@ -21,18 +21,20 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
@Api(tags = "后台用户")
|
||||
@Controller
|
||||
@RequestMapping("/admin/user")
|
||||
public class AdminUserController extends BaseController {
|
||||
@@ -49,6 +51,26 @@ public class AdminUserController extends BaseController {
|
||||
@Autowired
|
||||
private TencentCosUploadService uploadService;
|
||||
|
||||
/**
|
||||
* 查询用户列表
|
||||
*
|
||||
*/
|
||||
@ApiOperation("获取全量后台用户列表")
|
||||
@GetMapping("/listAll")
|
||||
@ResponseBody
|
||||
public void listAll() {
|
||||
List<AdminUser> adminUserList = adminUserService.listAll();
|
||||
List<Map<String, Object>> voList = adminUserList.stream().map(d->{
|
||||
Map<String, Object> vo = new HashMap<>();
|
||||
vo.put("id", d.getId());
|
||||
vo.put("username", d.getUsername());
|
||||
vo.put("phone", d.getPhone());
|
||||
vo.put("email", d.getEmail());
|
||||
return vo;
|
||||
}).toList();
|
||||
writeJson(JSON.toJSONString(BusiResult.success(voList)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户列表
|
||||
*
|
||||
@@ -211,9 +233,6 @@ public class AdminUserController extends BaseController {
|
||||
writeJson(jsonObject.toJSONString());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private QinniuService qinniuService;
|
||||
|
||||
/**
|
||||
* 上传图像,使用的是Spring的CommonsFileUpload组件,
|
||||
* 需要在mvc配置文件中配置一个MultipartResolver解析器实例
|
||||
|
Reference in New Issue
Block a user