|
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.fdkk.sxz.base.impl.BaseServiceImpl;
|
|
import com.fdkk.sxz.base.impl.BaseServiceImpl;
|
|
|
|
+import com.fdkk.sxz.entity.custuom.CustomComponentClassifyEntity;
|
|
import com.fdkk.sxz.entity.custuom.CustomComponentEntity;
|
|
import com.fdkk.sxz.entity.custuom.CustomComponentEntity;
|
|
import com.fdkk.sxz.entity.custuom.CustomProductEntity;
|
|
import com.fdkk.sxz.entity.custuom.CustomProductEntity;
|
|
import com.fdkk.sxz.vo.request.RequestCustom;
|
|
import com.fdkk.sxz.vo.request.RequestCustom;
|
|
@@ -12,6 +13,7 @@ import com.fdkk.sxz.vo.request.RequestCustomComponent;
|
|
import com.fdkk.sxz.vo.response.ResponseCustomComponent;
|
|
import com.fdkk.sxz.vo.response.ResponseCustomComponent;
|
|
import com.fdkk.sxz.vo.response.ResponseCustomProduct;
|
|
import com.fdkk.sxz.vo.response.ResponseCustomProduct;
|
|
import com.fdkk.sxz.webApi.mapper.custom.ICustomComponentMapper;
|
|
import com.fdkk.sxz.webApi.mapper.custom.ICustomComponentMapper;
|
|
|
|
+import com.fdkk.sxz.webApi.service.custom.ICustomComponentClassifyService;
|
|
import com.fdkk.sxz.webApi.service.custom.ICustomComponentService;
|
|
import com.fdkk.sxz.webApi.service.custom.ICustomComponentService;
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -34,6 +36,9 @@ public class CustomComponentServiceImpl extends BaseServiceImpl<ICustomComponent
|
|
@Autowired
|
|
@Autowired
|
|
private ICustomComponentMapper customComponentMapper;
|
|
private ICustomComponentMapper customComponentMapper;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ICustomComponentClassifyService componentClassifyService;
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -84,6 +89,10 @@ public class CustomComponentServiceImpl extends BaseServiceImpl<ICustomComponent
|
|
return list(wrapper).stream().map(a ->{
|
|
return list(wrapper).stream().map(a ->{
|
|
ResponseCustomComponent customComponent=new ResponseCustomComponent();
|
|
ResponseCustomComponent customComponent=new ResponseCustomComponent();
|
|
BeanUtils.copyProperties(a, customComponent);
|
|
BeanUtils.copyProperties(a, customComponent);
|
|
|
|
+ CustomComponentClassifyEntity componentClassifyEntity = componentClassifyService.findById(a.getComponentTypeId());
|
|
|
|
+ if (ObjectUtil.isNotNull(componentClassifyEntity)){
|
|
|
|
+ customComponent.setComponentTypeName(componentClassifyEntity.getName());
|
|
|
|
+ }
|
|
customComponent.setType("component");
|
|
customComponent.setType("component");
|
|
return customComponent;
|
|
return customComponent;
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|