Java Code Examples for com.mysql.jdbc.StringUtils#isNullOrEmpty()

The following examples show how to use com.mysql.jdbc.StringUtils#isNullOrEmpty() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WarningServiceImpl.java    From fastdfs-zyc with GNU General Public License v2.0 6 votes vote down vote up
@Override
@Transactional(propagation = Propagation.REQUIRED)
public List<WarningData> findWarning(WarningData wd,PageInfo pageInfo) throws IOException, MyException {
    //To change body of implemented methods use File | Settings | File Templates.
    List<WarningData> warningDatas = new ArrayList<WarningData>();
    Session session = getSession();
    StringBuilder queryString = new StringBuilder("from WarningData as wd ");
    if(!StringUtils.isNullOrEmpty(wd.getWdIpAddr())){
        queryString.append("where wd.wdIpAddr like '%"+wd.getWdIpAddr()+"%'");
    }
    Query query = session.createQuery(queryString.toString());
    pageInfo.setTotalCount(query.list().size());
    query.setMaxResults(pageInfo.getNumPerPage());
    query.setFirstResult((pageInfo.getPageNum()-1)*pageInfo.getNumPerPage());
    warningDatas = query.list();
    return warningDatas;
}
 
Example 2
Source File: MvcConfigurationPublic.java    From oncokb with GNU Affero General Public License v3.0 6 votes vote down vote up
@Bean
public Docket publicApi() {
    String swaggerDescription = PropertiesUtils.getProperties(SWAGGER_DESCRIPTION);
    String finalDescription = StringUtils.isNullOrEmpty(swaggerDescription) ? SWAGGER_DEFAULT_DESCRIPTION : swaggerDescription;
    return new Docket(DocumentationType.SWAGGER_2)
        .groupName("Public APIs")
        .select()
        .apis(RequestHandlerSelectors.withMethodAnnotation(PublicApi.class))
        .build()
        .apiInfo(new ApiInfo(
            "OncoKB APIs",
            finalDescription,
            PUBLIC_API_VERSION,
            "https://www.oncokb.org/terms",
            new Contact("OncoKB", "https://www.oncokb.org", "[email protected]"),
            "Terms of Use",
            "https://www.oncokb.org/terms"
        ))
        .useDefaultResponseMessages(false);
}
 
Example 3
Source File: EvidenceController.java    From oncokb with GNU Affero General Public License v3.0 6 votes vote down vote up
private Boolean isEmptyEvidence(Evidence queryEvidence) {
    EvidenceType evidenceType = queryEvidence.getEvidenceType();
    String knownEffect = queryEvidence.getKnownEffect();
    String description = queryEvidence.getDescription();
    LevelOfEvidence level = queryEvidence.getLevelOfEvidence();
    Set<Treatment> treatments = queryEvidence.getTreatments();
    if (description != null) {
        description = description.trim();
    }
    Boolean isEmpty = false;
    if (evidenceType.equals(EvidenceType.ONCOGENIC) || evidenceType.equals(EvidenceType.MUTATION_EFFECT)) {
        if (StringUtils.isNullOrEmpty(knownEffect) && StringUtils.isNullOrEmpty(description)) isEmpty = true;
    } else if (EvidenceTypeUtils.getTreatmentEvidenceTypes().contains(evidenceType)) {
        if (treatments == null && StringUtils.isNullOrEmpty(description)) isEmpty = true;
    } else if (evidenceType.equals(EvidenceType.DIAGNOSTIC_IMPLICATION) || evidenceType.equals(EvidenceType.PROGNOSTIC_IMPLICATION)) {
        if (level == null && StringUtils.isNullOrEmpty(description)) isEmpty = true;
    } else if (StringUtils.isNullOrEmpty(description)) {
        isEmpty = true;
    }
    return isEmpty;
}
 
Example 4
Source File: WarningServiceImpl.java    From fastdfs-zyc with GNU General Public License v2.0 6 votes vote down vote up
@Override
@Transactional(propagation = Propagation.REQUIRED)
public List<WarningUser> findWarUser(WarningUser wu,PageInfo pageInfo) throws IOException, MyException {
    //To change body of implemented methods use File | Settings | File Templates.
    List<WarningUser> warningUsers = new ArrayList<WarningUser>();
    Session session = getSession();
    StringBuilder queryString = new StringBuilder("from WarningUser as w ");
    if(!StringUtils.isNullOrEmpty(wu.getName())){
        queryString.append("where w.name like '%"+wu.getName()+"%'");
    }
    Query query = session.createQuery(queryString.toString());
    pageInfo.setTotalCount(query.list().size());
    query.setMaxResults(pageInfo.getNumPerPage());
    query.setFirstResult((pageInfo.getPageNum()-1)*pageInfo.getNumPerPage());
    warningUsers = query.list();
    return warningUsers;
}
 
