2
0

2 Ревизии 1d6e2dfdc5 ... 38462a6722

Автор SHA1 Съобщение Дата
  zyf12 38462a6722 Merge remote-tracking branch 'origin/yellow' into yellow преди 2 години
  zyf12 bf78d1fdc9 显示藏品数量分页 преди 2 години

+ 6 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PostCollectionsSystemController.java

@@ -1,12 +1,16 @@
 package com.ruoyi.web.controller.system;
 
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
+import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.vo.CollectionsVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -42,7 +46,7 @@ public class PostCollectionsSystemController extends BaseController
     public TableDataInfo list(PostCollectionsSystem postCollectionsSystem)
     {
         startPage();
-        List<PostCollectionsSystem> list = postCollectionsSystemService.selectPostCollectionsSystemList(postCollectionsSystem);
+        List<CollectionsVo> list = postCollectionsSystemService.selectPostCollectionsSystemListPage(postCollectionsSystem);
         return getDataTable(list);
     }
 
@@ -53,7 +57,7 @@ public class PostCollectionsSystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:system:export')")
     @Log(title = "藏品套系", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, PostCollectionsSystem postCollectionsSystem)
+    public void export(HttpServletResponse response, PostCollectionsSystem postCollectionsSystem,int type)
     {
         List<PostCollectionsSystem> list = postCollectionsSystemService.selectPostCollectionsSystemList(postCollectionsSystem);
         ExcelUtil<PostCollectionsSystem> util = new ExcelUtil<PostCollectionsSystem>(PostCollectionsSystem.class);

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CollectionsVo.java

@@ -2,6 +2,8 @@ package com.ruoyi.system.domain.vo;
 
 import com.ruoyi.system.domain.PostCollectionsSystem;
 
+import java.util.List;
+
 /**
  *  藏品数量
  */

+ 0 - 2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PostCollectionsSystemMapper.java

@@ -67,6 +67,4 @@ public interface PostCollectionsSystemMapper
                                                             @Param("timeRight") Date timeRight);
 
     Integer getCopiesById(Long id);
-    // 查询该套系名 数量
-    int selectPostCollectionsSystemByName(PostCollectionsSystem postCollectionsSystem);
 }

+ 2 - 8
ruoyi-system/src/main/java/com/ruoyi/system/service/IPostCollectionsSystemService.java

@@ -66,14 +66,8 @@ public interface IPostCollectionsSystemService
 
     /**
      *  获取藏品数量
-     * @param id
+     * @param postCollections
      * @return 该套系下藏品数量
      */
-    public Integer getCopies(Long id);
-
-    /**
-     *  用套系名称进行查询
-     * @param postCollectionsSystem
-     */
-    int selectPostCollectionsSystemByName(PostCollectionsSystem postCollectionsSystem);
+    public int getCopies(Long id);
 }

+ 1 - 7
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PostCollectionsSystemServiceImpl.java

@@ -163,13 +163,7 @@ public class PostCollectionsSystemServiceImpl implements IPostCollectionsSystemS
      * @return
      */
     @Override
-    public Integer getCopies(Long id) {
+    public int getCopies(Long id) {
         return postCollectionsSystemMapper.getCopiesById(id);
     }
-
-
-    @Override
-    public int selectPostCollectionsSystemByName(PostCollectionsSystem postCollectionsSystem) {
-        return postCollectionsSystemMapper.selectPostCollectionsSystemByName(postCollectionsSystem);
-    }
 }

+ 0 - 5
ruoyi-system/src/main/resources/mapper/system/PostCollectionsSystemMapper.xml

@@ -117,12 +117,7 @@
         </where>
     </select>
 
-    <!--获取藏品数量-->
     <select id="getCopiesById" parameterType="Long" resultType="Integer">
        SELECT SUM(collections_number) FROM post_collections where system_id = #{id}
     </select>
-    <!--用藏品名称进行查询数量-->
-    <select id="selectPostCollectionsSystemByName" parameterType="PostCollectionsSystem" resultType="int">
-        SELECT COUNT(name) FROM post_collections_system where name =  #{name} and del_flag = '0'
-    </select>
 </mapper>