增加品牌管理,品牌动态选择

This commit is contained in:
19173159168
2025-08-12 21:25:07 +08:00
parent 676e156702
commit 6fadd0aed9
29 changed files with 1419 additions and 34 deletions

View File

@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectZcCarModelVo"/>
<where>
<if test="modelName != null and modelName != ''"> and model_name like concat('%', #{modelName}, '%')</if>
<if test="brandId != null"> and brand_id = #{brandId}</if>
<if test="brandName != null and brandName != ''"> and brand_name like concat('%', #{brandName}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
@ -124,7 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where id = #{id}
</update>
<update id="updateZcCarModelBrand" parameterType="ZcCarModel">
update zc_car_model set brand_name = #{brandName} where brand_id = #{brandId}
</update>
<delete id="deleteZcCarModelById" parameterType="Long">
delete from zc_car_model where id = #{id}
</delete>
@ -141,6 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectModelsByBrand" resultMap="ZcCarModelResult">
SELECT id,model_name FROM zc_car_model WHERE del_flag = 0 and brand_name = #{brandName} ORDER BY model_name ASC
SELECT id,model_name FROM zc_car_model WHERE del_flag = 0 and brand_id = #{brandId} ORDER BY model_name ASC
</select>
<select id="checkModelNameUnique" resultType="com.ruoyi.operation.domain.ZcCarModel">
SELECT * FROM zc_car_model WHERE del_flag = 0 and brand_id = #{brandId} and model_name = #{modelName}
</select>
</mapper>