Example 5
Source File: TestModuleAction.java    From fastdfs-zyc with GNU General Public License v2.0 6 votes vote down vote up
@RequestMapping("/testDownLoad")
public ModelAndView testDownLoad(String pageNum, String pageSize,String keyForSearch) {
    ModelAndView mv = new ModelAndView("testModule/downLoadTest.jsp");
    List<Fdfs_file> list = testModuleService.getAllFileListByPage(pageNum, pageSize,keyForSearch);
    int countDownLoadFile = testModuleService.getCountDownLoadFile(keyForSearch);
    mv.addObject("testFileCount", countDownLoadFile);
    if(!StringUtils.isNullOrEmpty(keyForSearch)){
        mv.addObject("pageNum", "1");
    }else{
        mv.addObject("pageNum", pageNum);
    }
    mv.addObject("pageSize", pageSize);
    mv.addObject("testFileList", list);
    mv.addObject("keySearch",keyForSearch);
    return mv;
}
 
Example 6
Source File: Utils.java    From SugarOnRest with MIT License 5 votes vote down vote up
/**
 * Make get property name prettier.
 *
 * @param name Value to convert.
 * @return Name in Pascal case
 * @throws Exception
 */
public static String toPascalCase(String name) throws Exception {
    if (StringUtils.isNullOrEmpty(name)) {
        return name;
    }

    String pascalCase = "";
    char newChar;
    boolean toUpper = false;
    char[] charArray = name.toCharArray();
    for (int ctr = 0; ctr <= charArray.length - 1; ctr++)
    {
        if (ctr == 0)
        {
            newChar = Character.toUpperCase(charArray[ctr]);
            pascalCase = Character.toString(newChar);
            continue;
        }

        if (charArray[ctr] == '_')
        {
            toUpper = true;
            continue;
        }

        if (toUpper)
        {
            newChar = Character.toUpperCase(charArray[ctr]);
            pascalCase += Character.toString(newChar);
            toUpper = false;
            continue;
        }

        pascalCase += Character.toString(charArray[ctr]);
    }

    return pascalCase;
}
 
Example 7
Source File: validation.java    From oncokb with GNU Affero General Public License v3.0 5 votes vote down vote up
private static String getIssue(Set<Evidence> evidences) {
    String issue = null;
    if (evidences.size() == 0) {
        issue = "No record";
    }
    if (evidences.size() > 2) {
        issue = "Multiple items detected";
    }
    for (Evidence evidence : evidences) {
        if (StringUtils.isNullOrEmpty(evidence.getDescription())) {
            issue = "No info";
        }
    }
    return issue;
}
 
Example 8
Source File: ScaffoldProfiler.java    From SPADE with GNU General Public License v3.0 5 votes vote down vote up
public static void populateScaffold()
{
    String query = "SELECT hash, childVertexHash, parentVertexHash FROM edge;";
    try
    {
        ResultSet result = sqlStorage.executeQuery(query);
        AbstractEdge incomingEdge;

        while (result.next())
        {
            String edgeHash = result.getString(1);
            String childVertexHash = result.getString(2);
            String parentVertexHash = result.getString(3);
            AbstractVertex childVertex = new Vertex();
            childVertex.addAnnotation("hash", childVertexHash);
            AbstractVertex parentVertex = new Vertex();
            parentVertex.addAnnotation("hash", parentVertexHash);
            incomingEdge = new Edge(childVertex, parentVertex);
            incomingEdge.addAnnotation("hash", edgeHash);
            System.out.println(incomingEdge);
            System.exit(0);
            if(!(StringUtils.isNullOrEmpty(childVertexHash) || StringUtils.isNullOrEmpty(parentVertexHash)))
            {
                scaffold.insertEntry(incomingEdge);
            }
        }
    }
    catch (SQLException ex)
    {
        System.out.println("Edge set querying unsuccessful!");
    }

}
 
Example 9
Source File: TestModuleServiceImpl.java    From fastdfs-zyc with GNU General Public License v2.0 5 votes vote down vote up
@Override
@Transactional(propagation = Propagation.REQUIRED)
public List<Fdfs_file> getAllFileListByPage(String pageNum, String pageSize,String keyForSearch) {
    Session session = getSession();
    StringBuilder sb=new StringBuilder(" from Fdfs_file f");
    if(!StringUtils.isNullOrEmpty(keyForSearch)){
       sb.append("  where f.file_id='"+keyForSearch+"'");
        pageNum="1";
    }
    Query query = session.createQuery(sb.toString());
    query.setMaxResults(Integer.parseInt(pageSize));
    query.setFirstResult((Integer.parseInt(pageNum)-1)*Integer.parseInt(pageSize));
    return query.list();
}
 
Example 10
Source File: QueryUtils.java    From oncokb with GNU Affero General Public License v3.0 5 votes vote down vote up
public static String getAlterationName(Query query) {
    String name = "";
    if (query != null) {
        if (StringUtils.isNullOrEmpty(query.getAlteration()) || query.getAlteration().trim().matches("(?i)^fusion$")) {
            AlterationType alterationType = AlterationType.getByName(query.getAlterationType());
            if (alterationType != null) {
                if (alterationType.equals(AlterationType.FUSION) ||
                    (alterationType.equals(AlterationType.STRUCTURAL_VARIANT) &&
                        !StringUtils.isNullOrEmpty(query.getConsequence()) &&
                        query.getConsequence().equalsIgnoreCase("fusion"))) {
                    if (query.getEntrezGeneId() != null) {
                        // For structural variant, if the entrezGeneId is specified which means this is probably a intragenic event. In this case, the hugoSymbol should be ignore.
                        Gene entrezGeneIdGene = GeneUtils.getGeneByEntrezId(query.getEntrezGeneId());
                        name = entrezGeneIdGene.getHugoSymbol();
                    } else {
                        LinkedHashSet<String> genes = new LinkedHashSet<>(Arrays.asList(query.getHugoSymbol().split("-")));
                        if (genes.size() > 1) {
                            name = org.apache.commons.lang3.StringUtils.join(genes, "-") + " Fusion";
                        } else if (genes.size() == 1) {
                            name = "Fusions";
                        }
                    }
                }
            }
        }
    }

    if (StringUtils.isNullOrEmpty(name)) {
        name = query.getAlteration().trim();
    }
    return name;
}
 
Example 11
Source File: Utils.java    From SugarOnRest with MIT License 5 votes vote down vote up
/**
 * Is column nullable?
 *
 * @param value The value from sql query.
 * @return True or false.
 */
public static boolean getIsNullable(String value) {

    if (StringUtils.isNullOrEmpty(value)) {
        return false;
    }

    if (value.equalsIgnoreCase("YES")) {
        return true;
    }

    return false;
}
 
Example 12
Source File: Utils.java    From SugarOnRest with MIT License 5 votes vote down vote up
/**
 * Is column a primary key?
 *
 * @param value The value from sql query.
 * @return True or false.
 */
public static boolean getIsVPrimaryKey(String value) {

    if (StringUtils.isNullOrEmpty(value)) {
        return false;
    }

    if (value.equalsIgnoreCase("PRI")) {
        return true;
    }

    return false;
}
 
Example 13
Source File: WarningAction.java    From fastdfs-zyc with GNU General Public License v2.0 5 votes vote down vote up
@ResponseBody
@RequestMapping("/saveWarUser")
public Message saveWarUser(String wuid, String wuname, String wuphone, String wuemail) throws IOException, MyException {
    Message message = null;
    String result = "操作成功";
    WarningUser wu = new WarningUser();
    if (wuphone.length() > 11) {
         result="操作失败";
        message = new Message();
        message.setStatusCode("304");
        message.setMessage("电话号较长");
    } else {
        if (!StringUtils.isNullOrEmpty(wuid)) {
            wu.setId(wuid);
        } else {

        }
        wu.setName(wuname);
        wu.setPhone(wuphone);
        wu.setEmail(wuemail);
        warningService.updateWarUser(wu);
        //  Message message =new Message("200",result,"warUserList","warUserList","closeCurrent","");
        message = new Message();
        message.setStatusCode("200");
        message.setMessage("操作成功");
    }
    return message;
}
 
