Browse Source

套系上下架1.2

sjx 2 years ago
parent
commit
9f2dccd377

+ 6 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PostCollectionsSystemServiceImpl.java

@@ -10,6 +10,8 @@ import java.util.stream.Collectors;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.system.domain.vo.CollectionsVo;
+import com.ruoyi.system.mapper.PostCollectionsMapper;
+import com.ruoyi.system.service.IPostCollectionsService;
 import org.apache.commons.lang3.builder.ToStringExclude;
 import org.apache.ibatis.type.LocalDateTimeTypeHandler;
 import org.springframework.beans.BeanUtils;
@@ -34,6 +36,8 @@ public class PostCollectionsSystemServiceImpl implements IPostCollectionsSystemS
 
     @Autowired
     private PostCollectionsSystemMapper postCollectionsSystemMapper;
+    @Autowired
+    private IPostCollectionsService postCollectionsService;
 
     /**
      * 查询藏品套系
@@ -241,6 +245,8 @@ public class PostCollectionsSystemServiceImpl implements IPostCollectionsSystemS
     @Override
     public int updateBatchById(List<PostCollectionsSystem> postCollectionsSystemList) {
         for (int i = 0; i < postCollectionsSystemList.size(); i++) {
+            //更改藏品的状态
+            postCollectionsService.selectPostCollectionsList(postCollectionsSystemList.get(i).getId());
             postCollectionsSystemList.get(i). setUpdateBy(getUsername());
             postCollectionsSystemList.get(i).setUpdateTime(DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,DateUtils.getTime()));
         }