|
|
@@ -88,7 +88,7 @@ public class AdminController {
|
|
|
admin.setPassWord(Codec.DoDigest.custom().setAlgorithm(Codec.DoDigest.Algorithm.SHA256).setStringData(admin.getPassWord()).toBase64String());
|
|
|
}
|
|
|
if (admin.getId() == null) {
|
|
|
- Admin ad = adminService.getOne(new LambdaQueryWrapper<Admin>().eq(Admin::getUserName, admin.getUserName()));
|
|
|
+ Admin ad = adminService.getOne(new LambdaQueryWrapper<Admin>().eq(Admin::getPhone, admin.getPhone()));
|
|
|
if (ad != null) {
|
|
|
throw BusinessRuntimeException.getInstance("该账号已存在.");
|
|
|
}
|
|
|
@@ -185,10 +185,6 @@ public class AdminController {
|
|
|
@GetMapping("/get/list")
|
|
|
public Result<List<Admin>> list(){
|
|
|
List<Admin> list = adminService.list(new LambdaQueryWrapper<Admin>().eq(Admin::getStatus,true));
|
|
|
- list.forEach((admin)->{
|
|
|
- admin.setPassWord("");
|
|
|
- admin.setUserName("");
|
|
|
- });
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(list);
|
|
|
}
|
|
|
|