fix(1882): select 优化

This commit is contained in:
TanJ 2023-12-01 10:44:00 +08:00
parent b0048071e7
commit 756bfebe41

View File

@ -2,6 +2,7 @@ package cn.axzo.tyr.server.service.impl;
import cn.axzo.basics.common.BeanMapper;
import cn.axzo.framework.domain.web.result.ApiResult;
import cn.axzo.pokonyan.config.mybatisplus.BaseEntity;
import cn.axzo.thrones.client.saas.ServicePkgClient;
import cn.axzo.thrones.client.saas.entity.serivicepgkproduct.ServicePkgProduct;
import cn.axzo.thrones.client.saas.entity.servicepkg.ServicePkgDetailRes;
@ -93,10 +94,11 @@ public class ProductFeatureRelationServiceImpl implements ProductFeatureRelation
@Override
public ApiResult<List<ProductFeatureRelationVO>> featureListByProduct(List<Long> productIds) {
List<SaasProductModuleFeatureRelation> list = saasProductModuleFeatureRelationDao.lambdaQuery()
.select(SaasProductModuleFeatureRelation::getFeatureId)
.select(SaasProductModuleFeatureRelation::getProductModuleId)
.select(SaasProductModuleFeatureRelation::getDictCode)
.select(SaasProductModuleFeatureRelation::getDictCodeId)
.select(SaasProductModuleFeatureRelation::getFeatureId
,SaasProductModuleFeatureRelation::getProductModuleId
,SaasProductModuleFeatureRelation::getDictCode
,SaasProductModuleFeatureRelation::getDictCodeId
, BaseEntity::getId)
.in(SaasProductModuleFeatureRelation::getProductModuleId, productIds)
.list();
return ApiResult.ok(BeanMapper.copyList(list, ProductFeatureRelationVO.class));