查询套餐商品接口
This commit is contained in:
50
src/main/resources/mapper/RuleItemMapper.xml
Normal file
50
src/main/resources/mapper/RuleItemMapper.xml
Normal file
@ -0,0 +1,50 @@
|
||||
<?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.sczx.car.mapper.RuleItemMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.sczx.car.po.RuleItemPo">
|
||||
<id column="id" property="id" />
|
||||
<result column="out_item_id" property="outItemId" />
|
||||
<result column="ali_item_id" property="aliItemId" />
|
||||
<result column="out_sku_id" property="outSkuId" />
|
||||
<result column="item_desc" property="itemDesc" />
|
||||
<result column="brand_name" property="brandName" />
|
||||
<result column="model_name" property="modelName" />
|
||||
<result column="category_name" property="categoryName" />
|
||||
<result column="rental_days" property="rentalDays" />
|
||||
<result column="rent_type" property="rentType" />
|
||||
<result column="rule_name" property="ruleName" />
|
||||
<result column="page_path" property="pagePath" />
|
||||
<result column="image" property="image" />
|
||||
<result column="image_list1" property="imageList1" />
|
||||
<result column="image_list2" property="imageList2" />
|
||||
<result column="image_list3" property="imageList3" />
|
||||
<result column="deposit_free" property="depositFree" />
|
||||
<result column="deposit_price" property="depositPrice" />
|
||||
<result column="rental_price" property="rentalPrice" />
|
||||
<result column="battery_rule_id" property="batteryRuleId" />
|
||||
<result column="car_rule_id" property="carRuleId" />
|
||||
<result column="car_model_id" property="carModelId" />
|
||||
<result column="brand_id" property="brandId" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, out_item_id, ali_item_id, out_sku_id, item_desc, brand_name, model_name, category_name,
|
||||
rental_days, rent_type, rule_name, page_path, image, image_list1, image_list2, image_list3,
|
||||
deposit_free, deposit_price, rental_price, battery_rule_id, car_rule_id, car_model_id, brand_id
|
||||
</sql>
|
||||
|
||||
<!-- 根据品牌ID、车型ID、车辆套餐ID和电池套餐ID查询套餐商品 -->
|
||||
<select id="selectByRuleIds" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM zc_rent_rule_item
|
||||
WHERE brand_id = #{brandId}
|
||||
AND car_model_id = #{carModelId}
|
||||
AND car_rule_id = #{carRuleId}
|
||||
AND battery_rule_id = #{batteryRuleId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user