Commit 6972b544 authored by wujipeng's avatar wujipeng
Browse files

删除用户

parent 204c367b
...@@ -49,4 +49,10 @@ public class UserController extends BaseController { ...@@ -49,4 +49,10 @@ public class UserController extends BaseController {
public Result relationPage(@RequestBody UserDTO userDTO) { public Result relationPage(@RequestBody UserDTO userDTO) {
return Result.data(userService.relationPage(userDTO)); return Result.data(userService.relationPage(userDTO));
} }
@ApiModelProperty(value = "删除用户")
@DeleteMapping("/{id}")
public Result delete(@PathVariable String id) {
return Result.data(userService.delete(id));
}
} }
...@@ -6,6 +6,7 @@ import com.platform.model.entity.ExcelDataEntity; ...@@ -6,6 +6,7 @@ import com.platform.model.entity.ExcelDataEntity;
import com.platform.model.entity.UserEntity; import com.platform.model.entity.UserEntity;
import com.platform.model.vo.EveryoneVO; import com.platform.model.vo.EveryoneVO;
import com.platform.model.vo.UserVO; import com.platform.model.vo.UserVO;
import com.sun.org.apache.xpath.internal.operations.Bool;
import java.util.List; import java.util.List;
...@@ -28,4 +29,6 @@ public interface UserService extends IService<UserEntity> { ...@@ -28,4 +29,6 @@ public interface UserService extends IService<UserEntity> {
List<ExcelDataEntity> cashFlow(UserDTO userDTO); List<ExcelDataEntity> cashFlow(UserDTO userDTO);
EveryoneVO relationPage(UserDTO userDTO); EveryoneVO relationPage(UserDTO userDTO);
Boolean delete(String id);
} }
...@@ -201,4 +201,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme ...@@ -201,4 +201,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
PageHelper.clearPage(); PageHelper.clearPage();
return everyoneVO; return everyoneVO;
} }
@Override
public Boolean delete(String id) {
UserEntity user = getById(id);
excelDataService.remove(new LambdaQueryWrapper<ExcelDataEntity>().eq(ExcelDataEntity::getPayUserName, user.getUserName()));
return removeById(id);
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment