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