Commit 051ba77d authored by liukai's avatar liukai

问题修复

parent 0218aadd
......@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Slf4j
......@@ -35,43 +36,43 @@ public class OcpApiDetailsController {
@ApiOperation("服务订阅记录-查询")
@PostMapping("/getocpapisublist")
public ResponseVO getOcpApiSubsList(OcpApiSubs ocpApiSubs) {
public ResponseVO<List<OcpApiSubs>> getOcpApiSubsList(OcpApiSubs ocpApiSubs) {
return ocpApiSubsService.getOcpApiSubsList(ocpApiSubs);
}
@ApiOperation("服务大事记-查询")
@PostMapping("/getocpapiauditlist")
public ResponseVO getOcpApiAuditList(OcpApiAudit ocpApiAudit) {
public ResponseVO<List<OcpApiAudit>> getOcpApiAuditList(OcpApiAudit ocpApiAudit) {
return ocpApiAuditService.getOcpApiAuditList(ocpApiAudit);
}
@ApiOperation("服务大事记-查询详情")
@PostMapping("/getocpapidetails")
public ResponseVO getOcpApiDetails(@RequestBody OcpApiAudit ocpApiAudit){
public ResponseVO<List<OcpApiAudit>> getOcpApiDetails(@RequestBody OcpApiAudit ocpApiAudit){
return ocpApiAuditService.sById(ocpApiAudit);
}
@ApiOperation("服务大事记-查询详情-变更内容")
@PostMapping("/getocpapi")
public ResponseVO getOcpApi(@RequestBody OcpApiAudit ocpApiAudit){
public ResponseVO<List<OcpApiAudit>> getOcpApi(@RequestBody OcpApiAudit ocpApiAudit){
return ocpApiAuditService.OaaById(ocpApiAudit);
}
@ApiOperation("服务与应用拓扑图-查询")
@PostMapping("/getoatrlist")
public ResponseVO getOatrList(@RequestBody OcpApiTenantRel ocpApiTenantRel) {
public ResponseVO<List<OcpApiTenantRel>> getOatrList(@RequestBody OcpApiTenantRel ocpApiTenantRel) {
return ocpApiTenantRelService.getOatrList(ocpApiTenantRel);
}
@ApiOperation("服务与模型拓扑图-查询")
@PostMapping("/getoamrlist")
public ResponseVO getOamrList(@RequestBody OcpApiModelRel ocpApiModelRel) {
public ResponseVO<List<OcpApiModelRel>> getOamrList(@RequestBody OcpApiModelRel ocpApiModelRel) {
return ocpApiModelRelService.getOamrList(ocpApiModelRel);
}
@ApiOperation("服务大事记-导出")
@GetMapping("/export")
public void exportExcel(@RequestBody OcpApiAudit ocpApiAudit, HttpServletRequest request, HttpServletResponse response) {
@RequestMapping("/export")
public void exportExcel(@RequestBody(required = false) OcpApiAudit ocpApiAudit, HttpServletRequest request, HttpServletResponse response) {
ocpApiAuditService.exportExcel(ocpApiAudit,request,response);
}
......
package com.pms.ocp.controller;
import com.pms.ocp.model.entity.OcpApiAudit;
import com.pms.ocp.model.entity.OcpTenantAudit;
import com.pms.ocp.model.entity.OcpTenantBase;
import com.pms.ocp.model.vo.ResponseVO;
......@@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Slf4j
@RequestMapping("/tenant")
@RestController
......@@ -29,13 +32,19 @@ public class OcpTenantDetailsController {
@ApiOperation("应用基础信息-查询")
@PostMapping("/getotbList")
public ResponseVO getOtbList(@RequestBody OcpTenantBase ocpTenantBase){
public ResponseVO<List<OcpTenantBase>> getOtbList(@RequestBody OcpTenantBase ocpTenantBase){
return ocpTenantBaseService.getOtbList(ocpTenantBase);
}
@ApiOperation("应用大事记-查询")
@PostMapping("/getotaList")
public ResponseVO getOtaList(OcpTenantAudit ocpTenantAudit) {
public ResponseVO<List<OcpApiAudit>> getOtaList(OcpTenantAudit ocpTenantAudit) {
return ocpTenantAuditService.getOtaList(ocpTenantAudit);
}
@ApiOperation("应用大事记-查询详情")
@PostMapping("/getotaListById")
public ResponseVO<List<OcpApiAudit>> getOtaListById(@RequestBody OcpTenantAudit ocpTenantAudit) {
return ocpTenantAuditService.getOtaListById(ocpTenantAudit);
}
}
......@@ -16,8 +16,8 @@ public interface OcpApiAuditMapper extends BaseMapper<OcpApiAudit> {
List<OcpApiAudit> OaaById(OcpApiAudit ocpApiAudit);
List<String> getOcpApiSubsList(OcpApiAudit ocpApiAudit);
List<OcpApiAudit> getOcpApiSubsList(OcpApiAudit ocpApiAudit);
List<String> sById(OcpApiAudit ocpApiAudit);
List<OcpApiAudit> sById(OcpApiAudit ocpApiAudit);
}
......@@ -8,7 +8,7 @@ import java.util.List;
@Mapper
public interface OcpApiModelRelMapper extends BaseMapper<OcpApiModelRel> {
List<String> getOamrList(OcpApiModelRel ocpApiModelRel);
List<OcpApiModelRel> getOamrList(OcpApiModelRel ocpApiModelRel);
}
......@@ -8,5 +8,5 @@ import java.util.List;
@Mapper
public interface OcpApiSubsMapper extends BaseMapper<OcpApiSubs> {
List<String> getOcpApisList(OcpApiSubs ocpApiSubs);
List<OcpApiSubs> getOcpApisList(OcpApiSubs ocpApiSubs);
}
......@@ -9,5 +9,5 @@ import java.util.List;
@Mapper
public interface OcpApiTenantRelMapper extends BaseMapper<OcpApiTenantRel> {
List<String> getOatrList(OcpApiTenantRel ocpApiTenantRel);
List<OcpApiTenantRel> getOatrList(OcpApiTenantRel ocpApiTenantRel);
}
......@@ -7,4 +7,6 @@ import java.util.List;
public interface OcpTenantAuditMapper extends BaseMapper<OcpTenantAudit> {
List<OcpTenantAudit> getOtaList(OcpTenantAudit ocpTenantAudit);
List<OcpTenantAudit> getOtaListById(OcpTenantAudit ocpTenantAudit);
}
......@@ -115,5 +115,235 @@ public class OcpApiAudit {
@ApiModelProperty("服务版本(最新版本)")
private long apiVersion;
public String getObjId() {
return objId;
}
public void setObjId(String objId) {
this.objId = objId;
}
public String getApiCode() {
return apiCode;
}
public void setApiCode(String apiCode) {
this.apiCode = apiCode;
}
public long getOperStatus() {
return operStatus;
}
public void setOperStatus(long operStatus) {
this.operStatus = operStatus;
}
public long getOperTarget() {
return operTarget;
}
public void setOperTarget(long operTarget) {
this.operTarget = operTarget;
}
public long getAuditType() {
return auditType;
}
public void setAuditType(long auditType) {
this.auditType = auditType;
}
public String getAuditMessage() {
return auditMessage;
}
public void setAuditMessage(String auditMessage) {
this.auditMessage = auditMessage;
}
public String getAuditJson() {
return auditJson;
}
public void setAuditJson(String auditJson) {
this.auditJson = auditJson;
}
public String getAuditUserId() {
return auditUserId;
}
public void setAuditUserId(String auditUserId) {
this.auditUserId = auditUserId;
}
public String getAuditUserName() {
return auditUserName;
}
public void setAuditUserName(String auditUserName) {
this.auditUserName = auditUserName;
}
public Timestamp getAuditCtime() {
return auditCtime;
}
public void setAuditCtime(Timestamp auditCtime) {
this.auditCtime = auditCtime;
}
public Timestamp getAuditMtime() {
return auditMtime;
}
public void setAuditMtime(Timestamp auditMtime) {
this.auditMtime = auditMtime;
}
public long getIsDelete() {
return isDelete;
}
public void setIsDelete(long isDelete) {
this.isDelete = isDelete;
}
public long getApplyVersion() {
return applyVersion;
}
public void setApplyVersion(long applyVersion) {
this.applyVersion = applyVersion;
}
public long getPreApiVersion() {
return preApiVersion;
}
public void setPreApiVersion(long preApiVersion) {
this.preApiVersion = preApiVersion;
}
public String getApiName() {
return apiName;
}
public void setApiName(String apiName) {
this.apiName = apiName;
}
public String getApiGroupCode() {
return apiGroupCode;
}
public void setApiGroupCode(String apiGroupCode) {
this.apiGroupCode = apiGroupCode;
}
public long getApiPromotion() {
return apiPromotion;
}
public void setApiPromotion(long apiPromotion) {
this.apiPromotion = apiPromotion;
}
public String getApiReq() {
return apiReq;
}
public void setApiReq(String apiReq) {
this.apiReq = apiReq;
}
public String getApiResp() {
return apiResp;
}
public void setApiResp(String apiResp) {
this.apiResp = apiResp;
}
public String getApiUrl() {
return apiUrl;
}
public void setApiUrl(String apiUrl) {
this.apiUrl = apiUrl;
}
public Timestamp getApiCtime() {
return apiCtime;
}
public void setApiCtime(Timestamp apiCtime) {
this.apiCtime = apiCtime;
}
public Timestamp getApiMtime() {
return apiMtime;
}
public void setApiMtime(Timestamp apiMtime) {
this.apiMtime = apiMtime;
}
public String getApiUserId() {
return apiUserId;
}
public void setApiUserId(String apiUserId) {
this.apiUserId = apiUserId;
}
public String getApiUnit() {
return apiUnit;
}
public void setApiUnit(String apiUnit) {
this.apiUnit = apiUnit;
}
public String getOwnerCompanyCode() {
return ownerCompanyCode;
}
public void setOwnerCompanyCode(String ownerCompanyCode) {
this.ownerCompanyCode = ownerCompanyCode;
}
public String getOwnerCompanyName() {
return ownerCompanyName;
}
public void setOwnerCompanyName(String ownerCompanyName) {
this.ownerCompanyName = ownerCompanyName;
}
public long getApiZone() {
return apiZone;
}
public void setApiZone(long apiZone) {
this.apiZone = apiZone;
}
public long getApiLayer() {
return apiLayer;
}
public void setApiLayer(long apiLayer) {
this.apiLayer = apiLayer;
}
public long getApiVersion() {
return apiVersion;
}
public void setApiVersion(long apiVersion) {
this.apiVersion = apiVersion;
}
}
......@@ -11,7 +11,7 @@ import java.sql.Timestamp;
@Data
@Accessors(chain = true)
@TableName("ocp_api_Tenant_rel")
@ApiModel("服务应用关系表")
public class OcpApiTenantRel {
......
......@@ -12,8 +12,6 @@ public interface OcpApiAuditService {
ResponseVO getOcpApiDetails(String objId);
// ResponseVO getOcpApiList(Oaa oaa);
ResponseVO OaaById(OcpApiAudit ocpApiAudit);
ResponseVO sById(OcpApiAudit ocpApiAudit);
......
......@@ -5,4 +5,6 @@ import com.pms.ocp.model.vo.ResponseVO;
public interface OcpTenantAuditService {
ResponseVO getOtaList(OcpTenantAudit ocpTenantAudit);
ResponseVO getOtaListById(OcpTenantAudit ocpTenantAudit);
}
......@@ -27,12 +27,8 @@ public class OcpApiAuditServiceImpl extends ServiceImpl<OcpApiAuditMapper,OcpApi
@Override
public ResponseVO getOcpApiAuditList(OcpApiAudit ocpApiAudit) {
List<String> ocpApiAuditList = ocpApiAuditMapper.getOcpApiSubsList(ocpApiAudit);
if(CollectionUtils.isEmpty(ocpApiAuditList)){
return ResponseVO.error("查询列表为空");
}else{
return ResponseVO.ok(ocpApiAuditList);
}
List<OcpApiAudit> ocpApiAuditList = ocpApiAuditMapper.getOcpApiSubsList(ocpApiAudit);
return ResponseVO.ok(ocpApiAuditList);
}
......@@ -50,7 +46,7 @@ public class OcpApiAuditServiceImpl extends ServiceImpl<OcpApiAuditMapper,OcpApi
@Override
public ResponseVO sById(OcpApiAudit ocpApiAudit) {
List<String> oaaById = ocpApiAuditMapper.sById(ocpApiAudit);
List<OcpApiAudit> oaaById = ocpApiAuditMapper.sById(ocpApiAudit);
return ResponseVO.ok(oaaById);
}
......
......@@ -16,7 +16,7 @@ public class OcpApiModelRelServiceImpl extends ServiceImpl<OcpApiModelRelMapper,
private OcpApiModelRelMapper ocpApiModelRelMapper;
@Override
public ResponseVO getOamrList(OcpApiModelRel ocpApiModelRel) {
List<String> ocpApiModelRelList = ocpApiModelRelMapper.getOamrList(ocpApiModelRel);
List<OcpApiModelRel> ocpApiModelRelList = ocpApiModelRelMapper.getOamrList(ocpApiModelRel);
return ResponseVO.ok(ocpApiModelRelList);
}
}
......@@ -20,11 +20,7 @@ public class OcpApiSubsServiceImpl extends ServiceImpl<OcpApiSubsMapper,OcpApiSu
private OcpApiSubsMapper ocpApiSubsMapper;
@Override
public ResponseVO getOcpApiSubsList(OcpApiSubs ocpApiSubs) {
List<String> ocpApiSubsList = ocpApiSubsMapper.getOcpApisList(ocpApiSubs);
if(CollectionUtils.isEmpty(ocpApiSubsList)){
return ResponseVO.error("查询列表为空");
}else{
return ResponseVO.ok(ocpApiSubsList);
}
List<OcpApiSubs> ocpApiSubsList = ocpApiSubsMapper.getOcpApisList(ocpApiSubs);
return ResponseVO.ok(ocpApiSubsList);
}
}
......@@ -19,7 +19,7 @@ public class OcpApiTenantRelServiceImpl extends ServiceImpl<OcpApiTenantRelMappe
@Override
public ResponseVO getOatrList(OcpApiTenantRel ocpApiTenantRel) {
List<String> oatrList = ocpApiTenantRelMapper.getOatrList(ocpApiTenantRel);
List<OcpApiTenantRel> oatrList = ocpApiTenantRelMapper.getOatrList(ocpApiTenantRel);
return ResponseVO.ok(oatrList);
}
}
......@@ -20,4 +20,10 @@ public class OcpTenantAuditServiceImpl extends ServiceImpl<OcpTenantAuditMapper,
List<OcpTenantAudit> otaList = ocpTenantAuditMapper.getOtaList(ocpTenantAudit);
return ResponseVO.ok(otaList);
}
@Override
public ResponseVO getOtaListById(OcpTenantAudit ocpTenantAudit) {
List<OcpTenantAudit> otaListById = ocpTenantAuditMapper.getOtaListById(ocpTenantAudit);
return ResponseVO.ok(otaListById);
}
}
......@@ -9,11 +9,11 @@
where oaa.obj_id = #{objId}
</select>
<select id="getOcpApiSubsList" resultType="java.lang.String">
<select id="getOcpApiSubsList" resultType="com.pms.ocp.model.entity.OcpApiAudit">
select * from ocp_api_audit
</select>
<select id="sById" resultType="java.lang.String">
<select id="sById" resultType="com.pms.ocp.model.entity.OcpApiAudit">
select * from ocp_api_audit where obj_id = #{objId}
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pms.ocp.mapper.OcpApiModelRelMapper">
<select id="getOamrList" resultType="java.lang.String">
<select id="getOamrList" resultType="com.pms.ocp.model.entity.OcpApiModelRel">
select * from ocp_api_model_rel oamr
LEFT JOIN ocp_model_base omb
on oamr.model_code = omb.model_code
......
......@@ -4,7 +4,7 @@
<select id="getOcpApisList" resultType="java.lang.String">
<select id="getOcpApisList" resultType="com.pms.ocp.model.entity.OcpApiSubs">
SELECT * from ocp_api_subs oas
left JOIN ocp_api_base oab on
oas.api_code = oab.api_code
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pms.ocp.mapper.OcpApiTenantRelMapper">
<select id="getOatrList" resultType="java.lang.String">
<select id="getOatrList" resultType="com.pms.ocp.model.entity.OcpApiTenantRel">
SELECT * from ocp_api_tenant_rel
oa LEFT JOIN ocp_api_base ab on
oa.api_code = ab.api_code INNER JOIN
......
......@@ -4,4 +4,8 @@
<select id="getOtaList" resultType="com.pms.ocp.model.entity.OcpTenantAudit">
select * from ocp_tenant_audit
</select>
<select id="getOtaListById" resultType="com.pms.ocp.model.entity.OcpTenantAudit">
select * from ocp_tenant_audit where obj_id = #{objId}
</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