Authored by zhaoyue

Add admin info inter

... ... @@ -7,6 +7,7 @@ import com.xkl.authorization.annotation.*;
import com.xkl.config.ResultStatus;
import com.xkl.domain.XklAdminEntity;
import com.xkl.domain.XklCompanyEntity;
import com.xkl.model.AdminInfoModel;
import com.xkl.model.AdminLoginModel;
import com.xkl.model.ResultModel;
import com.xkl.repository.XklCompanyRepository;
... ... @@ -38,7 +39,7 @@ public class AdminInfoController {
if (companyEntity == null) {
return new ResponseEntity<>(ResultModel.error(ResultStatus.COMPANY_ERROR), HttpStatus.OK);
}
AdminLoginModel adminLoginModel = new AdminLoginModel(admin.getId(), admin.getAccount(), companyEntity.getId(), companyEntity.getName(), "", "");
return new ResponseEntity<>(ResultModel.ok(adminLoginModel), HttpStatus.OK);
AdminInfoModel adminInfoModel = new AdminInfoModel(admin.getId(), admin.getAccount(), companyEntity.getId(), companyEntity.getName());
return new ResponseEntity<>(ResultModel.ok(adminInfoModel), HttpStatus.OK);
}
}
... ...
package com.xkl.model;
import lombok.Data;
/**
* 管理员信息
*/
@Data
public class AdminInfoModel {
public long adminId;
public String adminAccount;
public long comId;
public String comName;
public AdminInfoModel(long adminId, String adminAccount, long comId, String comName ) {
this.adminId = adminId;
this.adminAccount = adminAccount;
this.comId = comId;
this.comName = comName;
}
public long getAdminId() {
return adminId;
}
public void setAdminId(long adminId) {
this.adminId = adminId;
}
public String getAdminAccount() {
return adminAccount;
}
public void setAdminAccount(String adminAccount) {
this.adminAccount = adminAccount;
}
public long getComId() {
return comId;
}
public void setComId(long comId) {
this.comId = comId;
}
public String getComName() {
return comName;
}
public void setComName(String comName) {
this.comName = comName;
}
}
... ...