From 6f638335bfafda4ec7da71839cabc7e3297f88aa Mon Sep 17 00:00:00 2001 From: x_z Date: Fri, 1 Jul 2022 15:18:57 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E4=BA=A7=E5=93=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=BC=96=E8=BE=91=E5=A4=8D=E9=80=89=E6=A1=86=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=97=A0=E6=B3=95=E5=9B=9E=E6=98=BE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/glxp/api/admin/dao/basic/UdiInfoDao.java | 7 +++++++ .../api/admin/entity/basic/UdiRelevanceEntity.java | 5 +++++ .../service/basic/impl/UdiRelevanceServiceImpl.java | 11 +++++++++-- .../resources/mybatis/mapper/basic/UdiInfoDao.xml | 10 ++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/basic/UdiInfoDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/basic/UdiInfoDao.java index e8b37319..f3097257 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/basic/UdiInfoDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/basic/UdiInfoDao.java @@ -51,4 +51,11 @@ public interface UdiInfoDao { void importUdiInfo(@Param("udiInfoEntities") List udiInfoEntities); + /** + * 根据UUID更新产品信息 + * + * @param udiInfoEntity + */ + void updateUdiInfoByUuid(UdiInfoEntity udiInfoEntity); + } diff --git a/api-admin/src/main/java/com/glxp/api/admin/entity/basic/UdiRelevanceEntity.java b/api-admin/src/main/java/com/glxp/api/admin/entity/basic/UdiRelevanceEntity.java index 000f9ea8..8eba1df8 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/entity/basic/UdiRelevanceEntity.java +++ b/api-admin/src/main/java/com/glxp/api/admin/entity/basic/UdiRelevanceEntity.java @@ -35,6 +35,11 @@ public class UdiRelevanceEntity { private String price; private String modifyTime;//修改时间 + private Boolean isCheck; + private boolean allowNoBatch; + private boolean allowNoExpire; + private boolean allowNoProduct; + public Integer getLockStatus() { if (lockStatus == null) return 1; diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/UdiRelevanceServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/UdiRelevanceServiceImpl.java index e0e7f81a..a25585bd 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/UdiRelevanceServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/UdiRelevanceServiceImpl.java @@ -2,6 +2,7 @@ package com.glxp.api.admin.service.basic.impl; import com.github.pagehelper.PageHelper; import com.glxp.api.admin.constant.ConstantStatus; +import com.glxp.api.admin.dao.basic.UdiInfoDao; import com.glxp.api.admin.dao.basic.UdiRelevanceDao; import com.glxp.api.admin.entity.basic.BasicThirdSysEntity; import com.glxp.api.admin.entity.basic.UdiInfoEntity; @@ -9,7 +10,6 @@ import com.glxp.api.admin.entity.basic.UdiRelevanceEntity; import com.glxp.api.admin.req.basic.FilterUdiInfoRequest; import com.glxp.api.admin.res.basic.UdiRelevanceResponse; import com.glxp.api.admin.service.basic.BasicThirdSysService; -import com.glxp.api.admin.service.basic.UdiInfoService; import com.glxp.api.admin.service.basic.UdiRelevanceService; import org.springframework.stereotype.Service; @@ -24,7 +24,7 @@ public class UdiRelevanceServiceImpl implements UdiRelevanceService { @Resource BasicThirdSysService basicThirdSysService; @Resource - UdiInfoService udiInfoService; + private UdiInfoDao udiInfoDao; @Override public List filterUdiRelevance(FilterUdiInfoRequest filterUdiInfoRequest) { @@ -272,6 +272,13 @@ public class UdiRelevanceServiceImpl implements UdiRelevanceService { udiRelevanceEntity.setMainId(udiRelevanceEntity.getThirdId4()); udiRelevanceEntity.setMainName(udiRelevanceEntity.getThirdName4()); } + + UdiInfoEntity udiInfoEntity = new UdiInfoEntity(); + udiInfoEntity.setAllowNoBatch(udiRelevanceEntity.isAllowNoBatch()); + udiInfoEntity.setAllowNoExpire(udiRelevanceEntity.isAllowNoExpire()); + udiInfoEntity.setAllowNoProduct(udiRelevanceEntity.isAllowNoProduct()); + udiInfoEntity.setUuid(udiRelevanceEntity.getUuid()); + udiInfoDao.updateUdiInfoByUuid(udiInfoEntity); return udiRelevanceDao.updateUdiRelevance(udiRelevanceEntity); } diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/UdiInfoDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/UdiInfoDao.xml index 0e2f3d3c..2399e017 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/UdiInfoDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/UdiInfoDao.xml @@ -268,6 +268,16 @@ WHERE nameCode = #{nameCode} + + update basic_products + + allowNoBatch=#{allowNoBatch}, + allowNoExpire=#{allowNoExpire}, + allowNoProduct=#{allowNoProduct}, + + where uuid = #{uuid} + +