Authored by zhaoyue

Add admin info inter

@@ -7,6 +7,7 @@ import com.xkl.authorization.annotation.*; @@ -7,6 +7,7 @@ import com.xkl.authorization.annotation.*;
7 import com.xkl.config.ResultStatus; 7 import com.xkl.config.ResultStatus;
8 import com.xkl.domain.XklAdminEntity; 8 import com.xkl.domain.XklAdminEntity;
9 import com.xkl.domain.XklCompanyEntity; 9 import com.xkl.domain.XklCompanyEntity;
  10 +import com.xkl.model.AdminInfoModel;
10 import com.xkl.model.AdminLoginModel; 11 import com.xkl.model.AdminLoginModel;
11 import com.xkl.model.ResultModel; 12 import com.xkl.model.ResultModel;
12 import com.xkl.repository.XklCompanyRepository; 13 import com.xkl.repository.XklCompanyRepository;
@@ -38,7 +39,7 @@ public class AdminInfoController { @@ -38,7 +39,7 @@ public class AdminInfoController {
38 if (companyEntity == null) { 39 if (companyEntity == null) {
39 return new ResponseEntity<>(ResultModel.error(ResultStatus.COMPANY_ERROR), HttpStatus.OK); 40 return new ResponseEntity<>(ResultModel.error(ResultStatus.COMPANY_ERROR), HttpStatus.OK);
40 } 41 }
41 - AdminLoginModel adminLoginModel = new AdminLoginModel(admin.getId(), admin.getAccount(), companyEntity.getId(), companyEntity.getName(), "", "");  
42 - return new ResponseEntity<>(ResultModel.ok(adminLoginModel), HttpStatus.OK); 42 + AdminInfoModel adminInfoModel = new AdminInfoModel(admin.getId(), admin.getAccount(), companyEntity.getId(), companyEntity.getName());
  43 + return new ResponseEntity<>(ResultModel.ok(adminInfoModel), HttpStatus.OK);
43 } 44 }
44 } 45 }
  1 +package com.xkl.model;
  2 +
  3 +import lombok.Data;
  4 +
  5 +/**
  6 + * 管理员信息
  7 + */
  8 +@Data
  9 +public class AdminInfoModel {
  10 +
  11 + public long adminId;
  12 + public String adminAccount;
  13 + public long comId;
  14 + public String comName;
  15 +
  16 +
  17 + public AdminInfoModel(long adminId, String adminAccount, long comId, String comName ) {
  18 + this.adminId = adminId;
  19 + this.adminAccount = adminAccount;
  20 + this.comId = comId;
  21 + this.comName = comName;
  22 +
  23 + }
  24 +
  25 + public long getAdminId() {
  26 + return adminId;
  27 + }
  28 +
  29 + public void setAdminId(long adminId) {
  30 + this.adminId = adminId;
  31 + }
  32 +
  33 + public String getAdminAccount() {
  34 + return adminAccount;
  35 + }
  36 +
  37 + public void setAdminAccount(String adminAccount) {
  38 + this.adminAccount = adminAccount;
  39 + }
  40 +
  41 + public long getComId() {
  42 + return comId;
  43 + }
  44 +
  45 + public void setComId(long comId) {
  46 + this.comId = comId;
  47 + }
  48 +
  49 + public String getComName() {
  50 + return comName;
  51 + }
  52 +
  53 + public void setComName(String comName) {
  54 + this.comName = comName;
  55 + }
  56 +
  57 +
  58 +}