java-mall/mall-search/target/classes/dao/EsProduct.xml
2024-10-26 10:01:40 +08:00

69 lines
2.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.suisung.mall.search.dao.EsProductDao">
<resultMap id="shop_product_index" type="com.suisung.mall.search.domain.EsProduct">
<result property="productId" column="product_id"/>
<result property="productName" column="product_name"/>
</resultMap>
<select id="getAllEsProductList" resultMap="shop_product_index">
SELECT
shop_product_index.product_id,
shop_product_index.product_name,
shop_product_index.product_name_index,
shop_product_index.store_id,
shop_product_index.store_is_open,
shop_product_index.store_type,
shop_product_index.store_category_ids,
shop_product_index.category_id,
shop_product_index.category_ids,
shop_product_index.type_id,
shop_product_index.product_quantity,
shop_product_index.product_warn_quantity,
shop_product_index.brand_id,
shop_product_index.product_service_type_ids,
shop_product_index.product_state_id,
shop_product_index.product_verify_id,
shop_product_index.product_is_invoices,
shop_product_index.product_is_return,
shop_product_index.product_is_recommend,
shop_product_index.product_stock_status,
shop_product_index.kind_id,
shop_product_index.activity_type_ids,
shop_product_index.contract_type_ids,
shop_product_index.product_assist_data,
shop_product_index.product_add_time,
shop_product_index.product_unit_price,
shop_product_index.product_unit_points,
shop_product_index.product_unit_sp,
shop_product_index.product_sale_num,
shop_product_index.product_favorite_num,
shop_product_index.product_sale_district_ids,
shop_product_index.product_region_district_ids,
shop_product_index.product_freight,
shop_product_index.product_evaluation_num,
shop_product_index.product_tags,
shop_product_index.store_is_selfsupport,
shop_product_index.product_fx_enable,
shop_product_index.product_dist_enable,
shop_product_index.product_sale_time,
shop_product_index.product_number,
shop_product_index.product_order,
shop_product_index.product_src_id,
shop_product_index.market_category_id,
shop_product_index.store_latitude,
shop_product_index.store_longitude,
shop_product_index.product_is_video,
shop_product_index.subsite_id,
shop_product_index.version,
shop_product_index.lecturer_id,
shop_product_index.course_category_id
FROM
shop_product_index
<where>
<if test="productId!=null">
shop_product_index.product_id=#{productId}
</if>
</where>
</select>
</mapper>