Commit 5488be04 by fudahua

素材列表fix

parent 318b7dd9
......@@ -26,7 +26,7 @@ public interface TabHaobanMaterialMapper {
Page<TabHaobanMaterial> listMaterial(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("keyword")String keyword, @Param("categoryId")String categoryId, @Param("materialType")Integer materialType);
Page<TabHaobanMaterial> listMaterialByCategoryIds(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("keyword") String keyword, @Param("categoryIds") List<String> categoryIds, @Param("materialType") Integer materialType);
List<TabHaobanMaterial> listMaterialByCategoryIds(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("keyword") String keyword, @Param("categoryIds") List<String> categoryIds, @Param("materialType") Integer materialType);
TabHaobanMaterial selectByfromMaterialId(@Param("fromMaterialId") String fromMaterialId, @Param("wxEnterpriseId") String wxEnterpriseId);
......
......@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.impl;
import java.util.Date;
import java.util.List;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -66,7 +67,8 @@ public class MaterialServiceImpl implements MaterialService {
@Override
public Page<TabHaobanMaterial> listMaterial(String wxEnterpriseId, String keyword, List<String> categoryIds, Integer materialType) {
return mapper.listMaterialByCategoryIds(wxEnterpriseId, keyword, categoryIds, materialType);
List<TabHaobanMaterial> materials = mapper.listMaterialByCategoryIds(wxEnterpriseId, keyword, categoryIds, materialType);
return (Page) materials;
}
@Override
......
......@@ -282,8 +282,8 @@ public class MaterialApiServiceImpl implements MaterialApiService {
@Override
public Page<MaterialDTO> listMaterial(String wxEnterpriseId, String keyword, String categoryId,
Integer materialType,BasePageInfo pageInfo) {
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
List<String> categoryIds = this.listSubCategoryIdsByParentId(categoryId);
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
com.github.pagehelper.Page<TabHaobanMaterial> page = materialService.listMaterial(wxEnterpriseId, keyword, categoryIds, materialType);
List<TabHaobanMaterial> result = page.getResult();
List<TabMiniprogramSetting> settings = miniprogramSettingService.listMiniprogram(wxEnterpriseId);
......
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.GICMQClientUtil;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.FlushStoreMqDTO;
import com.gic.haoban.manage.api.dto.MaterialDTO;
......@@ -111,7 +113,9 @@ public class ServiceTest {
@Test
public void test() {
BasePageInfo basePageInfo = new BasePageInfo();
Page<MaterialDTO> ret = materialApiService.listMaterial("ca66a01b79474c40b3e7c7f93daf1a3b", null, "-1", 1, basePageInfo);
System.out.println(ret);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment