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} + +