From 397c032f84533f96108ab487e87d2469c76b8d27 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期四, 10 十一月 2022 10:42:49 +0800
Subject: [PATCH] #feat 便民服务订单、支付基础类添加
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComChangeCarModelRelationServiceImpl.java | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComChangeCarModelRelationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComChangeCarModelRelationServiceImpl.java
index 81ad177..e45ac7f 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComChangeCarModelRelationServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComChangeCarModelRelationServiceImpl.java
@@ -1,6 +1,9 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.panzhihua.common.model.vos.common.ComChangeCarModelRelationVo;
+import com.panzhihua.common.model.vos.common.ComChangeCarModelVo;
import com.panzhihua.service_community.entity.ComChangeCarModelRelation;
import com.panzhihua.service_community.dao.ComChangeCarModelRelationMapper;
import com.panzhihua.service_community.service.ComChangeCarModelRelationService;
@@ -10,6 +13,8 @@
import com.panzhihua.common.model.vos.R;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import java.util.List;
/**
* title: 换新车-车型与规格关联表表服务实现类
@@ -48,7 +53,7 @@
@Override
public R insert(AddComChangeCarModelRelationDto comChangeCarModelRelation) {
ComChangeCarModelRelation entity = this.baseMapper.selectOne(new QueryWrapper<ComChangeCarModelRelation>().lambda()
- .eq(ComChangeCarModelRelation::getModelId,comChangeCarModelRelation.getModelSpecsId())
+ .eq(ComChangeCarModelRelation::getModelId,comChangeCarModelRelation.getModelId())
.eq(ComChangeCarModelRelation::getModelSpecsId,comChangeCarModelRelation.getModelSpecsId()));
if(entity == null){
entity = new ComChangeCarModelRelation();
@@ -142,6 +147,12 @@
*/
@Override
public R queryByAppletsPage(PageComChangeCarModelRelationDto comChangeCarModelRelation) {
- return R.ok(this.baseMapper.queryAllByAppletsLimit(comChangeCarModelRelation, new Page(comChangeCarModelRelation.getPageNum(), comChangeCarModelRelation.getPageSize())));
+ IPage<ComChangeCarModelVo> carModelVoIPage = this.baseMapper.queryAllByAppletsLimit(comChangeCarModelRelation, new Page(comChangeCarModelRelation.getPageNum(), comChangeCarModelRelation.getPageSize()));
+ carModelVoIPage.getRecords().forEach(carModel -> {
+ //查询车型规格列表
+ List<ComChangeCarModelRelationVo> carModelRelationVoList = this.baseMapper.queryAllByModelId(carModel.getId());
+ carModel.setCarModelRelationList(carModelRelationVoList);
+ });
+ return R.ok(carModelVoIPage);
}
}
--
Gitblit v1.7.1