feat: add feature mapping view and notification template config

This commit is contained in:
2026-05-25 14:52:45 +08:00
parent 0ae3987fb2
commit d6750f1e93
6 changed files with 167 additions and 13 deletions
@@ -150,6 +150,12 @@ public class IntegrationCatalogController {
return ResponseEntity.ok().build();
}
@GetMapping("/feature-mappings")
public ResponseEntity<List<PlatformBitanswerIdMapping>> listFeatureMappings(
@RequestParam(required = false) Long productLineId) {
return ResponseEntity.ok(integrationCatalogService.listFeatureMappings(productLineId));
}
@GetMapping("/sku-mappings")
public ResponseEntity<List<SkuMappingResponse>> listSkuMappings(
@RequestParam(required = false) Long contractLineId) {
@@ -155,6 +155,14 @@ public class IntegrationCatalogService {
environmentMapper.deleteById(id);
}
public List<PlatformBitanswerIdMapping> listFeatureMappings(Long productLineId) {
var qw = new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<PlatformBitanswerIdMapping>()
.isNotNull(PlatformBitanswerIdMapping::getFeatureKey);
if (productLineId != null) qw.eq(PlatformBitanswerIdMapping::getProductLineId, productLineId);
qw.orderByDesc(PlatformBitanswerIdMapping::getCreatedAt);
return idMappingMapper.selectList(qw);
}
public List<PlatformBitanswerIdMapping> listIdMappings(Long productLineId, Long environmentId) {
var qw = new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<PlatformBitanswerIdMapping>();
if (productLineId != null) qw.eq(PlatformBitanswerIdMapping::getProductLineId, productLineId);