<select id="getAllGoodsForSouJiaYi" resultType="Map" parameterType="String"> select t.goods_no, t.goods_name, t.market_price, t.ec_price, t.package_standard, p.drug_prescription_type, p.product_id, t.goods_id, p.drug_treatment, p.DRUG_APPROVE_NO, t.edit_time, t.end_time, p.detail_info, pi.image_url1, pi.image_url2, cat.catalog_ids, cat.catalog_names from GOODS t, (select distinct(tt.product_id) product_id,wmsys.wm_concat(tt.pid) catalog_ids,wmsys.wm_concat(pc1.pro_catalog_name) catalog_names from (select pcd.product_id,min(pcd.pro_catalog_id) as pid,pc.pro_catalog_level from PRODUCT_CATALOG_DEF pcd ,product_catalog pc where pc.pro_catalog_id=pcd.pro_catalog_id and pc.pro_catalog_level>0 group by pcd.product_id,pro_catalog_level) tt,product_catalog pc1 where tt.pid=pc1.pro_catalog_id group by tt.product_id) cat, product p left join (select pig.product_id as product_id,max(pig.pro_image_url) as image_url2,min(pig.pro_image_url) as image_url1 from product_img pig where pig.image_type='big' group by pig.product_id) pi on pi.product_id = p.product_id where t.product_id = p.product_id and cat.product_id = p.product_id and t.is_delete = 'N' and p.is_onsale = 'Y' and p.drug_prescription_type != 'TC' <if test="goodsNo !=null"> and t.GOODS_NO=#{goodsNo} </if> </select>
public Map getAllGoodsForSouJiaYi(String string1);
public Map getAllGoodsForSouJiaYi(String string1) { return iGoodsMapper.getAllGoodsForSouJiaYi(string1); }