标签:catalog java 商品 throw cto property 参数 信息 proc
<!-- 查询商品仓库信息 --> <select id="loadGoodsStock" resultType="HashMap" parameterType="list"> select g.goods_id, g.stock_id, s.STOCK_NO, s.STOCK_NAME, g.goods_seller from goods g , stock s where g.STOCK_ID = s.STOCK_ID and g.goods_id in <foreach collection="list" item="listItem" index="index" open="(" separator="," close=")"> #{listItem} </foreach> </select>
public List<Map<String, Object>> loadGoodsStock(List<Long> goodsIds);
public ServiceMessage<List<Map<String, Object>>> queryGoodsStockInfo(List<Long> goodsIds) { try { if (goodsIds == null || goodsIds.size() < 1) { return super.returnParamsError("查询仓库信息参数为空goodsIds"); } List<Map<String, Object>> goodsList = goodsMapper.loadGoodsStock(goodsIds); return super.returnCorrectResult(goodsList); } catch (Throwable e) { return super.returnException(e); } }
<resultMap id="simpleProductExtLucene" type="HashMap"> <result column="goods_no" property="goodsNo" /> <result column="pro_catalog_id" property="proCatalogId" /> <result column="pro_catalog_name" property="proCatalogName" /> <result column="PROMOTE_PHRASE" property="promotePhrase" javaType="String" /> <result column="EC_PRICE" property="ecPrice" javaType="String" /> <result column="MARKET_PRICE" property="marketPrice" javaType="decimal" /> <result column="PRO_IMAGE_URL" property="proImageUrl" javaType="String" /> <result column="TAG_ICON_URL" property="tagIconUrl" javaType="String" /> <result column="DRUG_PRESCRIPTION_TYPE" property="drugPrescriptionType" javaType="String" /> <result column="PRODUCT_LEAST_ORDER" property="productLeastOrder" javaType="decimal" /> <result column="ORDER_LIMIT_AMOUNT" property="orderLimitAmount" javaType="decimal" /> <result column="AVAILABLE_STOCK" property="availableStock" javaType="decimal" /> <result column="PRODUCT_ID" property="productId" /> <result column="GOODS_ID" property="goodsId" /> <result column="GOODS_NAME" property="goodsName" /> <result column="SALE_AMOUNT" property="saleAmount" /> <result column="CLICK_AMOUNT" property="clickAmount" /> <result column="GOODS_NAME" property="productName" /> <result column="PRODUCT_CHN_NO" property="productChnNo" /> <result column="MOBILE_SPECIAL" property="mobileSpecial" /> <result column="DRUG_TREATMENT" property="drugTreatment" javaType="String" /> <result column="product_keyword" property="productKeyword" /> <result column="product_brand_name" property="productBrandName" /> <result column="product_order" property="productOrder" /> <result column="FULL_INDEX" property="fullIndex"/> </resultMap>
mybatis 之resultType="HashMap" parameterType="list"
标签:catalog java 商品 throw cto property 参数 信息 proc
原文地址:http://www.cnblogs.com/wangchuanfu/p/7281239.html