Files
FTC25009/ruoyi-admin/src/main/resources/mapper/bas/BasBarcodeFormatMapper.xml
2026-06-10 10:03:08 +08:00

103 lines
5.2 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.ruoyi.bas.barcode.format.mapper.BasBarcodeFormatMapper">
<resultMap type="BasBarcodeFormat" id="BasBarcodeFormatResult">
<result property="id" column="id" />
<result property="formatName" column="format_name" />
<result property="barcodeType" column="barcode_type" />
<result property="width" column="width" />
<result property="height" column="height" />
<result property="showText" column="show_text" />
<result property="fontSize" column="font_size" />
<result property="prefix" column="prefix" />
<result property="suffix" column="suffix" />
<result property="remark" column="remark" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectBasBarcodeFormatVo">
select id, format_name, barcode_type, width, height, show_text, font_size, prefix, suffix, remark, create_time, update_time from bas_barcode_format
</sql>
<select id="selectBasBarcodeFormatList" parameterType="BasBarcodeFormat" resultMap="BasBarcodeFormatResult">
<include refid="selectBasBarcodeFormatVo"/>
<where>
<if test="formatName != null and formatName != ''"> and format_name like concat('%', #{formatName}, '%')</if>
<if test="barcodeType != null and barcodeType != ''"> and barcode_type = #{barcodeType}</if>
<if test="width != null "> and width = #{width}</if>
<if test="height != null "> and height = #{height}</if>
<if test="showText != null "> and show_text = #{showText}</if>
<if test="fontSize != null "> and font_size = #{fontSize}</if>
<if test="prefix != null and prefix != ''"> and prefix = #{prefix}</if>
<if test="suffix != null and suffix != ''"> and suffix = #{suffix}</if>
</where>
</select>
<select id="selectBasBarcodeFormatById" parameterType="Long" resultMap="BasBarcodeFormatResult">
<include refid="selectBasBarcodeFormatVo"/>
where id = #{id}
</select>
<insert id="insertBasBarcodeFormat" parameterType="BasBarcodeFormat" useGeneratedKeys="true" keyProperty="id">
insert into bas_barcode_format
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="formatName != null">format_name,</if>
<if test="barcodeType != null">barcode_type,</if>
<if test="width != null">width,</if>
<if test="height != null">height,</if>
<if test="showText != null">show_text,</if>
<if test="fontSize != null">font_size,</if>
<if test="prefix != null">prefix,</if>
<if test="suffix != null">suffix,</if>
<if test="remark != null">remark,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="formatName != null">#{formatName},</if>
<if test="barcodeType != null">#{barcodeType},</if>
<if test="width != null">#{width},</if>
<if test="height != null">#{height},</if>
<if test="showText != null">#{showText},</if>
<if test="fontSize != null">#{fontSize},</if>
<if test="prefix != null">#{prefix},</if>
<if test="suffix != null">#{suffix},</if>
<if test="remark != null">#{remark},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateBasBarcodeFormat" parameterType="BasBarcodeFormat">
update bas_barcode_format
<trim prefix="SET" suffixOverrides=",">
<if test="formatName != null">format_name = #{formatName},</if>
<if test="barcodeType != null">barcode_type = #{barcodeType},</if>
<if test="width != null">width = #{width},</if>
<if test="height != null">height = #{height},</if>
<if test="showText != null">show_text = #{showText},</if>
<if test="fontSize != null">font_size = #{fontSize},</if>
<if test="prefix != null">prefix = #{prefix},</if>
<if test="suffix != null">suffix = #{suffix},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBasBarcodeFormatById" parameterType="Long">
delete from bas_barcode_format where id = #{id}
</delete>
<delete id="deleteBasBarcodeFormatByIds" parameterType="String">
delete from bas_barcode_format where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>