自用 goodsdetail
JSON.parse(data.parameter) 存的字符串
<select id="getGoodsBaseInfoById" resultType="com.zjdfwl.mall.modular.goods.model.GoodsBaseInfo"> SELECT t1.id, t1.goods_sn AS goodsSn, t1.name, t1.unit, t1.preview, t1.collection_count AS collectionCount, t1.volume, t1.is_show_volume AS isShowVolume, t1.pv, t1.is_privilege AS isPrivilege, t1.is_hot AS isHot, t1.is_new AS isNew, t1.status, t1.label, t1.intro, t1.parameter, t1.sale_percentage1 AS salePercentage1, t1.sale_percentage2 AS salePercentage2, t1.sale_money1 AS saleMoney1, t1.sale_money2 AS saleMoney2, t1.common_money AS commonMoney, t1.consumer_sale_percentage1 AS consumerSalePercentage1, t1.consumer_sale_percentage2 AS consumerSalePercentage2, t1.consumer_sale_money1 AS consumerSaleMoney1, t1.consumer_sale_money2 AS consumerSaleMoney2, if(t100.max_pay_integrate_rate is null,t1.max_pay_integrate_rate,t100.max_pay_integrate_rate) AS maxPayIntegrateRate, if(t100.receivable_integrate_rate is null,t1.receivable_integrate_rate,t100.receivable_integrate_rate) AS receivableIntegrateRate, t1.image_src AS imageSrc, t1.goods_desc AS goodsDesc, t1.service_details AS serviceDetails, t1.is_deleted AS isDeleted, t1.second_cate_json AS secondCateJson, t1.base_volume AS baseVolume, t1.shopping_methods AS shoppingMethods, t1.is_universal AS isUniversal, t1.good_label_json AS goodLabelJson, if(t100.price_rate is null,format(t1.price,2),(t1.price-ROUND(t1.price*(t100.price_rate/100),2))) as price, if(t100.max_pay_integrate_rate is null, if(t100.price_rate is null,ROUND(t1.price*(t1.max_pay_integrate_rate/100),2),ROUND((t1.price-ROUND(t1.price*(t100.price_rate/100),2))*(t1.max_pay_integrate_rate/100),2)), if(t100.price_rate is null,ROUND(t1.price*(t100.max_pay_integrate_rate/100),2),ROUND((t1.price-ROUND(t1.price*(t100.price_rate/100),2))*(t100.max_pay_integrate_rate/100),2)) ) as pateMoney FROM m_goods_base_info t1 left join ( select t99.price_rate, t99.max_pay_integrate_rate, t99.receivable_integrate_rate, t99.goods_id from m_price_singleset_info t99 where t99.is_deleted=0 and t99.is_enable=1 and t99.area=#{area} and t99.id=(select max(id) from m_price_singleset_info where goods_id=t99.goods_id) ) t100 on t1.id=t100.goods_id WHERE t1.is_deleted = 0 AND t1.is_enable = 1 AND t1. STATUS = 1 and id=#{goodId} </select>