Commit eaf5476d authored by liukai's avatar liukai

问题修复

parent 668e68ee
...@@ -46,11 +46,11 @@ public class OcpApiDetailsController { ...@@ -46,11 +46,11 @@ public class OcpApiDetailsController {
return ocpApiAuditService.getOcpApiAuditList(ocpApiAudit); return ocpApiAuditService.getOcpApiAuditList(ocpApiAudit);
} }
@ApiOperation("服务大事记-查询详情") // @ApiOperation("服务大事记-查询详情")
@PostMapping("/getocpapidetails") // @PostMapping("/getocpapidetails")
public ResponseVO<List<OcpApiAudit>> getOcpApiDetails(@RequestBody OcpApiAudit ocpApiAudit){ // public ResponseVO<List<OcpApiAudit>> getOcpApiDetails(@RequestBody OcpApiAudit ocpApiAudit){
return ocpApiAuditService.sById(ocpApiAudit); // return ocpApiAuditService.sById(ocpApiAudit);
} // }
@ApiOperation("服务大事记-查询详情-变更内容") @ApiOperation("服务大事记-查询详情-变更内容")
@PostMapping("/getocpapi") @PostMapping("/getocpapi")
...@@ -58,6 +58,12 @@ public class OcpApiDetailsController { ...@@ -58,6 +58,12 @@ public class OcpApiDetailsController {
return ocpApiAuditService.OaaById(ocpApiAudit); return ocpApiAuditService.OaaById(ocpApiAudit);
} }
@ApiOperation("服务大事记-历史版本")
@PostMapping("/versionid")
public ResponseVO<List<OcpApiAudit>> versionId(@RequestBody OcpApiAudit ocpApiAudit){
return ocpApiAuditService.versionId(ocpApiAudit);
}
@ApiOperation("服务与应用拓扑图-查询") @ApiOperation("服务与应用拓扑图-查询")
@PostMapping("/getoatrlist") @PostMapping("/getoatrlist")
public ResponseVO<List<OcpApiTenantRel>> getOatrList(@RequestBody OcpApiTenantRel ocpApiTenantRel) { public ResponseVO<List<OcpApiTenantRel>> getOatrList(@RequestBody OcpApiTenantRel ocpApiTenantRel) {
......
...@@ -10,13 +10,12 @@ import io.swagger.annotations.Api; ...@@ -10,13 +10,12 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.xml.transform.Result;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
...@@ -50,11 +49,6 @@ public class OcpTenantDetailsController { ...@@ -50,11 +49,6 @@ public class OcpTenantDetailsController {
return ocpTenantAuditService.getOtaList(ocpTenantAudit); return ocpTenantAuditService.getOtaList(ocpTenantAudit);
} }
@ApiOperation("应用大事记-查询详情")
@PostMapping("/getotaListById")
public ResponseVO<List<OcpApiAudit>> getOtaListById(@RequestBody OcpTenantAudit ocpTenantAudit) {
return ocpTenantAuditService.getOtaListById(ocpTenantAudit);
}
@ApiOperation("应用订阅记录-查询") @ApiOperation("应用订阅记录-查询")
@PostMapping("/getOcpTenantList") @PostMapping("/getOcpTenantList")
...@@ -78,4 +72,12 @@ public class OcpTenantDetailsController { ...@@ -78,4 +72,12 @@ public class OcpTenantDetailsController {
public ResponseVO<List<OcpTenantAudit>> getOcpTenant(@RequestBody OcpTenantAudit ocpTenantAudit){ public ResponseVO<List<OcpTenantAudit>> getOcpTenant(@RequestBody OcpTenantAudit ocpTenantAudit){
return ocpTenantAuditService.OtaById(ocpTenantAudit); return ocpTenantAuditService.OtaById(ocpTenantAudit);
} }
@ApiOperation("应用大事记-查询详情-历史版本")
@PostMapping("/versionId")
public ResponseVO<List<OcpTenantAudit>> versionId(@RequestBody OcpTenantAudit ocpTenantAudit){
return ocpTenantAuditService.versionId(ocpTenantAudit);
}
} }
...@@ -20,4 +20,6 @@ public interface OcpApiAuditMapper extends BaseMapper<OcpApiAudit> { ...@@ -20,4 +20,6 @@ public interface OcpApiAuditMapper extends BaseMapper<OcpApiAudit> {
List<OcpApiAudit> sById(OcpApiAudit ocpApiAudit); List<OcpApiAudit> sById(OcpApiAudit ocpApiAudit);
List<OcpApiAudit> versionId (OcpApiAudit ocpApiAudit);
} }
...@@ -11,4 +11,6 @@ public interface OcpTenantAuditMapper extends BaseMapper<OcpTenantAudit> { ...@@ -11,4 +11,6 @@ public interface OcpTenantAuditMapper extends BaseMapper<OcpTenantAudit> {
List<OcpTenantAudit> getOtaListById(OcpTenantAudit ocpTenantAudit); List<OcpTenantAudit> getOtaListById(OcpTenantAudit ocpTenantAudit);
List<OcpTenantAudit> OtaById(OcpTenantAudit ocpTenantAudit); List<OcpTenantAudit> OtaById(OcpTenantAudit ocpTenantAudit);
List<OcpTenantAudit> versionId(OcpTenantAudit ocpTenantAudit);
} }
...@@ -447,99 +447,99 @@ public class OcpTenantBase implements Serializable { ...@@ -447,99 +447,99 @@ public class OcpTenantBase implements Serializable {
public void setTenantVersion(String tenantVersion) { public void setTenantVersion(String tenantVersion) {
this.tenantVersion = tenantVersion; this.tenantVersion = tenantVersion;
} }
//
@Override // @Override
public boolean equals(Object that) { // public boolean equals(Object that) {
if (this == that) { // if (this == that) {
return true; // return true;
} // }
if (that == null) { // if (that == null) {
return false; // return false;
} // }
if (getClass() != that.getClass()) { // if (getClass() != that.getClass()) {
return false; // return false;
} // }
OcpTenantBase other = (OcpTenantBase) that; // OcpTenantBase other = (OcpTenantBase) that;
return (this.getObjId() == null ? other.getObjId() == null : this.getObjId().equals(other.getObjId())) // return (this.getObjId() == null ? other.getObjId() == null : this.getObjId().equals(other.getObjId()))
&& (this.getTenantName() == null ? other.getTenantName() == null : this.getTenantName().equals(other.getTenantName())) // && (this.getTenantName() == null ? other.getTenantName() == null : this.getTenantName().equals(other.getTenantName()))
&& (this.getTenantCode() == null ? other.getTenantCode() == null : this.getTenantCode().equals(other.getTenantCode())) // && (this.getTenantCode() == null ? other.getTenantCode() == null : this.getTenantCode().equals(other.getTenantCode()))
&& (this.getTenantGroupCode() == null ? other.getTenantGroupCode() == null : this.getTenantGroupCode().equals(other.getTenantGroupCode())) // && (this.getTenantGroupCode() == null ? other.getTenantGroupCode() == null : this.getTenantGroupCode().equals(other.getTenantGroupCode()))
&& (this.getTenantIp() == null ? other.getTenantIp() == null : this.getTenantIp().equals(other.getTenantIp())) // && (this.getTenantIp() == null ? other.getTenantIp() == null : this.getTenantIp().equals(other.getTenantIp()))
&& (this.getTenantUrl() == null ? other.getTenantUrl() == null : this.getTenantUrl().equals(other.getTenantUrl())) // && (this.getTenantUrl() == null ? other.getTenantUrl() == null : this.getTenantUrl().equals(other.getTenantUrl()))
&& (this.getProfessionalKind() == null ? other.getProfessionalKind() == null : this.getProfessionalKind().equals(other.getProfessionalKind())) // && (this.getProfessionalKind() == null ? other.getProfessionalKind() == null : this.getProfessionalKind().equals(other.getProfessionalKind()))
&& (this.getTenantUserId() == null ? other.getTenantUserId() == null : this.getTenantUserId().equals(other.getTenantUserId())) // && (this.getTenantUserId() == null ? other.getTenantUserId() == null : this.getTenantUserId().equals(other.getTenantUserId()))
&& (this.getTenantOrderNo() == null ? other.getTenantOrderNo() == null : this.getTenantOrderNo().equals(other.getTenantOrderNo())) // && (this.getTenantOrderNo() == null ? other.getTenantOrderNo() == null : this.getTenantOrderNo().equals(other.getTenantOrderNo()))
&& (this.getTenantCtime() == null ? other.getTenantCtime() == null : this.getTenantCtime().equals(other.getTenantCtime())) // && (this.getTenantCtime() == null ? other.getTenantCtime() == null : this.getTenantCtime().equals(other.getTenantCtime()))
&& (this.getTenantMtime() == null ? other.getTenantMtime() == null : this.getTenantMtime().equals(other.getTenantMtime())) // && (this.getTenantMtime() == null ? other.getTenantMtime() == null : this.getTenantMtime().equals(other.getTenantMtime()))
&& (this.getDeploymentName() == null ? other.getDeploymentName() == null : this.getDeploymentName().equals(other.getDeploymentName())) // && (this.getDeploymentName() == null ? other.getDeploymentName() == null : this.getDeploymentName().equals(other.getDeploymentName()))
&& (this.getTenantDescription() == null ? other.getTenantDescription() == null : this.getTenantDescription().equals(other.getTenantDescription())) // && (this.getTenantDescription() == null ? other.getTenantDescription() == null : this.getTenantDescription().equals(other.getTenantDescription()))
&& (this.getTenantState() == null ? other.getTenantState() == null : this.getTenantState().equals(other.getTenantState())) // && (this.getTenantState() == null ? other.getTenantState() == null : this.getTenantState().equals(other.getTenantState()))
&& (this.getTenantUnit() == null ? other.getTenantUnit() == null : this.getTenantUnit().equals(other.getTenantUnit())) // && (this.getTenantUnit() == null ? other.getTenantUnit() == null : this.getTenantUnit().equals(other.getTenantUnit()))
&& (this.getOwnerCompanyCode() == null ? other.getOwnerCompanyCode() == null : this.getOwnerCompanyCode().equals(other.getOwnerCompanyCode())) // && (this.getOwnerCompanyCode() == null ? other.getOwnerCompanyCode() == null : this.getOwnerCompanyCode().equals(other.getOwnerCompanyCode()))
&& (this.getOwnerCompanyName() == null ? other.getOwnerCompanyName() == null : this.getOwnerCompanyName().equals(other.getOwnerCompanyName())) // && (this.getOwnerCompanyName() == null ? other.getOwnerCompanyName() == null : this.getOwnerCompanyName().equals(other.getOwnerCompanyName()))
&& (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete())) // && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
&& (this.getTenantZone() == null ? other.getTenantZone() == null : this.getTenantZone().equals(other.getTenantZone())) // && (this.getTenantZone() == null ? other.getTenantZone() == null : this.getTenantZone().equals(other.getTenantZone()))
&& (this.getTenantLayer() == null ? other.getTenantLayer() == null : this.getTenantLayer().equals(other.getTenantLayer())) // && (this.getTenantLayer() == null ? other.getTenantLayer() == null : this.getTenantLayer().equals(other.getTenantLayer()))
&& (this.getTenantVersion() == null ? other.getTenantVersion() == null : this.getTenantVersion().equals(other.getTenantVersion())); // && (this.getTenantVersion() == null ? other.getTenantVersion() == null : this.getTenantVersion().equals(other.getTenantVersion()));
} // }
//
@Override // @Override
public int hashCode() { // public int hashCode() {
final int prime = 31; // final int prime = 31;
int result = 1; // int result = 1;
result = prime * result + ((getObjId() == null) ? 0 : getObjId().hashCode()); // result = prime * result + ((getObjId() == null) ? 0 : getObjId().hashCode());
result = prime * result + ((getTenantName() == null) ? 0 : getTenantName().hashCode()); // result = prime * result + ((getTenantName() == null) ? 0 : getTenantName().hashCode());
result = prime * result + ((getTenantCode() == null) ? 0 : getTenantCode().hashCode()); // result = prime * result + ((getTenantCode() == null) ? 0 : getTenantCode().hashCode());
result = prime * result + ((getTenantGroupCode() == null) ? 0 : getTenantGroupCode().hashCode()); // result = prime * result + ((getTenantGroupCode() == null) ? 0 : getTenantGroupCode().hashCode());
result = prime * result + ((getTenantIp() == null) ? 0 : getTenantIp().hashCode()); // result = prime * result + ((getTenantIp() == null) ? 0 : getTenantIp().hashCode());
result = prime * result + ((getTenantUrl() == null) ? 0 : getTenantUrl().hashCode()); // result = prime * result + ((getTenantUrl() == null) ? 0 : getTenantUrl().hashCode());
result = prime * result + ((getProfessionalKind() == null) ? 0 : getProfessionalKind().hashCode()); // result = prime * result + ((getProfessionalKind() == null) ? 0 : getProfessionalKind().hashCode());
result = prime * result + ((getTenantUserId() == null) ? 0 : getTenantUserId().hashCode()); // result = prime * result + ((getTenantUserId() == null) ? 0 : getTenantUserId().hashCode());
result = prime * result + ((getTenantOrderNo() == null) ? 0 : getTenantOrderNo().hashCode()); // result = prime * result + ((getTenantOrderNo() == null) ? 0 : getTenantOrderNo().hashCode());
result = prime * result + ((getTenantCtime() == null) ? 0 : getTenantCtime().hashCode()); // result = prime * result + ((getTenantCtime() == null) ? 0 : getTenantCtime().hashCode());
result = prime * result + ((getTenantMtime() == null) ? 0 : getTenantMtime().hashCode()); // result = prime * result + ((getTenantMtime() == null) ? 0 : getTenantMtime().hashCode());
result = prime * result + ((getDeploymentName() == null) ? 0 : getDeploymentName().hashCode()); // result = prime * result + ((getDeploymentName() == null) ? 0 : getDeploymentName().hashCode());
result = prime * result + ((getTenantDescription() == null) ? 0 : getTenantDescription().hashCode()); // result = prime * result + ((getTenantDescription() == null) ? 0 : getTenantDescription().hashCode());
result = prime * result + ((getTenantState() == null) ? 0 : getTenantState().hashCode()); // result = prime * result + ((getTenantState() == null) ? 0 : getTenantState().hashCode());
result = prime * result + ((getTenantUnit() == null) ? 0 : getTenantUnit().hashCode()); // result = prime * result + ((getTenantUnit() == null) ? 0 : getTenantUnit().hashCode());
result = prime * result + ((getOwnerCompanyCode() == null) ? 0 : getOwnerCompanyCode().hashCode()); // result = prime * result + ((getOwnerCompanyCode() == null) ? 0 : getOwnerCompanyCode().hashCode());
result = prime * result + ((getOwnerCompanyName() == null) ? 0 : getOwnerCompanyName().hashCode()); // result = prime * result + ((getOwnerCompanyName() == null) ? 0 : getOwnerCompanyName().hashCode());
result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode()); // result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
result = prime * result + ((getTenantZone() == null) ? 0 : getTenantZone().hashCode()); // result = prime * result + ((getTenantZone() == null) ? 0 : getTenantZone().hashCode());
result = prime * result + ((getTenantLayer() == null) ? 0 : getTenantLayer().hashCode()); // result = prime * result + ((getTenantLayer() == null) ? 0 : getTenantLayer().hashCode());
result = prime * result + ((getTenantVersion() == null) ? 0 : getTenantVersion().hashCode()); // result = prime * result + ((getTenantVersion() == null) ? 0 : getTenantVersion().hashCode());
return result; // return result;
} // }
//
@Override // @Override
public String toString() { // public String toString() {
StringBuilder sb = new StringBuilder(); // StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName()); // sb.append(getClass().getSimpleName());
sb.append(" ["); // sb.append(" [");
sb.append("Hash = ").append(hashCode()); // sb.append("Hash = ").append(hashCode());
sb.append(", objId=").append(objId); // sb.append(", objId=").append(objId);
sb.append(", tenantName=").append(tenantName); // sb.append(", tenantName=").append(tenantName);
sb.append(", tenantCode=").append(tenantCode); // sb.append(", tenantCode=").append(tenantCode);
sb.append(", tenantGroupCode=").append(tenantGroupCode); // sb.append(", tenantGroupCode=").append(tenantGroupCode);
sb.append(", tenantIp=").append(tenantIp); // sb.append(", tenantIp=").append(tenantIp);
sb.append(", tenantUrl=").append(tenantUrl); // sb.append(", tenantUrl=").append(tenantUrl);
sb.append(", professionalKind=").append(professionalKind); // sb.append(", professionalKind=").append(professionalKind);
sb.append(", tenantUserId=").append(tenantUserId); // sb.append(", tenantUserId=").append(tenantUserId);
sb.append(", tenantOrderNo=").append(tenantOrderNo); // sb.append(", tenantOrderNo=").append(tenantOrderNo);
sb.append(", tenantCtime=").append(tenantCtime); // sb.append(", tenantCtime=").append(tenantCtime);
sb.append(", tenantMtime=").append(tenantMtime); // sb.append(", tenantMtime=").append(tenantMtime);
sb.append(", deploymentName=").append(deploymentName); // sb.append(", deploymentName=").append(deploymentName);
sb.append(", tenantDescription=").append(tenantDescription); // sb.append(", tenantDescription=").append(tenantDescription);
sb.append(", tenantState=").append(tenantState); // sb.append(", tenantState=").append(tenantState);
sb.append(", tenantUnit=").append(tenantUnit); // sb.append(", tenantUnit=").append(tenantUnit);
sb.append(", ownerCompanyCode=").append(ownerCompanyCode); // sb.append(", ownerCompanyCode=").append(ownerCompanyCode);
sb.append(", ownerCompanyName=").append(ownerCompanyName); // sb.append(", ownerCompanyName=").append(ownerCompanyName);
sb.append(", isDelete=").append(isDelete); // sb.append(", isDelete=").append(isDelete);
sb.append(", tenantZone=").append(tenantZone); // sb.append(", tenantZone=").append(tenantZone);
sb.append(", tenantLayer=").append(tenantLayer); // sb.append(", tenantLayer=").append(tenantLayer);
sb.append(", tenantVersion=").append(tenantVersion); // sb.append(", tenantVersion=").append(tenantVersion);
sb.append(", serialVersionUID=").append(serialVersionUID); // sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]"); // sb.append("]");
return sb.toString(); // return sb.toString();
} // }
} }
\ No newline at end of file
...@@ -18,4 +18,6 @@ public interface OcpApiAuditService extends IService<OcpApiAudit> { ...@@ -18,4 +18,6 @@ public interface OcpApiAuditService extends IService<OcpApiAudit> {
ResponseVO sById(OcpApiAudit ocpApiAudit); ResponseVO sById(OcpApiAudit ocpApiAudit);
void exportExcel(OcpApiAudit ocpApiAudit, HttpServletRequest request, HttpServletResponse response); void exportExcel(OcpApiAudit ocpApiAudit, HttpServletRequest request, HttpServletResponse response);
ResponseVO versionId(OcpApiAudit ocpApiAudit);
} }
...@@ -16,4 +16,6 @@ public interface OcpTenantAuditService extends IService<OcpTenantAudit> { ...@@ -16,4 +16,6 @@ public interface OcpTenantAuditService extends IService<OcpTenantAudit> {
void exportExcel(OcpTenantAudit ocpTenantAudit, HttpServletRequest request, HttpServletResponse response); void exportExcel(OcpTenantAudit ocpTenantAudit, HttpServletRequest request, HttpServletResponse response);
ResponseVO OtaById(OcpTenantAudit ocpTenantAudit); ResponseVO OtaById(OcpTenantAudit ocpTenantAudit);
ResponseVO versionId(OcpTenantAudit ocpTenantAudit);
} }
...@@ -6,4 +6,7 @@ import com.pms.ocp.model.vo.ResponseVO; ...@@ -6,4 +6,7 @@ import com.pms.ocp.model.vo.ResponseVO;
public interface OcpTenantBaseService extends IService<OcpTenantBase> { public interface OcpTenantBaseService extends IService<OcpTenantBase> {
ResponseVO getOtbList(OcpTenantBase ocpTenantBase); ResponseVO getOtbList(OcpTenantBase ocpTenantBase);
} }
...@@ -58,5 +58,11 @@ public class OcpApiAuditServiceImpl extends ServiceImpl<OcpApiAuditMapper,OcpApi ...@@ -58,5 +58,11 @@ public class OcpApiAuditServiceImpl extends ServiceImpl<OcpApiAuditMapper,OcpApi
ExportUtils.exportExcel(response, AnalysisConstant.exportOcpApiAuditName.OCP_API_AUDIT,workbook); ExportUtils.exportExcel(response, AnalysisConstant.exportOcpApiAuditName.OCP_API_AUDIT,workbook);
} }
@Override
public ResponseVO versionId(OcpApiAudit ocpApiAudit) {
List<OcpApiAudit> ocpApiAuditList = ocpApiAuditMapper.versionId(ocpApiAudit);
return ResponseVO.ok(ocpApiAuditList);
}
} }
...@@ -41,7 +41,7 @@ public class OcpTenantAuditServiceImpl extends ServiceImpl<OcpTenantAuditMapper, ...@@ -41,7 +41,7 @@ public class OcpTenantAuditServiceImpl extends ServiceImpl<OcpTenantAuditMapper,
@Override @Override
public void exportExcel(OcpTenantAudit ocpTenantAudit, HttpServletRequest request, HttpServletResponse response) { public void exportExcel(OcpTenantAudit ocpTenantAudit, HttpServletRequest request, HttpServletResponse response) {
List<OcpTenantAudit> otaListById = ocpTenantAuditMapper.getOtaListById(ocpTenantAudit); 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.OCP_TENANT_API,AnalysisConstant.exportOcpTenantApiName.OCP_TENANT_API);
Workbook workbook = ExcelExportUtil.exportExcel(param, OcpTenantAudit.class,otaListById); Workbook workbook = ExcelExportUtil.exportExcel(param, OcpTenantAudit.class,otaListById);
ExportUtils.exportExcel(response, AnalysisConstant.exportOcpTenantApiName.OCP_TENANT_API,workbook); ExportUtils.exportExcel(response, AnalysisConstant.exportOcpTenantApiName.OCP_TENANT_API,workbook);
...@@ -52,4 +52,12 @@ public class OcpTenantAuditServiceImpl extends ServiceImpl<OcpTenantAuditMapper, ...@@ -52,4 +52,12 @@ public class OcpTenantAuditServiceImpl extends ServiceImpl<OcpTenantAuditMapper,
List<OcpTenantAudit> oatrList = ocpTenantAuditMapper.OtaById(ocpTenantAudit); List<OcpTenantAudit> oatrList = ocpTenantAuditMapper.OtaById(ocpTenantAudit);
return ResponseVO.ok(oatrList); return ResponseVO.ok(oatrList);
} }
@Override
public ResponseVO versionId(OcpTenantAudit ocpTenantAudit) {
List<OcpTenantAudit> ocpTenantAudits = ocpTenantAuditMapper.versionId(ocpTenantAudit);
return ResponseVO.ok(ocpTenantAudits);
}
} }
package com.pms.ocp.service.impl; package com.pms.ocp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pms.ocp.common.constants.*;
import com.pms.ocp.common.exception.ServiceException;
import com.pms.ocp.mapper.OcpTenantBaseMapper; import com.pms.ocp.mapper.OcpTenantBaseMapper;
import com.pms.ocp.model.entity.OcpTenantBase; import com.pms.ocp.model.entity.OcpTenantBase;
import com.pms.ocp.model.vo.ResponseVO; import com.pms.ocp.model.vo.ResponseVO;
...@@ -8,10 +10,16 @@ import com.pms.ocp.service.OcpTenantBaseService; ...@@ -8,10 +10,16 @@ import com.pms.ocp.service.OcpTenantBaseService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.LinkedList;
import java.util.List; import java.util.List;
@Service @Service
public class OcpTenantBaseServiceImpl extends ServiceImpl<OcpTenantBaseMapper,OcpTenantBase> implements OcpTenantBaseService { public class OcpTenantBaseServiceImpl extends ServiceImpl<OcpTenantBaseMapper,OcpTenantBase> implements OcpTenantBaseService {
@Autowired @Autowired
private OcpTenantBaseMapper ocpTenantBaseMapper; private OcpTenantBaseMapper ocpTenantBaseMapper;
@Override @Override
...@@ -19,4 +27,9 @@ public class OcpTenantBaseServiceImpl extends ServiceImpl<OcpTenantBaseMapper,Oc ...@@ -19,4 +27,9 @@ public class OcpTenantBaseServiceImpl extends ServiceImpl<OcpTenantBaseMapper,Oc
List<OcpTenantBase> otbList = ocpTenantBaseMapper.getOtbList(ocpTenantBase); List<OcpTenantBase> otbList = ocpTenantBaseMapper.getOtbList(ocpTenantBase);
return ResponseVO.ok(otbList); return ResponseVO.ok(otbList);
} }
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
select * from ocp_api_audit oaa select * from ocp_api_audit oaa
LEFT JOIN ocp_api_base oab LEFT JOIN ocp_api_base oab
on oaa.api_code = oab.api_code on oaa.api_code = oab.api_code
where oaa.obj_id = #{objId} where oaa.api_code = #{apiCode}
</select> </select>
<select id="getOcpApiSubsList" resultType="com.pms.ocp.model.entity.OcpApiAudit"> <select id="getOcpApiSubsList" resultType="com.pms.ocp.model.entity.OcpApiAudit">
...@@ -16,4 +16,12 @@ ...@@ -16,4 +16,12 @@
<select id="sById" resultType="com.pms.ocp.model.entity.OcpApiAudit"> <select id="sById" resultType="com.pms.ocp.model.entity.OcpApiAudit">
select * from ocp_api_audit where obj_id = #{objId} select * from ocp_api_audit where obj_id = #{objId}
</select> </select>
<select id="versionId" resultType="com.pms.ocp.model.entity.OcpApiAudit">
select * from ocp_api_audit oaa
LEFT JOIN ocp_api_base oab
on oaa.api_code = oab.api_code
where oaa.api_code = #{apiCode}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -13,6 +13,13 @@ ...@@ -13,6 +13,13 @@
select * from ocp_tenant_audit ota select * from ocp_tenant_audit ota
LEFT JOIN ocp_tenant_base otb LEFT JOIN ocp_tenant_base otb
on ota.tenant_code = otb.tenant_code on ota.tenant_code = otb.tenant_code
where ota.obj_id = #{objId} where ota.tenant_code = #{tenantCode}
</select>
<select id="versionId" resultType="com.pms.ocp.model.entity.OcpTenantAudit">
select * from ocp_tenant_audit ota
LEFT JOIN ocp_tenant_base otb
on ota.tenant_code = otb.tenant_code
where ota.tenant_code = #{tenantCode}
</select> </select>
</mapper> </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