租车套餐

This commit is contained in:
19173159168
2025-07-08 00:58:41 +08:00
parent d837a9438f
commit 8a9d3b392e
33 changed files with 3681 additions and 16 deletions

View File

@ -0,0 +1,182 @@
<?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.ruoyi.operation.mapper.ZcRentBatteyRuleMapper">
<resultMap type="ZcRentBatteyRule" id="ZcRentBatteyRuleResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="detail" column="detail" />
<result property="icon" column="icon" />
<result property="voltage" column="voltage" />
<result property="ah" column="ah" />
<result property="maxMileage" column="max_mileage" />
<result property="minMileage" column="min_mileage" />
<result property="depositPrice" column="deposit_price" />
<result property="rentPrice" column="rent_price" />
<result property="durationType" column="duration_type" />
<result property="duration" column="duration" />
<result property="insurancePrice" column="insurance_price" />
<result property="compulsoryInsurance" column="compulsory_insurance" />
<result property="insuranceDuration" column="insurance_duration" />
<result property="changeNum" column="change_num" />
<result property="changeType" column="change_type" />
<result property="isDelete" column="is_delete" />
<result property="cityId" column="city_id" />
<result property="operatorId" column="operator_id" />
<result property="provinceId" column="province_id" />
<result property="categoryId" column="category_id" />
<result property="mealType" column="meal_type" />
<result property="mealSort" column="meal_sort" />
<result property="isJoinInvite" column="is_join_invite" />
<result property="mealChannel" column="meal_channel" />
<result property="buyLimitType" column="buy_limit_type" />
</resultMap>
<sql id="selectZcRentBatteyRuleVo">
select id, title, detail, icon, voltage, ah, max_mileage, min_mileage, deposit_price, rent_price, duration_type, duration, insurance_price, compulsory_insurance, insurance_duration, change_num, change_type, is_delete, city_id, operator_id, province_id, category_id, meal_type, meal_sort, is_join_invite, meal_channel, buy_limit_type from zc_rent_battey_rule
</sql>
<select id="selectZcRentBatteyRuleList" parameterType="ZcRentBatteyRule" resultMap="ZcRentBatteyRuleResult">
<include refid="selectZcRentBatteyRuleVo"/>
<where>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="detail != null and detail != ''"> and detail = #{detail}</if>
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
<if test="ah != null and ah != ''"> and ah = #{ah}</if>
<if test="maxMileage != null "> and max_mileage = #{maxMileage}</if>
<if test="minMileage != null "> and min_mileage = #{minMileage}</if>
<if test="depositPrice != null "> and deposit_price = #{depositPrice}</if>
<if test="rentPrice != null "> and rent_price = #{rentPrice}</if>
<if test="durationType != null "> and duration_type = #{durationType}</if>
<if test="duration != null "> and duration = #{duration}</if>
<if test="insurancePrice != null "> and insurance_price = #{insurancePrice}</if>
<if test="compulsoryInsurance != null "> and compulsory_insurance = #{compulsoryInsurance}</if>
<if test="insuranceDuration != null "> and insurance_duration = #{insuranceDuration}</if>
<if test="changeNum != null "> and change_num = #{changeNum}</if>
<if test="changeType != null "> and change_type = #{changeType}</if>
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
<if test="cityId != null "> and city_id = #{cityId}</if>
<if test="operatorId != null "> and operator_id = #{operatorId}</if>
<if test="provinceId != null "> and province_id = #{provinceId}</if>
<if test="categoryId != null "> and category_id = #{categoryId}</if>
<if test="mealType != null "> and meal_type = #{mealType}</if>
<if test="mealSort != null "> and meal_sort = #{mealSort}</if>
<if test="isJoinInvite != null "> and is_join_invite = #{isJoinInvite}</if>
<if test="mealChannel != null "> and meal_channel = #{mealChannel}</if>
<if test="buyLimitType != null "> and buy_limit_type = #{buyLimitType}</if>
</where>
</select>
<select id="selectZcRentBatteyRuleById" parameterType="Long" resultMap="ZcRentBatteyRuleResult">
<include refid="selectZcRentBatteyRuleVo"/>
where id = #{id}
</select>
<insert id="insertZcRentBatteyRule" parameterType="ZcRentBatteyRule" useGeneratedKeys="true" keyProperty="id">
insert into zc_rent_battey_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">title,</if>
<if test="detail != null and detail != ''">detail,</if>
<if test="icon != null">icon,</if>
<if test="voltage != null and voltage != ''">voltage,</if>
<if test="ah != null and ah != ''">ah,</if>
<if test="maxMileage != null">max_mileage,</if>
<if test="minMileage != null">min_mileage,</if>
<if test="depositPrice != null">deposit_price,</if>
<if test="rentPrice != null">rent_price,</if>
<if test="durationType != null">duration_type,</if>
<if test="duration != null">duration,</if>
<if test="insurancePrice != null">insurance_price,</if>
<if test="compulsoryInsurance != null">compulsory_insurance,</if>
<if test="insuranceDuration != null">insurance_duration,</if>
<if test="changeNum != null">change_num,</if>
<if test="changeType != null">change_type,</if>
<if test="isDelete != null">is_delete,</if>
<if test="cityId != null">city_id,</if>
<if test="operatorId != null">operator_id,</if>
<if test="provinceId != null">province_id,</if>
<if test="categoryId != null">category_id,</if>
<if test="mealType != null">meal_type,</if>
<if test="mealSort != null">meal_sort,</if>
<if test="isJoinInvite != null">is_join_invite,</if>
<if test="mealChannel != null">meal_channel,</if>
<if test="buyLimitType != null">buy_limit_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">#{title},</if>
<if test="detail != null and detail != ''">#{detail},</if>
<if test="icon != null">#{icon},</if>
<if test="voltage != null and voltage != ''">#{voltage},</if>
<if test="ah != null and ah != ''">#{ah},</if>
<if test="maxMileage != null">#{maxMileage},</if>
<if test="minMileage != null">#{minMileage},</if>
<if test="depositPrice != null">#{depositPrice},</if>
<if test="rentPrice != null">#{rentPrice},</if>
<if test="durationType != null">#{durationType},</if>
<if test="duration != null">#{duration},</if>
<if test="insurancePrice != null">#{insurancePrice},</if>
<if test="compulsoryInsurance != null">#{compulsoryInsurance},</if>
<if test="insuranceDuration != null">#{insuranceDuration},</if>
<if test="changeNum != null">#{changeNum},</if>
<if test="changeType != null">#{changeType},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="cityId != null">#{cityId},</if>
<if test="operatorId != null">#{operatorId},</if>
<if test="provinceId != null">#{provinceId},</if>
<if test="categoryId != null">#{categoryId},</if>
<if test="mealType != null">#{mealType},</if>
<if test="mealSort != null">#{mealSort},</if>
<if test="isJoinInvite != null">#{isJoinInvite},</if>
<if test="mealChannel != null">#{mealChannel},</if>
<if test="buyLimitType != null">#{buyLimitType},</if>
</trim>
</insert>
<update id="updateZcRentBatteyRule" parameterType="ZcRentBatteyRule">
update zc_rent_battey_rule
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="detail != null and detail != ''">detail = #{detail},</if>
<if test="icon != null">icon = #{icon},</if>
<if test="voltage != null and voltage != ''">voltage = #{voltage},</if>
<if test="ah != null and ah != ''">ah = #{ah},</if>
<if test="maxMileage != null">max_mileage = #{maxMileage},</if>
<if test="minMileage != null">min_mileage = #{minMileage},</if>
<if test="depositPrice != null">deposit_price = #{depositPrice},</if>
<if test="rentPrice != null">rent_price = #{rentPrice},</if>
<if test="durationType != null">duration_type = #{durationType},</if>
<if test="duration != null">duration = #{duration},</if>
<if test="insurancePrice != null">insurance_price = #{insurancePrice},</if>
<if test="compulsoryInsurance != null">compulsory_insurance = #{compulsoryInsurance},</if>
<if test="insuranceDuration != null">insurance_duration = #{insuranceDuration},</if>
<if test="changeNum != null">change_num = #{changeNum},</if>
<if test="changeType != null">change_type = #{changeType},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="cityId != null">city_id = #{cityId},</if>
<if test="operatorId != null">operator_id = #{operatorId},</if>
<if test="provinceId != null">province_id = #{provinceId},</if>
<if test="categoryId != null">category_id = #{categoryId},</if>
<if test="mealType != null">meal_type = #{mealType},</if>
<if test="mealSort != null">meal_sort = #{mealSort},</if>
<if test="isJoinInvite != null">is_join_invite = #{isJoinInvite},</if>
<if test="mealChannel != null">meal_channel = #{mealChannel},</if>
<if test="buyLimitType != null">buy_limit_type = #{buyLimitType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcRentBatteyRuleById" parameterType="Long">
delete from zc_rent_battey_rule where id = #{id}
</delete>
<delete id="deleteZcRentBatteyRuleByIds" parameterType="String">
delete from zc_rent_battey_rule where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,91 @@
<?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.ruoyi.operation.mapper.ZcRentCarRuleBatteryMapper">
<resultMap type="ZcRentCarRuleBattery" id="ZcRentCarRuleBatteryResult">
<result property="id" column="id" />
<result property="carRuleId" column="car_rule_id" />
<result property="batteryRuleId" column="battery_rule_id" />
<result property="sortOrder" column="sort_order" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectZcRentCarRuleBatteryVo">
select id, car_rule_id, battery_rule_id, sort_order, del_flag, create_by, create_time, update_by, update_time, remark from zc_rent_car_rule_battery
</sql>
<select id="selectZcRentCarRuleBatteryList" parameterType="ZcRentCarRuleBattery" resultMap="ZcRentCarRuleBatteryResult">
<include refid="selectZcRentCarRuleBatteryVo"/>
<where>
<if test="carRuleId != null "> and car_rule_id = #{carRuleId}</if>
<if test="batteryRuleId != null "> and battery_rule_id = #{batteryRuleId}</if>
<if test="sortOrder != null "> and sort_order = #{sortOrder}</if>
</where>
</select>
<select id="selectZcRentCarRuleBatteryById" parameterType="Long" resultMap="ZcRentCarRuleBatteryResult">
<include refid="selectZcRentCarRuleBatteryVo"/>
where id = #{id}
</select>
<insert id="insertZcRentCarRuleBattery" parameterType="ZcRentCarRuleBattery" useGeneratedKeys="true" keyProperty="id">
insert into zc_rent_car_rule_battery
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="carRuleId != null">car_rule_id,</if>
<if test="batteryRuleId != null">battery_rule_id,</if>
<if test="sortOrder != null">sort_order,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="carRuleId != null">#{carRuleId},</if>
<if test="batteryRuleId != null">#{batteryRuleId},</if>
<if test="sortOrder != null">#{sortOrder},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateZcRentCarRuleBattery" parameterType="ZcRentCarRuleBattery">
update zc_rent_car_rule_battery
<trim prefix="SET" suffixOverrides=",">
<if test="carRuleId != null">car_rule_id = #{carRuleId},</if>
<if test="batteryRuleId != null">battery_rule_id = #{batteryRuleId},</if>
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcRentCarRuleBatteryById" parameterType="Long">
delete from zc_rent_car_rule_battery where id = #{id}
</delete>
<delete id="deleteZcRentCarRuleBatteryByIds" parameterType="String">
delete from zc_rent_car_rule_battery where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,165 @@
<?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.ruoyi.operation.mapper.ZcRentCarRuleMapper">
<resultMap type="ZcRentCarRule" id="ZcRentCarRuleResult">
<result property="id" column="id" />
<result property="ruleName" column="rule_name" />
<result property="ruleCode" column="rule_code" />
<result property="rentalType" column="rental_type" />
<result property="rentalDays" column="rental_days" />
<result property="rentalPrice" column="rental_price" />
<result property="depositPrice" column="deposit_price" />
<result property="overdueFee" column="overdue_fee" />
<result property="overdueType" column="overdue_type" />
<result property="depositFree" column="deposit_free" />
<result property="autoDeduct" column="auto_deduct" />
<result property="operatingCompanyId" column="operating_company_id" />
<result property="operatingCompanyName" column="operating_company_name" />
<result property="status" column="status" />
<result property="isDefault" column="is_default" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="extend1" column="extend1" />
<result property="extend2" column="extend2" />
<result property="extend3" column="extend3" />
<result property="extend4" column="extend4" />
<result property="extend5" column="extend5" />
</resultMap>
<sql id="selectZcRentCarRuleVo">
select id, rule_name, rule_code, rental_type, rental_days, rental_price, deposit_price, overdue_fee, overdue_type, deposit_free, auto_deduct, operating_company_id, status, is_default, del_flag, create_by, create_time, update_by, update_time, remark, extend1, extend2, extend3, extend4, extend5 from zc_rent_car_rule
</sql>
<select id="selectZcRentCarRuleList" parameterType="ZcRentCarRule" resultMap="ZcRentCarRuleResult">
select a.id, a.rule_name, a.rule_code, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.deposit_free, a.auto_deduct, a.operating_company_id, a.status, a.is_default, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.extend1, a.extend2, a.extend3, a.extend4, a.extend5
,c.company_name as operating_company_name
from zc_rent_car_rule a
left join zc_company c on c.id = a.operating_company_id
<where>
<if test="ruleName != null and ruleName != ''"> and a.rule_name like concat('%', #{ruleName}, '%')</if>
<if test="ruleCode != null and ruleCode != ''"> and a.rule_code = #{ruleCode}</if>
<if test="rentalType != null and rentalType != ''"> and a.rental_type = #{rentalType}</if>
<if test="rentalDays != null "> and a.rental_days = #{rentalDays}</if>
<if test="rentalPrice != null "> and a.rental_price = #{rentalPrice}</if>
<if test="depositPrice != null "> and a.deposit_price = #{depositPrice}</if>
<if test="overdueFee != null "> and a.overdue_fee = #{overdueFee}</if>
<if test="overdueType != null and overdueType != ''"> and a.overdue_type = #{overdueType}</if>
<if test="depositFree != null and depositFree != ''"> and a.deposit_free = #{depositFree}</if>
<if test="autoDeduct != null and autoDeduct != ''"> and a.auto_deduct = #{autoDeduct}</if>
<if test="operatingCompanyId != null and operatingCompanyId != ''"> and a.operating_company_id = #{operatingCompanyId}</if>
<if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="isDefault != null and isDefault != ''"> and a.is_default = #{isDefault}</if>
</where>
</select>
<select id="selectZcRentCarRuleById" parameterType="Long" resultMap="ZcRentCarRuleResult">
<include refid="selectZcRentCarRuleVo"/>
where id = #{id}
</select>
<insert id="insertZcRentCarRule" parameterType="ZcRentCarRule" useGeneratedKeys="true" keyProperty="id">
insert into zc_rent_car_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">rule_name,</if>
<if test="ruleCode != null and ruleCode != ''">rule_code,</if>
<if test="rentalType != null and rentalType != ''">rental_type,</if>
<if test="rentalDays != null">rental_days,</if>
<if test="rentalPrice != null">rental_price,</if>
<if test="depositPrice != null">deposit_price,</if>
<if test="overdueFee != null">overdue_fee,</if>
<if test="overdueType != null">overdue_type,</if>
<if test="depositFree != null">deposit_free,</if>
<if test="autoDeduct != null">auto_deduct,</if>
<if test="operatingCompanyId != null">operating_company_id,</if>
<if test="status != null">status,</if>
<if test="isDefault != null">is_default,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="extend1 != null">extend1,</if>
<if test="extend2 != null">extend2,</if>
<if test="extend3 != null">extend3,</if>
<if test="extend4 != null">extend4,</if>
<if test="extend5 != null">extend5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">#{ruleName},</if>
<if test="ruleCode != null and ruleCode != ''">#{ruleCode},</if>
<if test="rentalType != null and rentalType != ''">#{rentalType},</if>
<if test="rentalDays != null">#{rentalDays},</if>
<if test="rentalPrice != null">#{rentalPrice},</if>
<if test="depositPrice != null">#{depositPrice},</if>
<if test="overdueFee != null">#{overdueFee},</if>
<if test="overdueType != null">#{overdueType},</if>
<if test="depositFree != null">#{depositFree},</if>
<if test="autoDeduct != null">#{autoDeduct},</if>
<if test="operatingCompanyId != null">#{operatingCompanyId},</if>
<if test="status != null">#{status},</if>
<if test="isDefault != null">#{isDefault},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="extend1 != null">#{extend1},</if>
<if test="extend2 != null">#{extend2},</if>
<if test="extend3 != null">#{extend3},</if>
<if test="extend4 != null">#{extend4},</if>
<if test="extend5 != null">#{extend5},</if>
</trim>
</insert>
<update id="updateZcRentCarRule" parameterType="ZcRentCarRule">
update zc_rent_car_rule
<trim prefix="SET" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">rule_name = #{ruleName},</if>
<if test="ruleCode != null and ruleCode != ''">rule_code = #{ruleCode},</if>
<if test="rentalType != null and rentalType != ''">rental_type = #{rentalType},</if>
<if test="rentalDays != null">rental_days = #{rentalDays},</if>
<if test="rentalPrice != null">rental_price = #{rentalPrice},</if>
<if test="depositPrice != null">deposit_price = #{depositPrice},</if>
<if test="overdueFee != null">overdue_fee = #{overdueFee},</if>
<if test="overdueType != null">overdue_type = #{overdueType},</if>
<if test="depositFree != null">deposit_free = #{depositFree},</if>
<if test="autoDeduct != null">auto_deduct = #{autoDeduct},</if>
<if test="operatingCompanyId != null">operating_company_id = #{operatingCompanyId},</if>
<if test="status != null">status = #{status},</if>
<if test="isDefault != null">is_default = #{isDefault},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="extend1 != null">extend1 = #{extend1},</if>
<if test="extend2 != null">extend2 = #{extend2},</if>
<if test="extend3 != null">extend3 = #{extend3},</if>
<if test="extend4 != null">extend4 = #{extend4},</if>
<if test="extend5 != null">extend5 = #{extend5},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcRentCarRuleById" parameterType="Long">
delete from zc_rent_car_rule where id = #{id}
</delete>
<delete id="deleteZcRentCarRuleByIds" parameterType="String">
delete from zc_rent_car_rule where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>