From 58d8214ca840d30d6134fc9ec2918f63ecd04888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Fri, 7 Apr 2023 16:45:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=A9=E8=B5=84=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E4=BB=B7=E6=A0=BC=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/controller/basic/UdiRelevanceController.java | 4 +++- .../java/com/glxp/api/service/basic/UdiRlSupService.java | 2 ++ .../glxp/api/service/basic/impl/UdiRlSupServiceImpl.java | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java index 22627c6d..a10e444a 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java @@ -40,6 +40,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; @@ -681,7 +682,8 @@ public class UdiRelevanceController extends BaseController { if (udiProductEntity.getRelSupId() != null) { UdiRlSupEntity udiRlSupEntity = new UdiRlSupEntity(); udiRlSupEntity.setUpdateTime(new Date()); - udiRlSupEntity.setId(udiProductEntity.getId()); + udiRlSupEntity.setPrice(new BigDecimal(udiProductEntity.getPrice())); + udiRlSupEntity.setId(udiProductEntity.getRelSupId()); udiRlSupService.updateCompanyProductRelevance(udiRlSupEntity); } if (falg) { diff --git a/src/main/java/com/glxp/api/service/basic/UdiRlSupService.java b/src/main/java/com/glxp/api/service/basic/UdiRlSupService.java index 60ad8209..f4f993f9 100644 --- a/src/main/java/com/glxp/api/service/basic/UdiRlSupService.java +++ b/src/main/java/com/glxp/api/service/basic/UdiRlSupService.java @@ -30,6 +30,8 @@ public interface UdiRlSupService { int updateCompanyProductRelevance(UdiRlSupEntity companyCertEntity); + int updateCompanyProductRelevanceByUdiFk(UdiRlSupEntity companyCertEntity); + boolean insertCompanyProductRelevance(UdiRlSupEntity companyCertEntity); boolean deleteById(String id); diff --git a/src/main/java/com/glxp/api/service/basic/impl/UdiRlSupServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/UdiRlSupServiceImpl.java index 3a094437..b7b3128a 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/UdiRlSupServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/UdiRlSupServiceImpl.java @@ -1,5 +1,6 @@ package com.glxp.api.service.basic.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.glxp.api.dao.basic.UdiRlSupDao; import com.glxp.api.entity.basic.UdiRlSupEntity; @@ -103,6 +104,13 @@ public class UdiRlSupServiceImpl implements UdiRlSupService { return udiRlSupDao.updateById(udiRlSupEntity); } + @Override + public int updateCompanyProductRelevanceByUdiFk(UdiRlSupEntity companyCertEntity) { + QueryWrapper ew=new QueryWrapper<>(); + ew.eq("udiRlIdFk",companyCertEntity.getUdiRlIdFk()); + return udiRlSupDao.update(companyCertEntity,ew); + } + @Override public boolean insertCompanyProductRelevance(UdiRlSupEntity udiRlSupEntity) { return udiRlSupDao.insertCompanyProductRelevance(udiRlSupEntity);