Commit 9a970d8e authored by liukai's avatar liukai

应用问题修复

parent 56dc4abb
......@@ -2,10 +2,7 @@ package com.pms.ocp.controller;
import com.pms.ocp.model.entity.*;
import com.pms.ocp.model.vo.ResponseVO;
import com.pms.ocp.service.OcpApiTenantRelService;
import com.pms.ocp.service.OcpTenantAuditService;
import com.pms.ocp.service.OcpTenantBaseService;
import com.pms.ocp.service.OcpTenantSubsService;
import com.pms.ocp.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
......@@ -22,16 +19,16 @@ import java.util.List;
@RequestMapping("/tenant")
@RestController
@Api(tags = "应用接口")
public class OcpTenantDetailsController {
public class PmsTenantDetailsController {
@Autowired
private OcpTenantBaseService ocpTenantBaseService;
private PmsTenantBaseService pmsTenantBaseService;
@Autowired
private OcpTenantAuditService ocpTenantAuditService;
@Autowired
private OcpTenantSubsService ocpTenantSubsService;
private PmsTenantSubsService pmsTenantSubsService;
@Autowired
private OcpApiTenantRelService ocpApiTenantRelService;
......@@ -39,8 +36,8 @@ public class OcpTenantDetailsController {
@ApiOperation("应用基础信息-查询")
@PostMapping("/getotbList")
public ResponseVO<List<OcpTenantBase>> getOtbList(@RequestBody OcpTenantBase ocpTenantBase){
return ocpTenantBaseService.getOtbList(ocpTenantBase);
public ResponseVO<List<PmsTenantBase>> getOtbList(@RequestBody PmsTenantBase pmsTenantBase){
return pmsTenantBaseService.getOtbList(pmsTenantBase);
}
@ApiOperation("应用大事记-查询")
......@@ -52,15 +49,15 @@ public class OcpTenantDetailsController {
@ApiOperation("应用订阅记录-查询")
@PostMapping("/getOcpTenantList")
public ResponseVO<List<OcpTenantSubs>> getOcpTenantList(OcpTenantSubs ocpTenantSubs) {
return ocpTenantSubsService.getOcpTenantList(ocpTenantSubs);
public ResponseVO<List<PmsTenantSubs>> getOcpTenantList(PmsTenantSubs pmsTenantSubs) {
return pmsTenantSubsService.getOcpTenantList(pmsTenantSubs);
}
@ApiOperation("应用与服务拓扑图-查询")
@PostMapping("/getOcpTenantApiList")
public ResponseVO<List<OcpApiTenantRel>> getOcpTenantApiList(@RequestBody OcpApiTenantRel ocpApiTenantRel) {
return ocpApiTenantRelService.getTenantApiList(ocpApiTenantRel);
}
// @ApiOperation("应用与服务拓扑图-查询")
// @PostMapping("/getOcpTenantApiList")
// public ResponseVO<List<OcpApiTenantRel>> getOcpTenantApiList(@RequestBody OcpApiTenantRel ocpApiTenantRel) {
// return ocpApiTenantRelService.getTenantApiList(ocpApiTenantRel);
// }
@ApiOperation("应用大事记-导出")
@RequestMapping("/export")
......
package com.pms.ocp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pms.ocp.model.entity.PmsTenantBase;
import com.pms.ocp.model.entity.PmsTenantSubs;
import java.util.List;
public interface PmsTenantBaseMapper extends BaseMapper<PmsTenantBase> {
List<PmsTenantBase> getOtbList(PmsTenantBase pmsTenantBase);
}
package com.pms.ocp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pms.ocp.model.entity.PmsTenantSubs;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface PmsTenantSubsMapper extends BaseMapper<PmsTenantSubs> {
List<PmsTenantSubs> getOcpTenantList(PmsTenantSubs pmsTenantSubs);
}
......@@ -21,52 +21,36 @@ import java.util.Date;
@TableName("ocp_tenant_subs")
@ApiModel("应用订阅记录表1")
public class OcpTenantSubs implements Serializable {
/**
* 关系ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty("关系ID")
private String objId;
/**
* 服务编码
*/
@ApiModelProperty("服务编码")
private String tenantCode;
/**
* 订阅公司编码
*/
@ApiModelProperty("订阅公司编码")
private String subsCompanyCode;
/**
* 服务订阅创建时间
*/
@ApiModelProperty("服务订阅创建时间")
private Timestamp subsLogTenantCtime;
/**
* 服务订阅修改时间
*/
@ApiModelProperty("服务订阅修改时间")
private Timestamp subsLogTenantMtime;
/**
* 服务订阅创建用户ID
*/
@ApiModelProperty("服务订阅创建用户ID")
private String subsLogTenantUserId;
/**
* 服务订阅添加时间
*/
@ApiModelProperty("服务订阅添加时间")
private Timestamp subsLogTenantAtime;
/**
* 是否删除0-否,1-是
*/
@ApiModelProperty("是否删除0-否,1-是")
private Short isDelete;
......
package com.pms.ocp.model.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
/**
* 应用信息表
* @TableName ocp_tenant_base
*/
@Data
@Accessors(chain = true)
@TableName("ocp_tenant_base")
@ApiModel("应用信息表1")
public class PmsTenantBase implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty("主键ID")
private String objId;
@ApiModelProperty("应用名称")
private String tenantName;
@ApiModelProperty("应用代码")
private String tenantCode;
@ApiModelProperty("应用分类代码")
private String tenantGroupCode;
@ApiModelProperty("应用ip")
private String tenantIp;
@ApiModelProperty("应用url")
private String tenantUrl;
@ApiModelProperty("所属专业")
private String professionalKind;
@ApiModelProperty("创建者用户ID")
private String tenantUserId;
@ApiModelProperty("排序")
private Integer tenantOrderNo;
@ApiModelProperty("创建时间")
private Timestamp tenantCtime;
@ApiModelProperty("最后更新时间")
private Timestamp tenantMtime;
@ApiModelProperty("部署名称")
private String deploymentName;
@ApiModelProperty("描述")
private String tenantDescription;
@ApiModelProperty("应用状态0:设计态;1:运行态")
private Short tenantState;
@ApiModelProperty("推广类型0:统建;1:自建")
private long tenantPromotion;
@ApiModelProperty("建设单位")
private String tenantUnit;
@ApiModelProperty("所属公司编码")
private String ownerCompanyCode;
@ApiModelProperty("所属公司名称")
private String ownerCompanyName;
@ApiModelProperty("应用路径")
private String tenantFullPath;
@ApiModelProperty("是否删除0:否;1:是")
private Short isDelete;
@ApiModelProperty("所属区域 1:生产控制大区;2:信息关联大区;3:互联网大区")
private Short tenantZone;
@ApiModelProperty("所属层级 1:应用层;2:平台层;3:网络层;4:感知层;")
private Short tenantLayer;
@ApiModelProperty("应用版本(当前版本)")
private String tenantVersion;
private static final long serialVersionUID = 1L;
//
// @Override
// public boolean equals(Object that) {
// if (this == that) {
// return true;
// }
// if (that == null) {
// return false;
// }
// if (getClass() != that.getClass()) {
// return false;
// }
// OcpTenantBase other = (OcpTenantBase) that;
// return (this.getObjId() == null ? other.getObjId() == null : this.getObjId().equals(other.getObjId()))
// && (this.getTenantName() == null ? other.getTenantName() == null : this.getTenantName().equals(other.getTenantName()))
// && (this.getTenantCode() == null ? other.getTenantCode() == null : this.getTenantCode().equals(other.getTenantCode()))
// && (this.getTenantGroupCode() == null ? other.getTenantGroupCode() == null : this.getTenantGroupCode().equals(other.getTenantGroupCode()))
// && (this.getTenantIp() == null ? other.getTenantIp() == null : this.getTenantIp().equals(other.getTenantIp()))
// && (this.getTenantUrl() == null ? other.getTenantUrl() == null : this.getTenantUrl().equals(other.getTenantUrl()))
// && (this.getProfessionalKind() == null ? other.getProfessionalKind() == null : this.getProfessionalKind().equals(other.getProfessionalKind()))
// && (this.getTenantUserId() == null ? other.getTenantUserId() == null : this.getTenantUserId().equals(other.getTenantUserId()))
// && (this.getTenantOrderNo() == null ? other.getTenantOrderNo() == null : this.getTenantOrderNo().equals(other.getTenantOrderNo()))
// && (this.getTenantCtime() == null ? other.getTenantCtime() == null : this.getTenantCtime().equals(other.getTenantCtime()))
// && (this.getTenantMtime() == null ? other.getTenantMtime() == null : this.getTenantMtime().equals(other.getTenantMtime()))
// && (this.getDeploymentName() == null ? other.getDeploymentName() == null : this.getDeploymentName().equals(other.getDeploymentName()))
// && (this.getTenantDescription() == null ? other.getTenantDescription() == null : this.getTenantDescription().equals(other.getTenantDescription()))
// && (this.getTenantState() == null ? other.getTenantState() == null : this.getTenantState().equals(other.getTenantState()))
// && (this.getTenantUnit() == null ? other.getTenantUnit() == null : this.getTenantUnit().equals(other.getTenantUnit()))
// && (this.getOwnerCompanyCode() == null ? other.getOwnerCompanyCode() == null : this.getOwnerCompanyCode().equals(other.getOwnerCompanyCode()))
// && (this.getOwnerCompanyName() == null ? other.getOwnerCompanyName() == null : this.getOwnerCompanyName().equals(other.getOwnerCompanyName()))
// && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
// && (this.getTenantZone() == null ? other.getTenantZone() == null : this.getTenantZone().equals(other.getTenantZone()))
// && (this.getTenantLayer() == null ? other.getTenantLayer() == null : this.getTenantLayer().equals(other.getTenantLayer()))
// && (this.getTenantVersion() == null ? other.getTenantVersion() == null : this.getTenantVersion().equals(other.getTenantVersion()));
// }
//
// @Override
// public int hashCode() {
// final int prime = 31;
// int result = 1;
// result = prime * result + ((getObjId() == null) ? 0 : getObjId().hashCode());
// result = prime * result + ((getTenantName() == null) ? 0 : getTenantName().hashCode());
// result = prime * result + ((getTenantCode() == null) ? 0 : getTenantCode().hashCode());
// result = prime * result + ((getTenantGroupCode() == null) ? 0 : getTenantGroupCode().hashCode());
// result = prime * result + ((getTenantIp() == null) ? 0 : getTenantIp().hashCode());
// result = prime * result + ((getTenantUrl() == null) ? 0 : getTenantUrl().hashCode());
// result = prime * result + ((getProfessionalKind() == null) ? 0 : getProfessionalKind().hashCode());
// result = prime * result + ((getTenantUserId() == null) ? 0 : getTenantUserId().hashCode());
// result = prime * result + ((getTenantOrderNo() == null) ? 0 : getTenantOrderNo().hashCode());
// result = prime * result + ((getTenantCtime() == null) ? 0 : getTenantCtime().hashCode());
// result = prime * result + ((getTenantMtime() == null) ? 0 : getTenantMtime().hashCode());
// result = prime * result + ((getDeploymentName() == null) ? 0 : getDeploymentName().hashCode());
// result = prime * result + ((getTenantDescription() == null) ? 0 : getTenantDescription().hashCode());
// result = prime * result + ((getTenantState() == null) ? 0 : getTenantState().hashCode());
// result = prime * result + ((getTenantUnit() == null) ? 0 : getTenantUnit().hashCode());
// result = prime * result + ((getOwnerCompanyCode() == null) ? 0 : getOwnerCompanyCode().hashCode());
// result = prime * result + ((getOwnerCompanyName() == null) ? 0 : getOwnerCompanyName().hashCode());
// result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
// result = prime * result + ((getTenantZone() == null) ? 0 : getTenantZone().hashCode());
// result = prime * result + ((getTenantLayer() == null) ? 0 : getTenantLayer().hashCode());
// result = prime * result + ((getTenantVersion() == null) ? 0 : getTenantVersion().hashCode());
// return result;
// }
//
// @Override
// public String toString() {
// StringBuilder sb = new StringBuilder();
// sb.append(getClass().getSimpleName());
// sb.append(" [");
// sb.append("Hash = ").append(hashCode());
// sb.append(", objId=").append(objId);
// sb.append(", tenantName=").append(tenantName);
// sb.append(", tenantCode=").append(tenantCode);
// sb.append(", tenantGroupCode=").append(tenantGroupCode);
// sb.append(", tenantIp=").append(tenantIp);
// sb.append(", tenantUrl=").append(tenantUrl);
// sb.append(", professionalKind=").append(professionalKind);
// sb.append(", tenantUserId=").append(tenantUserId);
// sb.append(", tenantOrderNo=").append(tenantOrderNo);
// sb.append(", tenantCtime=").append(tenantCtime);
// sb.append(", tenantMtime=").append(tenantMtime);
// sb.append(", deploymentName=").append(deploymentName);
// sb.append(", tenantDescription=").append(tenantDescription);
// sb.append(", tenantState=").append(tenantState);
// sb.append(", tenantUnit=").append(tenantUnit);
// sb.append(", ownerCompanyCode=").append(ownerCompanyCode);
// sb.append(", ownerCompanyName=").append(ownerCompanyName);
// sb.append(", isDelete=").append(isDelete);
// sb.append(", tenantZone=").append(tenantZone);
// sb.append(", tenantLayer=").append(tenantLayer);
// sb.append(", tenantVersion=").append(tenantVersion);
// sb.append(", serialVersionUID=").append(serialVersionUID);
// sb.append("]");
// return sb.toString();
// }
}
\ No newline at end of file
package com.pms.ocp.model.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
/**
* 应用订阅记录表
* @TableName ocp_tenant_subs
*/
@Data
@Accessors(chain = true)
@TableName("ocp_tenant_subs")
@ApiModel("应用订阅记录表1")
public class PmsTenantSubs implements Serializable {
/**
* 关系ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty("关系ID")
private String objId;
/**
* 服务编码
*/
@ApiModelProperty("应用编码")
private String tenantCode;
/**
* 订阅公司编码
*/
@ApiModelProperty("订阅公司编码")
private String subsCompanyCode;
/**
* 服务订阅创建时间
*/
@ApiModelProperty("应用订阅创建时间")
private Timestamp subsLogTenantCtime;
/**
* 服务订阅修改时间
*/
@ApiModelProperty("应用订阅修改时间")
private Timestamp subsLogTenantMtime;
/**
* 服务订阅创建用户ID
*/
@ApiModelProperty("应用订阅创建用户ID")
private String subsLogTenantUserId;
/**
* 服务订阅添加时间
*/
@ApiModelProperty("应用订阅添加时间")
private Timestamp subsLogTenantAtime;
/**
* 是否删除0-否,1-是
*/
@ApiModelProperty("是否删除0-否,1-是")
private Short isDelete;
/**
* 应用名称
*/
@ApiModelProperty("应用名称")
private String tenantName;
/**
* 应用分类代码
*/
@ApiModelProperty("应用分类代码")
private String tenantGroupCode;
/**
* 应用ip
*/
@ApiModelProperty("应用ip")
private String tenantIp;
/**
* 应用url
*/
@ApiModelProperty("应用url")
private String tenantUrl;
/**
* 所属专业
*/
@ApiModelProperty("所属专业")
private String professionalKind;
/**
* 创建者用户ID
*/
@ApiModelProperty("创建者用户ID")
private String tenantUserId;
/**
* 排序
*/
@ApiModelProperty("排序")
private Integer tenantOrderNo;
/**
* 创建时间
*/
@ApiModelProperty("创建时间")
private Timestamp tenantCtime;
/**
* 最后更新时间
*/
@ApiModelProperty("最后更新时间")
private Timestamp tenantMtime;
// /**
// * 部署名称
// */
// @ApiModelProperty("部署名称")
// private String deploymentName;
// /**
// * 描述
// */
// @ApiModelProperty("描述")
// private String tenantDescription;
/**
* 应用状态0:设计态;1:运行态
*/
@ApiModelProperty("应用状态0:设计态;1:运行态")
private Short tenantState;
/**
* 推广类型0:统建;1:自建
*/
@ApiModelProperty("推广类型0:统建;1:自建")
private long tenantPromotion;
/**
* 建设单位
*/
@ApiModelProperty("建设单位")
private String tenantUnit;
/**
* 所属公司编码
*/
@ApiModelProperty("所属公司编码")
private String ownerCompanyCode;
// /**
// * 所属公司名称
// */
// @ApiModelProperty("所属公司名称")
// private String ownerCompanyName;
/**
* 所属区域 1:生产控制大区;2:信息关联大区;3:互联网大区
*/
@ApiModelProperty("所属区域 1:生产控制大区;2:信息关联大区;3:互联网大区")
private Short tenantZone;
/**
* 所属层级 1:应用层;2:平台层;3:网络层;4:感知层;
*/
@ApiModelProperty("所属层级 1:应用层;2:平台层;3:网络层;4:感知层;")
private Short tenantLayer;
/**
* 应用版本(当前版本)
*/
@ApiModelProperty("应用版本(当前版本)")
private String tenantVersion;
/**
* 应用路径
*/
@ApiModelProperty("应用路径")
private String tenantFullPath;
private static final long serialVersionUID = 1L;
/**
* 关系ID
*/
public String getObjId() {
return objId;
}
/**
* 关系ID
*/
public void setObjId(String objId) {
this.objId = objId;
}
/**
* 服务编码
*/
public String getTenantCode() {
return tenantCode;
}
/**
* 服务编码
*/
public void setTenantCode(String tenantCode) {
this.tenantCode = tenantCode;
}
/**
* 订阅公司编码
*/
public String getSubsCompanyCode() {
return subsCompanyCode;
}
/**
* 订阅公司编码
*/
public void setSubsCompanyCode(String subsCompanyCode) {
this.subsCompanyCode = subsCompanyCode;
}
/**
* 服务订阅创建时间
*/
public Date getSubsLogTenantCtime() {
return subsLogTenantCtime;
}
/**
* 服务订阅创建时间
*/
public void setSubsLogTenantCtime(Timestamp subsLogTenantCtime) {
this.subsLogTenantCtime = subsLogTenantCtime;
}
/**
* 服务订阅修改时间
*/
public Date getSubsLogTenantMtime() {
return subsLogTenantMtime;
}
/**
* 服务订阅修改时间
*/
public void setSubsLogTenantMtime(Timestamp subsLogTenantMtime) {
this.subsLogTenantMtime = subsLogTenantMtime;
}
/**
* 服务订阅创建用户ID
*/
public String getSubsLogTenantUserId() {
return subsLogTenantUserId;
}
/**
* 服务订阅创建用户ID
*/
public void setSubsLogTenantUserId(String subsLogTenantUserId) {
this.subsLogTenantUserId = subsLogTenantUserId;
}
/**
* 服务订阅添加时间
*/
public Date getSubsLogTenantAtime() {
return subsLogTenantAtime;
}
/**
* 服务订阅添加时间
*/
public void setSubsLogTenantAtime(Timestamp subsLogTenantAtime) {
this.subsLogTenantAtime = subsLogTenantAtime;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
OcpTenantSubs other = (OcpTenantSubs) that;
return (this.getObjId() == null ? other.getObjId() == null : this.getObjId().equals(other.getObjId()))
&& (this.getTenantCode() == null ? other.getTenantCode() == null : this.getTenantCode().equals(other.getTenantCode()))
&& (this.getSubsCompanyCode() == null ? other.getSubsCompanyCode() == null : this.getSubsCompanyCode().equals(other.getSubsCompanyCode()))
&& (this.getSubsLogTenantCtime() == null ? other.getSubsLogTenantCtime() == null : this.getSubsLogTenantCtime().equals(other.getSubsLogTenantCtime()))
&& (this.getSubsLogTenantMtime() == null ? other.getSubsLogTenantMtime() == null : this.getSubsLogTenantMtime().equals(other.getSubsLogTenantMtime()))
&& (this.getSubsLogTenantUserId() == null ? other.getSubsLogTenantUserId() == null : this.getSubsLogTenantUserId().equals(other.getSubsLogTenantUserId()))
&& (this.getSubsLogTenantAtime() == null ? other.getSubsLogTenantAtime() == null : this.getSubsLogTenantAtime().equals(other.getSubsLogTenantAtime()))
&& (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getObjId() == null) ? 0 : getObjId().hashCode());
result = prime * result + ((getTenantCode() == null) ? 0 : getTenantCode().hashCode());
result = prime * result + ((getSubsCompanyCode() == null) ? 0 : getSubsCompanyCode().hashCode());
result = prime * result + ((getSubsLogTenantCtime() == null) ? 0 : getSubsLogTenantCtime().hashCode());
result = prime * result + ((getSubsLogTenantMtime() == null) ? 0 : getSubsLogTenantMtime().hashCode());
result = prime * result + ((getSubsLogTenantUserId() == null) ? 0 : getSubsLogTenantUserId().hashCode());
result = prime * result + ((getSubsLogTenantAtime() == null) ? 0 : getSubsLogTenantAtime().hashCode());
result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", objId=").append(objId);
sb.append(", tenantCode=").append(tenantCode);
sb.append(", subsCompanyCode=").append(subsCompanyCode);
sb.append(", subsLogTenantCtime=").append(subsLogTenantCtime);
sb.append(", subsLogTenantMtime=").append(subsLogTenantMtime);
sb.append(", subsLogTenantUserId=").append(subsLogTenantUserId);
sb.append(", subsLogTenantAtime=").append(subsLogTenantAtime);
sb.append(", isDelete=").append(isDelete);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ import com.pms.ocp.model.entity.OcpTenantBase;
import com.pms.ocp.model.vo.ResponseVO;
public interface OcpTenantBaseService extends IService<OcpTenantBase> {
ResponseVO getOtbList(OcpTenantBase ocpTenantBase);
......
......@@ -5,5 +5,5 @@ import com.pms.ocp.model.entity.OcpTenantSubs;
import com.pms.ocp.model.vo.ResponseVO;
public interface OcpTenantSubsService extends IService<OcpTenantSubs> {
ResponseVO getOcpTenantList(OcpTenantSubs ocpTenantSubs);
}
package com.pms.ocp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pms.ocp.model.entity.OcpTenantBase;
import com.pms.ocp.model.entity.PmsTenantBase;
import com.pms.ocp.model.vo.ResponseVO;
public interface PmsTenantBaseService extends IService<PmsTenantBase> {
ResponseVO getOtbList(PmsTenantBase pmsTenantBase);
}
package com.pms.ocp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pms.ocp.model.entity.PmsTenantSubs;
import com.pms.ocp.model.vo.ResponseVO;
public interface PmsTenantSubsService extends IService<PmsTenantSubs> {
ResponseVO getOcpTenantList(PmsTenantSubs pmsTenantSubs);
}
......@@ -42,9 +42,9 @@ public class OcpTenantAuditServiceImpl extends ServiceImpl<OcpTenantAuditMapper,
@Override
public void exportExcel(OcpTenantAudit ocpTenantAudit, HttpServletRequest request, HttpServletResponse response) {
List<OcpTenantAudit> otaListById = ocpTenantAuditMapper.versionId(ocpTenantAudit);
ExportParams param = new ExportParams(AnalysisConstant.exportOcpTenantApiName.OCP_TENANT_API,AnalysisConstant.exportOcpTenantApiName.OCP_TENANT_API);
ExportParams param = new ExportParams(AnalysisConstant.exportOcpTenantApiName.OCPTENANTAPINAME,AnalysisConstant.exportOcpTenantApiName.OCPTENANTAPINAME);
Workbook workbook = ExcelExportUtil.exportExcel(param, OcpTenantAudit.class,otaListById);
ExportUtils.exportExcel(response, AnalysisConstant.exportOcpTenantApiName.OCP_TENANT_API,workbook);
ExportUtils.exportExcel(response, AnalysisConstant.exportOcpTenantApiName.OCPTENANTAPINAME,workbook);
}
@Override
......
......@@ -20,13 +20,7 @@ public class OcpTenantBaseServiceImpl extends ServiceImpl<OcpTenantBaseMapper,Oc
@Autowired
private OcpTenantBaseMapper ocpTenantBaseMapper;
@Override
public ResponseVO getOtbList(OcpTenantBase ocpTenantBase) {
List<OcpTenantBase> otbList = ocpTenantBaseMapper.getOtbList(ocpTenantBase);
return ResponseVO.ok(otbList);
}
......
......@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pms.ocp.mapper.OcpTenantSubsMapper;
import com.pms.ocp.model.entity.OcpTenantSubs;
import com.pms.ocp.model.vo.ResponseVO;
import com.pms.ocp.service.OcpTenantExtentService;
import com.pms.ocp.service.OcpTenantSubsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -13,12 +12,5 @@ import java.util.List;
@Service
public class OcpTenantSubsServiceImpl extends ServiceImpl<OcpTenantSubsMapper, OcpTenantSubs> implements OcpTenantSubsService {
@Autowired
private OcpTenantSubsMapper ocpTenantSubsMapper;
@Override
public ResponseVO getOcpTenantList(OcpTenantSubs ocpTenantSubs) {
List<OcpTenantSubs> ocpTenantList = ocpTenantSubsMapper.getOcpTenantList(ocpTenantSubs);
return ResponseVO.ok(ocpTenantList);
}
}
\ No newline at end of file
package com.pms.ocp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pms.ocp.mapper.PmsTenantBaseMapper;
import com.pms.ocp.model.entity.PmsTenantBase;
import com.pms.ocp.model.vo.ResponseVO;
import com.pms.ocp.service.PmsTenantBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class PmsTenantBaseServiceImpl extends ServiceImpl<PmsTenantBaseMapper,PmsTenantBase> implements PmsTenantBaseService {
@Autowired
private PmsTenantBaseMapper pmsTenantBaseMapper;
@Override
public ResponseVO getOtbList(PmsTenantBase pmsTenantBase) {
List<PmsTenantBase> otbList = pmsTenantBaseMapper.getOtbList(pmsTenantBase);
return ResponseVO.ok(otbList);
}
}
package com.pms.ocp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pms.ocp.mapper.OcpTenantSubsMapper;
import com.pms.ocp.mapper.PmsTenantSubsMapper;
import com.pms.ocp.model.entity.OcpTenantSubs;
import com.pms.ocp.model.entity.PmsTenantSubs;
import com.pms.ocp.model.vo.ResponseVO;
import com.pms.ocp.service.OcpTenantExtentService;
import com.pms.ocp.service.OcpTenantSubsService;
import com.pms.ocp.service.PmsTenantSubsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class PmsTenantSubsServiceImpl extends ServiceImpl<PmsTenantSubsMapper, PmsTenantSubs> implements PmsTenantSubsService {
@Autowired
private PmsTenantSubsMapper pmsTenantSubsMapper;
@Override
public ResponseVO getOcpTenantList(PmsTenantSubs pmsTenantSubs) {
List<PmsTenantSubs> ocpTenantList = pmsTenantSubsMapper.getOcpTenantList(pmsTenantSubs);
return ResponseVO.ok(ocpTenantList);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pms.ocp.mapper.PmsTenantBaseMapper" >
<select id="getOtbList" resultType="com.pms.ocp.model.entity.PmsTenantBase">
select * from ocp_tenant_base otb
LEFT JOIN ocp_tenant_extent ote
on otb.tenant_code = ote.tenant_code
where otb.obj_id = #{objId}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pms.ocp.mapper.PmsTenantSubsMapper">
<select id="getOcpTenantList" resultType="com.pms.ocp.model.entity.PmsTenantSubs">
SELECT * from ocp_tenant_subs ots
left JOIN ocp_tenant_base otb on
ots.tenant_code = otb.tenant_code
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment