From fd95223d9703b9c038ed3c782474c885052dda08 Mon Sep 17 00:00:00 2001 From: futian.liu <liufutianyoo@163.com> Date: 星期五, 22 十二月 2023 17:05:25 +0800 Subject: [PATCH] 代码整理 --- consum-base/src/main/java/com/consum/base/service/impl/BaseGoodsTemplateServiceImpl.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/consum-base/src/main/java/com/consum/base/service/impl/BaseGoodsTemplateServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/impl/BaseGoodsTemplateServiceImpl.java index 2f11f09..aa72f33 100644 --- a/consum-base/src/main/java/com/consum/base/service/impl/BaseGoodsTemplateServiceImpl.java +++ b/consum-base/src/main/java/com/consum/base/service/impl/BaseGoodsTemplateServiceImpl.java @@ -27,6 +27,7 @@ import com.walker.infrastructure.utils.DateUtils; import com.walker.infrastructure.utils.StringUtils; import com.walker.jdbc.service.BaseServiceImpl; +import java.util.Collections; import cn.hutool.core.convert.Convert; @@ -58,8 +59,8 @@ // 鍒嗙被id if (categoryId != null) { - sql.append(" and category_id =:category_id "); - paramts.put("category_id", categoryId); + sql.append(" and category_id =:categoryId "); + paramts.put("categoryId", categoryId); } sql.append(" and states =1 "); @@ -256,7 +257,7 @@ * @return */ - private static String QUERY_GOODSINFO_BY_MODELID = + private static final String QUERY_GOODSINFO_BY_MODELID = "SELECT model.MODEL_NAME modelName,model.UNIT,temp.id goodsId, temp.GOODS_CODE goodsCode,temp.GOODS_NAME goodsName,temp.CLASSIFICATION classification,temp.CATEGORY_ID categoryId FROM BASE_GOODS_MODELS model LEFT JOIN BASE_GOODS_TEMPLATE temp ON model.GOODS_TEMPLATES_ID=temp.id WHERE 1=1 "; @Override @@ -269,7 +270,7 @@ } List<Map<String, Object>> tempGoodsInfo = this.select(sqlStr.toString(), params); if (CollectionUtils.isEmpty(tempGoodsInfo)) { - return null; + return Collections.emptyMap(); } return tempGoodsInfo.get(0); } -- Gitblit v1.9.1