update
This commit is contained in:
parent
9032cfa7b1
commit
c246fd759d
|
@ -21,7 +21,9 @@ import com.ydool.boot.modules.rddb.service.DbService;
|
|||
import com.ydool.boot.modules.rddb.service.OfficeService;
|
||||
import com.ydool.boot.modules.rddb.service.SyncNameService;
|
||||
import com.ydool.boot.modules.rddb.service.UserTypeService;
|
||||
import com.ydool.boot.modules.rddb.wrapper.DbWrapper;
|
||||
import com.ydool.boot.modules.rddb.wrapper.OfficeWrapper;
|
||||
import com.ydool.boot.modules.rddb.wrapper.UserDtoWrapper;
|
||||
import com.ydool.boot.modules.sys.entity.User;
|
||||
import com.ydool.boot.modules.sys.service.UserService;
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -62,8 +64,7 @@ public class ApiUserController extends ApiBaseController {
|
|||
@ApiOperation(value = "获取当前登录用户的信息")
|
||||
public void info() {
|
||||
User user = getApiUser();
|
||||
if (StringUtils.isNotBlank(user.getAvatar())) user.setAvatar(Const.URL_PREFIX + user.getAvatar());
|
||||
Kv kv = Kv.create().set("user", user);
|
||||
Kv kv = Kv.create().set("user", UserDtoWrapper.build().entityVO(user));
|
||||
//机关干部
|
||||
if (isAdmin() || isStreet() || isContact()) {
|
||||
Office office = officeService.getOne(new QueryWrapper<Office>().eq("user_id", user.getId()));
|
||||
|
@ -72,7 +73,7 @@ public class ApiUserController extends ApiBaseController {
|
|||
//人大代表
|
||||
if (isRddb()) {
|
||||
Db rddb = dbService.getOne(new QueryWrapper<Db>().eq("user_id", user.getId()));
|
||||
kv.set("rddb", rddb);
|
||||
kv.set("rddb", DbWrapper.build().entityVO(rddb));
|
||||
}
|
||||
//选民没有其他信息
|
||||
render(Ret.ok().data(kv));
|
||||
|
|
Loading…
Reference in New Issue