Example 14
Source File: Main.java    From SugarOnRest with MIT License 5 votes vote down vote up
private static String ensureBaseFolderExist(String[] args) throws Exception {
    String baseFolder = "";

    if (args.length > 0 ){
        baseFolder = args[0];
    }

    if (StringUtils.isNullOrEmpty(baseFolder)) {
        baseFolder =  System.getProperty("user.dir");
    }

    return ensureFolderExist(baseFolder, "");
}
 
Example 15
Source File: Building.java    From aion-germany with GNU General Public License v3.0 5 votes vote down vote up
public String getSize() {
	if (StringUtils.isNullOrEmpty(size)) {
		return DataManager.HOUSE_BUILDING_DATA.getBuilding(id).getSize();
	}
	return size;
}
 
Example 16
Source File: WarningAction.java    From fastdfs-zyc with GNU General Public License v2.0 5 votes vote down vote up
@RequestMapping("/warUserAdd")
public ModelAndView warUserAdd(String id) throws IOException, MyException {
    ModelAndView mv = new ModelAndView("warning/warUserAdd.jsp");
    if (!StringUtils.isNullOrEmpty(id)) {
        WarningUser wu = warningService.findUserId(id);
        mv.addObject("id", wu.getId());
        mv.addObject("name", wu.getName());
        mv.addObject("phone", wu.getPhone());
        mv.addObject("email", wu.getEmail());
    }
    return mv;
}
 
Example 17
Source File: NCITDrugUtils.java    From oncokb with GNU Affero General Public License v3.0 4 votes vote down vote up
private static void cacheDrugs() {
    System.out.println("getting accepted semantic types...");

    allNcitDrugs = new HashSet<>();

    List<String> lines = new ArrayList<>();
    try {
        lines.addAll(FileUtils.readTrimedLinesStream(
            NCITDrugUtils.class.getResourceAsStream("/data/Antineoplastic_Agent.txt")));
        lines.addAll(FileUtils.readTrimedLinesStream(
            NCITDrugUtils.class.getResourceAsStream("/data/Antineoplastic_Agent_Addition.txt")));
    } catch (IOException e) {
        e.printStackTrace();
    }
    int nLines = lines.size();

    // code <tab> concept name <tab> parents <tab> synonyms <tab> definition <tab> display name <tab> concept status <tab> semantic type <EOL>

    for (int i = 0; i < nLines; i++) {
        if ((i + 1) % 1000 == 0) {
            System.out.println("Cached " + (i + 1));
        }
        String line = lines.get(i);
        if (line.startsWith("#")) continue;

        String[] parts = line.split("\t");

        String code = parts[0] == null ? null : parts[0].trim();
        String preferredName = parts[1] == null ? null : parts[1].trim();
        String synonyms = parts.length >= 3 ? (parts[2] == null ? null : parts[2].trim()) : null;
        List<String> synonymsList = new ArrayList<>();

        if (StringUtils.isNullOrEmpty(code)) {
            System.out.println("code is empty: " + line);
            continue;
        } else if (!code.startsWith("C")) {
            continue;
        }

        if (StringUtils.isNullOrEmpty(preferredName)) {
            System.out.println("Preferred name is empty: " + line);
            continue;
        }

        if (synonyms == null) {
            System.out.println("Synonyms is empty: " + line);
            continue;
        } else {
            // Arrays.asList returning a fixed-size list, you cannot remove item from the list, need to reinitialize a new array list
            synonymsList = new ArrayList<>(Arrays.asList((synonyms.split("\\|"))));
        }

        NCITDrug drug = new NCITDrug();
        drug.setNcitCode(code);
        drug.setDrugName(preferredName);
        if (!synonymsList.isEmpty()) {
            synonymsList.remove(preferredName);
            drug.setSynonyms(new HashSet<>(synonymsList));

        }
        allNcitDrugs.add(drug);
    }
    System.out.println("Cached all all NCIT Drugs.");
}
 
Example 18
Source File: ValidationUtils.java    From oncokb with GNU Affero General Public License v3.0 4 votes vote down vote up
public static JSONArray checkAlterationNameFormat() {
    final String ALTERATION_NAME_IS_EMPTY = "The alteration does not have a name";
    final String UNSUPPORTED_ALTERATION_NAME = "The alteration name is not supported";
    final String INDEL_IS_NOT_SUPPORTED = "Indel is not supported";
    final String EXON_RANGE_NEEDED = "Exon does not have a range defined";
    final String FUSION_NAME_IS_INCORRECT = "Fusion name is incorrect";
    final String VARIANT_CONSEQUENCE_IS_NOT_AVAILABLE = "The alteration does not have variant consequence";
    final String VARIANT_CONSEQUENCE_ANY_IS_INAPPROPRIATE = "The consequence any is assigned to incorrect alteration";

    JSONArray data = new JSONArray();

    Pattern unsupportedAlterationNameRegex = Pattern.compile("[^\\w\\s\\*-]");
    for (Alteration alteration : AlterationUtils.getAllAlterations()) {
        if (StringUtils.isNullOrEmpty(alteration.getAlteration())) {
            data.put(getErrorMessage(getTarget(alteration.getGene().getHugoSymbol()), ALTERATION_NAME_IS_EMPTY));
        } else {
            Matcher matcher = unsupportedAlterationNameRegex.matcher(alteration.getAlteration());
            if (matcher.find() && !specialAlterationNames().contains(alteration.getName())) {
                data.put(getErrorMessage(getTarget(alteration.getGene().getHugoSymbol(), getAlterationName(alteration)), UNSUPPORTED_ALTERATION_NAME));
            } else {
                if (alteration.getAlteration().toLowerCase().contains("indel")) {
                    data.put(getErrorMessage(getTarget(alteration.getGene().getHugoSymbol(), getAlterationName(alteration)), INDEL_IS_NOT_SUPPORTED));
                }
                if (alteration.getName().toLowerCase().contains("exon") && (alteration.getProteinStart() == null || alteration.getProteinEnd() == null || alteration.getProteinStart().equals(alteration.getProteinEnd()) || alteration.getProteinStart().equals(-1))) {
                    data.put(getErrorMessage(getTarget(alteration.getGene().getHugoSymbol(), getAlterationName(alteration)), EXON_RANGE_NEEDED));
                }
                if (alteration.getAlteration().contains("-") && !alteration.getAlteration().toLowerCase().contains("fusion") && !specialAlterationNames().contains(alteration.getName())) {
                    data.put(getErrorMessage(getTarget(alteration.getGene().getHugoSymbol(), getAlterationName(alteration)), FUSION_NAME_IS_INCORRECT));
                }
                if (alteration.getConsequence() == null) {
                    data.put(getErrorMessage(getTarget(alteration.getGene().getHugoSymbol(), getAlterationName(alteration)), VARIANT_CONSEQUENCE_IS_NOT_AVAILABLE));
                } else {
                    if (alteration.getConsequence().equals(VariantConsequenceUtils.findVariantConsequenceByTerm("any")) && !alteration.getAlteration().contains("mut")) {
                        data.put(getErrorMessage(getTarget(alteration.getGene().getHugoSymbol(), getAlterationName(alteration)), VARIANT_CONSEQUENCE_ANY_IS_INAPPROPRIATE));
                    }
                }
            }
        }
    }
    return data;
}
 
Example 19
Source File: WxGoodsController.java    From dts-shop with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * 根据条件搜素商品
 * <p>
 * 1. 这里的前五个参数都是可选的,甚至都是空 2. 用户是可选登录,如果登录,则记录用户的搜索关键字
 *
 * @param categoryId
 *            分类类目ID,可选
 * @param brandId
 *            品牌商ID,可选
 * @param keyword
 *            关键字,可选
 * @param isNew
 *            是否新品,可选
 * @param isHot
 *            是否热买,可选
 * @param userId
 *            用户ID
 * @param page
 *            分页页数
 * @param size
 *            分页大小
 * @param sort
 *            排序方式,支持"add_time", "retail_price"或"name",浏览量 "browse",销售量:"sales"
 * @param order
 *            排序类型,顺序或者降序
 * @return 根据条件搜素的商品详情
 */
@GetMapping("list")
public Object list(Integer categoryId, Integer brandId, String keyword, Boolean isNew, Boolean isHot,
		@LoginUser Integer userId, @RequestParam(defaultValue = "1") Integer page,
		@RequestParam(defaultValue = "10") Integer size,
		@Sort(accepts = { "sort_order","add_time", "retail_price", "browse","name",
				"sales" }) @RequestParam(defaultValue = "sort_order") String sort,
		@Order @RequestParam(defaultValue = "asc") String order) {

	logger.info("【请求开始】根据条件搜素商品,请求参数,categoryId:{},brandId:{},keyword:{}", categoryId, brandId, keyword);

	// 添加到搜索历史
	if (userId != null && !StringUtils.isNullOrEmpty(keyword)) {
		DtsSearchHistory searchHistoryVo = new DtsSearchHistory();
		searchHistoryVo.setKeyword(keyword);
		searchHistoryVo.setUserId(userId);
		searchHistoryVo.setFrom("wx");
		searchHistoryService.save(searchHistoryVo);
	}

	// 查询列表数据
	List<DtsGoods> goodsList = goodsService.querySelective(categoryId, brandId, keyword, isHot, isNew, page, size,
			sort, order);
	
	// 查询商品所属类目列表。
	List<Integer> goodsCatIds = goodsService.getCatIds(brandId, keyword, isHot, isNew);
	List<DtsCategory> categoryList = null;
	if (goodsCatIds.size() != 0) {
		categoryList = categoryService.queryL2ByIds(goodsCatIds);
	} else {
		categoryList = new ArrayList<>(0);
	}

	Map<String, Object> data = new HashMap<>();
	data.put("goodsList", goodsList);
	long count = PageInfo.of(goodsList).getTotal();
	int totalPages = (int) Math.ceil((double) count / size);
	data.put("count", PageInfo.of(goodsList).getTotal());
	data.put("filterCategoryList", categoryList);
	data.put("totalPages", totalPages);

	logger.info("【请求结束】根据条件搜素商品,响应结果:查询的商品数量:{},总数:{},总共 {} 页", goodsList.size(),count,totalPages);
	return ResponseUtil.ok(data);
}
 
Example 20
Source File: WxGoodsController.java    From BigDataPlatform with GNU General Public License v3.0 4 votes vote down vote up
/**
 * 根据条件搜素商品
 * <p>
 * 1. 这里的前五个参数都是可选的,甚至都是空
 * 2. 用户是可选登录,如果登录,则记录用户的搜索关键字
 *
 * @param categoryId 分类类目ID,可选
 * @param brandId    品牌商ID,可选
 * @param keyword    关键字,可选
 * @param isNew      是否新品,可选
 * @param isHot      是否热买,可选
 * @param userId     用户ID
 * @param page       分页页数
 * @param limit       分页大小
 * @param sort       排序方式,支持"add_time", "retail_price"或"name"
 * @param order      排序类型,顺序或者降序
 * @return 根据条件搜素的商品详情
 */
@GetMapping("list")
public Object list(
	Integer categoryId,
	Integer brandId,
	String keyword,
	Boolean isNew,
	Boolean isHot,
	@LoginUser Integer userId,
	@RequestParam(defaultValue = "1") Integer page,
	@RequestParam(defaultValue = "10") Integer limit,
	@Sort(accepts = {"add_time", "retail_price", "name"}) @RequestParam(defaultValue = "add_time") String sort,
	@Order @RequestParam(defaultValue = "desc") String order) {

	//添加到搜索历史
	if (userId != null && !StringUtils.isNullOrEmpty(keyword)) {
		LitemallSearchHistory searchHistoryVo = new LitemallSearchHistory();
		searchHistoryVo.setKeyword(keyword);
		searchHistoryVo.setUserId(userId);
		searchHistoryVo.setFrom("wx");
		searchHistoryService.save(searchHistoryVo);
	}

	//查询列表数据
	List<LitemallGoods> goodsList = goodsService.querySelective(categoryId, brandId, keyword, isHot, isNew, page, limit, sort, order);

	// 查询商品所属类目列表。
	List<Integer> goodsCatIds = goodsService.getCatIds(brandId, keyword, isHot, isNew);
	List<LitemallCategory> categoryList = null;
	if (goodsCatIds.size() != 0) {
		categoryList = categoryService.queryL2ByIds(goodsCatIds);
	} else {
		categoryList = new ArrayList<>(0);
	}

	PageInfo<LitemallGoods> pagedList = new PageInfo(goodsList);

	Map<String, Object> entity = new HashMap<>();
	entity.put("list", goodsList);
	entity.put("total", pagedList.getTotal());
	entity.put("page", pagedList.getPageNum());
	entity.put("limit", pagedList.getPageSize());
	entity.put("pages", pagedList.getPages());
	entity.put("filterCategoryList", categoryList);

	// 因为这里需要返回额外的filterCategoryList参数,因此不能方便使用ResponseUtil.okList
	return ResponseUtil.ok(entity);
}