用户下级列表新增下级信息
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
package com.gxwebsoft.common.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -55,4 +53,6 @@ public class UserReferee implements Serializable {
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private User user;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,10 @@ import com.gxwebsoft.common.system.entity.UserReferee;
|
||||
import com.gxwebsoft.common.system.param.UserRefereeParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -21,11 +23,17 @@ import java.util.List;
|
||||
@Service
|
||||
public class UserRefereeServiceImpl extends ServiceImpl<UserRefereeMapper, UserReferee> implements UserRefereeService {
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
public PageResult<UserReferee> pageRel(UserRefereeParam param) {
|
||||
PageParam<UserReferee, UserRefereeParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<UserReferee> list = baseMapper.selectPageRel(page, param);
|
||||
for (UserReferee userReferee : list) {
|
||||
userReferee.setUser(userService.getById(userReferee.getUserId()));
|
||||
}
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user