接口审核问题
This commit is contained in:
parent
b343abf8ed
commit
2073049b66
@ -2,6 +2,7 @@ package ink.wgink.gatewaymanage.controller.api.api.permission;
|
|||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.exceptions.ParamsException;
|
import ink.wgink.exceptions.ParamsException;
|
||||||
|
import ink.wgink.gatewaymanage.pojo.dtos.api.ApiClaimDTO;
|
||||||
import ink.wgink.gatewaymanage.pojo.dtos.api.ApiDTO;
|
import ink.wgink.gatewaymanage.pojo.dtos.api.ApiDTO;
|
||||||
import ink.wgink.gatewaymanage.service.api.permission.IApiPermissionService;
|
import ink.wgink.gatewaymanage.service.api.permission.IApiPermissionService;
|
||||||
import ink.wgink.gatewaymanage.service.claim.IClaimService;
|
import ink.wgink.gatewaymanage.service.claim.IClaimService;
|
||||||
@ -69,7 +70,7 @@ public class ApiPermissionController extends DefaultBaseController {
|
|||||||
})
|
})
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@GetMapping("listpage-claim/{claimType}")
|
@GetMapping("listpage-claim/{claimType}")
|
||||||
public SuccessResultList<List<ApiDTO>> listPageClaim(@PathVariable("claimType") String claimType, ListPage page) {
|
public SuccessResultList<List<ApiClaimDTO>> listPageClaim(@PathVariable("claimType") String claimType, ListPage page) {
|
||||||
if (!StringUtils.equals(IClaimService.CLAIM_TYPE_ALL, claimType) &&
|
if (!StringUtils.equals(IClaimService.CLAIM_TYPE_ALL, claimType) &&
|
||||||
!StringUtils.equals(IClaimService.CLAIM_TYPE_CLAIM, claimType) &&
|
!StringUtils.equals(IClaimService.CLAIM_TYPE_CLAIM, claimType) &&
|
||||||
!StringUtils.equals(IClaimService.CLAIM_TYPE_UNCLAIMED, claimType)) {
|
!StringUtils.equals(IClaimService.CLAIM_TYPE_UNCLAIMED, claimType)) {
|
||||||
|
@ -135,4 +135,13 @@ public interface IApiDao extends IInitBaseTable {
|
|||||||
* @throws SearchException
|
* @throws SearchException
|
||||||
*/
|
*/
|
||||||
ExamineDTO getExamineResult(Map<String, Object> params) throws SearchException;
|
ExamineDTO getExamineResult(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口ID列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<String> listId(Map<String, Object> params) throws SearchException;
|
||||||
}
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package ink.wgink.gatewaymanage.pojo.dtos.api;
|
||||||
|
|
||||||
|
import ink.wgink.gatewaymanage.pojo.dtos.claim.ClaimDTO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @ClassName: ApiClaimDTO
|
||||||
|
* @Description: 接口认领
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2021-08-16 14:50:40
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@ApiModel
|
||||||
|
public class ApiClaimDTO extends ApiDTO {
|
||||||
|
|
||||||
|
private ClaimDTO claim;
|
||||||
|
|
||||||
|
public ClaimDTO getClaim() {
|
||||||
|
return claim == null ? new ClaimDTO() : claim;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClaim(ClaimDTO claim) {
|
||||||
|
this.claim = claim;
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,5 @@
|
|||||||
package ink.wgink.gatewaymanage.pojo.dtos.api;
|
package ink.wgink.gatewaymanage.pojo.dtos.api;
|
||||||
|
|
||||||
import ink.wgink.gatewaymanage.pojo.dtos.claim.ClaimDTO;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
@ -57,8 +56,6 @@ public class ApiDTO {
|
|||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
@ApiModelProperty(name = "gmtModified", value = "修改时间")
|
@ApiModelProperty(name = "gmtModified", value = "修改时间")
|
||||||
private String gmtModified;
|
private String gmtModified;
|
||||||
@ApiModelProperty(name = "claim", value = "认领情况")
|
|
||||||
private ClaimDTO claim;
|
|
||||||
|
|
||||||
public String getApiId() {
|
public String getApiId() {
|
||||||
return apiId == null ? "" : apiId.trim();
|
return apiId == null ? "" : apiId.trim();
|
||||||
@ -228,11 +225,4 @@ public class ApiDTO {
|
|||||||
this.gmtModified = gmtModified;
|
this.gmtModified = gmtModified;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClaimDTO getClaim() {
|
|
||||||
return claim == null ? new ClaimDTO() : claim;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClaim(ClaimDTO claim) {
|
|
||||||
this.claim = claim;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ import lombok.Data;
|
|||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @ClassName: ClaimDTO
|
* @ClassName: ClaimDTO
|
||||||
* @Description: 接口认领
|
* @Description: 接口认领
|
||||||
* @Author: CodeFactory
|
* @Author: CodeFactory
|
||||||
|
@ -217,6 +217,30 @@ public interface IApiService {
|
|||||||
*/
|
*/
|
||||||
SuccessResultList<List<ApiDTO>> listPage(ListPage page);
|
SuccessResultList<List<ApiDTO>> listPage(ListPage page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API列表
|
||||||
|
*
|
||||||
|
* @param systemIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ApiDTO> listBySystemIds(List<String> systemIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口ID列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> listId(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口ID列表
|
||||||
|
*
|
||||||
|
* @param systemIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> listIdBySystemIds(List<String> systemIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口统计
|
* 接口统计
|
||||||
*
|
*
|
||||||
|
@ -18,6 +18,7 @@ import ink.wgink.gatewaymanage.pojo.vos.api.ApiVO;
|
|||||||
import ink.wgink.gatewaymanage.pojo.vos.examine.ExamineVO;
|
import ink.wgink.gatewaymanage.pojo.vos.examine.ExamineVO;
|
||||||
import ink.wgink.gatewaymanage.pojo.vos.message.MessageVO;
|
import ink.wgink.gatewaymanage.pojo.vos.message.MessageVO;
|
||||||
import ink.wgink.gatewaymanage.service.api.IApiService;
|
import ink.wgink.gatewaymanage.service.api.IApiService;
|
||||||
|
import ink.wgink.gatewaymanage.service.claim.IClaimService;
|
||||||
import ink.wgink.gatewaymanage.service.message.IMessageService;
|
import ink.wgink.gatewaymanage.service.message.IMessageService;
|
||||||
import ink.wgink.gatewaymanage.service.system.ISystemService;
|
import ink.wgink.gatewaymanage.service.system.ISystemService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
@ -47,6 +48,8 @@ public class ApiServiceImpl extends DefaultBaseService implements IApiService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISystemService systemService;
|
private ISystemService systemService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private IClaimService claimService;
|
||||||
|
@Autowired
|
||||||
private IMessageService messageService;
|
private IMessageService messageService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private KafkaTemplate<String, Object> kafkaTemplate;
|
private KafkaTemplate<String, Object> kafkaTemplate;
|
||||||
@ -100,10 +103,13 @@ public class ApiServiceImpl extends DefaultBaseService implements IApiService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeBySystemIds(List<String> systemIds) {
|
public void removeBySystemIds(List<String> systemIds) {
|
||||||
|
List<String> apiIds = listIdBySystemIds(systemIds);
|
||||||
Map<String, Object> params = getHashMap(2);
|
Map<String, Object> params = getHashMap(2);
|
||||||
params.put("systemIds", systemIds);
|
params.put("systemIds", systemIds);
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
apiDao.remove(params);
|
apiDao.remove(params);
|
||||||
|
// 删除接口认领记录
|
||||||
|
claimService.deleteByApiIds(apiIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -111,6 +117,8 @@ public class ApiServiceImpl extends DefaultBaseService implements IApiService {
|
|||||||
Map<String, Object> params = getHashMap(2);
|
Map<String, Object> params = getHashMap(2);
|
||||||
params.put("apiIds", ids);
|
params.put("apiIds", ids);
|
||||||
apiDao.delete(params);
|
apiDao.delete(params);
|
||||||
|
// 删除接口认领记录
|
||||||
|
claimService.deleteByApiIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -224,6 +232,25 @@ public class ApiServiceImpl extends DefaultBaseService implements IApiService {
|
|||||||
return new SuccessResultList<>(apiDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
return new SuccessResultList<>(apiDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ApiDTO> listBySystemIds(List<String> systemIds) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("systemIds", systemIds);
|
||||||
|
return list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> listId(Map<String, Object> params) {
|
||||||
|
return apiDao.listId(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> listIdBySystemIds(List<String> systemIds) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("systemIds", systemIds);
|
||||||
|
return listId(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer count(Map<String, Object> params) {
|
public Integer count(Map<String, Object> params) {
|
||||||
Integer count = apiDao.count(params);
|
Integer count = apiDao.count(params);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package ink.wgink.gatewaymanage.service.api.permission;
|
package ink.wgink.gatewaymanage.service.api.permission;
|
||||||
|
|
||||||
|
import ink.wgink.gatewaymanage.pojo.dtos.api.ApiClaimDTO;
|
||||||
import ink.wgink.gatewaymanage.pojo.dtos.api.ApiDTO;
|
import ink.wgink.gatewaymanage.pojo.dtos.api.ApiDTO;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
@ -39,5 +40,5 @@ public interface IApiPermissionService {
|
|||||||
* @param page
|
* @param page
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SuccessResultList<List<ApiDTO>> listPageClaim(String claimType, ListPage page);
|
SuccessResultList<List<ApiClaimDTO>> listPageClaim(String claimType, ListPage page);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package ink.wgink.gatewaymanage.service.api.permission.impl;
|
package ink.wgink.gatewaymanage.service.api.permission.impl;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
|
import ink.wgink.gatewaymanage.pojo.dtos.api.ApiClaimDTO;
|
||||||
import ink.wgink.gatewaymanage.pojo.dtos.api.ApiDTO;
|
import ink.wgink.gatewaymanage.pojo.dtos.api.ApiDTO;
|
||||||
import ink.wgink.gatewaymanage.pojo.dtos.claim.ClaimDTO;
|
import ink.wgink.gatewaymanage.pojo.dtos.claim.ClaimDTO;
|
||||||
import ink.wgink.gatewaymanage.pojo.pos.claim.ClaimPO;
|
import ink.wgink.gatewaymanage.pojo.pos.claim.ClaimPO;
|
||||||
@ -47,7 +48,7 @@ public class ApiPermissionServiceImpl extends DefaultBaseService implements IApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SuccessResultList<List<ApiDTO>> listPageClaim(String claimType, ListPage page) {
|
public SuccessResultList<List<ApiClaimDTO>> listPageClaim(String claimType, ListPage page) {
|
||||||
// 我的认领列表
|
// 我的认领列表
|
||||||
List<ClaimPO> claimPOs = claimPermissionService.listPO();
|
List<ClaimPO> claimPOs = claimPermissionService.listPO();
|
||||||
Set<String> apiIds = new HashSet<>();
|
Set<String> apiIds = new HashSet<>();
|
||||||
@ -56,26 +57,38 @@ public class ApiPermissionServiceImpl extends DefaultBaseService implements IApi
|
|||||||
}
|
}
|
||||||
if (StringUtils.equals(IClaimService.CLAIM_TYPE_CLAIM, claimType)) {
|
if (StringUtils.equals(IClaimService.CLAIM_TYPE_CLAIM, claimType)) {
|
||||||
if (claimPOs.isEmpty()) {
|
if (claimPOs.isEmpty()) {
|
||||||
return new SuccessResultList<List<ApiDTO>>(new ArrayList<>(), 1, 0L);
|
return new SuccessResultList<>(new ArrayList<>(), 1, 0L);
|
||||||
}
|
}
|
||||||
page.getParams().put("claimApiIds", new ArrayList<>(apiIds));
|
page.getParams().put("claimApiIds", new ArrayList<>(apiIds));
|
||||||
} else if (StringUtils.equals(IClaimService.CLAIM_TYPE_UNCLAIMED, claimType)) {
|
} else if (StringUtils.equals(IClaimService.CLAIM_TYPE_UNCLAIMED, claimType)) {
|
||||||
page.getParams().put("unclaimedApiIds", new ArrayList<>(apiIds));
|
page.getParams().put("unclaimedApiIds", new ArrayList<>(apiIds));
|
||||||
}
|
}
|
||||||
page.getParams().put("auditStatus", "pass");
|
page.getParams().put("auditStatus", "pass");
|
||||||
SuccessResultList<List<ApiDTO>> listSuccessResultList = apiService.listPage(page);
|
SuccessResultList<List<ApiDTO>> apiSuccessResultList = apiService.listPage(page);
|
||||||
List<ClaimDTO> claimDTOs = new ArrayList<>();
|
List<ClaimDTO> claimDTOs = new ArrayList<>();
|
||||||
for (ApiDTO apiDTO : listSuccessResultList.getRows()) {
|
List<ApiClaimDTO> apiClaimDTOs = new ArrayList<>();
|
||||||
|
apiSuccessResultList.getRows().forEach(apiDTO -> {
|
||||||
|
ApiClaimDTO apiClaimDTO = new ApiClaimDTO();
|
||||||
|
apiClaimDTO.setApiId(apiDTO.getApiId());
|
||||||
|
apiClaimDTO.setSystemId(apiDTO.getSystemId());
|
||||||
|
apiClaimDTO.setSystemName(apiDTO.getSystemName());
|
||||||
|
apiClaimDTO.setTitle(apiDTO.getTitle());
|
||||||
|
apiClaimDTO.setUrl(apiDTO.getUrl());
|
||||||
|
apiClaimDTO.setSummary(apiDTO.getSummary());
|
||||||
|
apiClaimDTO.setPublishTime(apiDTO.getPublishTime());
|
||||||
|
apiClaimDTO.setMethod(apiDTO.getMethod());
|
||||||
for (ClaimPO claimPO : claimPOs) {
|
for (ClaimPO claimPO : claimPOs) {
|
||||||
if (StringUtils.equals(apiDTO.getApiId(), claimPO.getApiId())) {
|
if (StringUtils.equals(apiDTO.getApiId(), claimPO.getApiId())) {
|
||||||
ClaimDTO claimDTO = new ClaimDTO();
|
ClaimDTO claimDTO = new ClaimDTO();
|
||||||
BeanUtils.copyProperties(claimPO, claimDTO);
|
BeanUtils.copyProperties(claimPO, claimDTO);
|
||||||
apiDTO.setClaim(claimDTO);
|
apiClaimDTO.setClaim(claimDTO);
|
||||||
claimDTOs.add(claimDTO);
|
claimDTOs.add(claimDTO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
apiClaimDTOs.add(apiClaimDTO);
|
||||||
|
});
|
||||||
|
// 设置审核人
|
||||||
claimService.setAuditor(claimDTOs);
|
claimService.setAuditor(claimDTOs);
|
||||||
return listSuccessResultList;
|
return new SuccessResultList<>(apiClaimDTOs, apiSuccessResultList.getPage(), apiSuccessResultList.getTotal());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,13 @@ public interface IClaimService {
|
|||||||
*/
|
*/
|
||||||
void delete(List<String> ids);
|
void delete(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除接口认领(物理删除)
|
||||||
|
*
|
||||||
|
* @param apiIds
|
||||||
|
*/
|
||||||
|
void deleteByApiIds(List<String> apiIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改接口认领
|
* 修改接口认领
|
||||||
*
|
*
|
||||||
@ -213,4 +220,5 @@ public interface IClaimService {
|
|||||||
* @param claimDTOs
|
* @param claimDTOs
|
||||||
*/
|
*/
|
||||||
void setAuditor(List<ClaimDTO> claimDTOs);
|
void setAuditor(List<ClaimDTO> claimDTOs);
|
||||||
|
|
||||||
}
|
}
|
@ -97,6 +97,13 @@ public class ClaimServiceImpl extends DefaultBaseService implements IClaimServic
|
|||||||
claimDao.delete(params);
|
claimDao.delete(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteByApiIds(List<String> apiIds) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("apiIds", apiIds);
|
||||||
|
claimDao.delete(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(String claimId, ClaimVO claimVO) {
|
public void update(String claimId, ClaimVO claimVO) {
|
||||||
update(null, claimId, claimVO);
|
update(null, claimId, claimVO);
|
||||||
@ -228,22 +235,32 @@ public class ClaimServiceImpl extends DefaultBaseService implements IClaimServic
|
|||||||
List<ApiPO> apiPOs = apiService.listPO(new ArrayList<>(apiSet));
|
List<ApiPO> apiPOs = apiService.listPO(new ArrayList<>(apiSet));
|
||||||
|
|
||||||
for (ClaimDTO claimDTO : claimDTOs) {
|
for (ClaimDTO claimDTO : claimDTOs) {
|
||||||
|
boolean isSystemExist = false;
|
||||||
|
boolean isApiExist = false;
|
||||||
for (SystemPO systemPO : systemPOs) {
|
for (SystemPO systemPO : systemPOs) {
|
||||||
if (StringUtils.equals(claimDTO.getSystemId(), systemPO.getSystemId())) {
|
if (StringUtils.equals(claimDTO.getSystemId(), systemPO.getSystemId())) {
|
||||||
SystemDTO systemDTO = new SystemDTO();
|
SystemDTO systemDTO = new SystemDTO();
|
||||||
BeanUtils.copyProperties(systemPO, systemDTO);
|
BeanUtils.copyProperties(systemPO, systemDTO);
|
||||||
claimDTO.setSystem(systemDTO);
|
claimDTO.setSystem(systemDTO);
|
||||||
|
isSystemExist = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!isSystemExist) {
|
||||||
|
claimDTO.setSystem(new SystemDTO());
|
||||||
|
}
|
||||||
for (ApiPO apiPO : apiPOs) {
|
for (ApiPO apiPO : apiPOs) {
|
||||||
if (StringUtils.equals(claimDTO.getApiId(), apiPO.getApiId())) {
|
if (StringUtils.equals(claimDTO.getApiId(), apiPO.getApiId())) {
|
||||||
ApiDTO apiDTO = new ApiDTO();
|
ApiDTO apiDTO = new ApiDTO();
|
||||||
BeanUtils.copyProperties(apiPO, apiDTO);
|
BeanUtils.copyProperties(apiPO, apiDTO);
|
||||||
claimDTO.setApi(apiDTO);
|
claimDTO.setApi(apiDTO);
|
||||||
|
isApiExist = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!isApiExist) {
|
||||||
|
claimDTO.setApi(new ApiDTO());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +73,8 @@ public class SystemServiceImpl extends DefaultBaseService implements ISystemServ
|
|||||||
@Override
|
@Override
|
||||||
public void remove(List<String> ids) {
|
public void remove(List<String> ids) {
|
||||||
remove(null, ids);
|
remove(null, ids);
|
||||||
|
// 删除API
|
||||||
|
apiService.removeBySystemIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -94,6 +96,8 @@ public class SystemServiceImpl extends DefaultBaseService implements ISystemServ
|
|||||||
params.put("systemIds", ids);
|
params.put("systemIds", ids);
|
||||||
systemDao.delete(params);
|
systemDao.delete(params);
|
||||||
deleteDependency(ids);
|
deleteDependency(ids);
|
||||||
|
// 删除API
|
||||||
|
apiService.deleteBySystemIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -429,6 +429,13 @@
|
|||||||
#{apiIds[${index}]}
|
#{apiIds[${index}]}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="systemIds != null and systemIds != ''">
|
||||||
|
AND
|
||||||
|
t1.system_id IN
|
||||||
|
<foreach collection="systemIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{systemIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="creator != null and creator != ''">
|
<if test="creator != null and creator != ''">
|
||||||
AND
|
AND
|
||||||
t1.creator = #{creator}
|
t1.creator = #{creator}
|
||||||
@ -575,7 +582,26 @@
|
|||||||
FROM
|
FROM
|
||||||
api_api t1
|
api_api t1
|
||||||
WHERE
|
WHERE
|
||||||
|
t1.is_delete = 0
|
||||||
|
AND
|
||||||
t1.api_id = #{apiId}
|
t1.api_id = #{apiId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 接口ID列表 -->
|
||||||
|
<select id="listId" parameterType="map" resultType="String">
|
||||||
|
SELECT
|
||||||
|
api_id
|
||||||
|
FROM
|
||||||
|
api_api
|
||||||
|
WHERE
|
||||||
|
is_delete = 0
|
||||||
|
<if test="systemIds != null and systemIds.size > 0">
|
||||||
|
AND
|
||||||
|
system_id IN
|
||||||
|
<foreach collection="systemIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{systemIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -89,10 +89,24 @@
|
|||||||
DELETE FROM
|
DELETE FROM
|
||||||
api_claim
|
api_claim
|
||||||
WHERE
|
WHERE
|
||||||
|
<if test="claimIds != null and claimIds.size > 0">
|
||||||
claim_id IN
|
claim_id IN
|
||||||
<foreach collection="claimIds" index="index" open="(" separator="," close=")">
|
<foreach collection="claimIds" index="index" open="(" separator="," close=")">
|
||||||
#{claimIds[${index}]}
|
#{claimIds[${index}]}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="systemIds != null and systemIds.size > 0">
|
||||||
|
system_id IN
|
||||||
|
<foreach collection="systemIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{systemIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="apiIds != null and apiIds.size > 0">
|
||||||
|
api_id IN
|
||||||
|
<foreach collection="apiIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{apiIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 修改接口认领 -->
|
<!-- 修改接口认领 -->
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
function initTable() {
|
function initTable() {
|
||||||
|
var cols =
|
||||||
table.render({
|
table.render({
|
||||||
elem: '#dataTable',
|
elem: '#dataTable',
|
||||||
id: 'dataTable',
|
id: 'dataTable',
|
||||||
|
Loading…
Reference in New Issue
Block a user