admin
2024-02-20 435bc751b10bf5868182219bc4c0851ab7674cd7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?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.camera.mapper.CameraShipingsbMapper">
    
    <resultMap type="CameraShipingsb" id="CameraShipingsbResult">
        <result property="id"    column="id"    />
        <result property="sheXiangTID"    column="sheXiangTID"    />
        <result property="sheXiangTBM"    column="sheXiangTBM"    />
        <result property="shiBieLXBM"    column="shiBieLXBM"    />
        <result property="shiBieLXMC"    column="shiBieLXMC"    />
        <result property="fenXiLXBM"    column="fenXiLXBM"    />
        <result property="fileUrl"    column="fileUrl"    />
        <result property="shuJuSJ"    column="shuJuSJ"    />
    </resultMap>
 
    <sql id="selectCameraShipingsbVo">
        select id, sheXiangTID, sheXiangTBM, shiBieLXBM, shiBieLXMC, fenXiLXBM, fileUrl, shuJuSJ from camera_shipingsb
    </sql>
 
    <select id="selectCameraShipingsbList" parameterType="CameraShipingsb" resultMap="CameraShipingsbResult">
        <include refid="selectCameraShipingsbVo"/>
        <where>  
            <if test="sheXiangTID != null "> and sheXiangTID = #{sheXiangTID}</if>
            <if test="sheXiangTBM != null  and sheXiangTBM != ''"> and sheXiangTBM = #{sheXiangTBM}</if>
            <if test="shiBieLXBM != null  and shiBieLXBM != ''"> and shiBieLXBM = #{shiBieLXBM}</if>
            <if test="shiBieLXMC != null  and shiBieLXMC != ''"> and shiBieLXMC = #{shiBieLXMC}</if>
            <if test="fenXiLXBM != null  and fenXiLXBM != ''"> and fenXiLXBM = #{fenXiLXBM}</if>
            <if test="fileUrl != null  and fileUrl != ''"> and fileUrl = #{fileUrl}</if>
            <if test="shuJuSJ != null "> and shuJuSJ = #{shuJuSJ}</if>
        </where>
    </select>
    
    <select id="selectCameraShipingsbById" parameterType="Long" resultMap="CameraShipingsbResult">
        <include refid="selectCameraShipingsbVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertCameraShipingsb" parameterType="CameraShipingsb" useGeneratedKeys="true" keyProperty="id">
        insert into camera_shipingsb
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="sheXiangTID != null">sheXiangTID,</if>
            <if test="sheXiangTBM != null">sheXiangTBM,</if>
            <if test="shiBieLXBM != null">shiBieLXBM,</if>
            <if test="shiBieLXMC != null">shiBieLXMC,</if>
            <if test="fenXiLXBM != null">fenXiLXBM,</if>
            <if test="fileUrl != null">fileUrl,</if>
            <if test="shuJuSJ != null">shuJuSJ,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="sheXiangTID != null">#{sheXiangTID},</if>
            <if test="sheXiangTBM != null">#{sheXiangTBM},</if>
            <if test="shiBieLXBM != null">#{shiBieLXBM},</if>
            <if test="shiBieLXMC != null">#{shiBieLXMC},</if>
            <if test="fenXiLXBM != null">#{fenXiLXBM},</if>
            <if test="fileUrl != null">#{fileUrl},</if>
            <if test="shuJuSJ != null">#{shuJuSJ},</if>
         </trim>
    </insert>
 
    <update id="updateCameraShipingsb" parameterType="CameraShipingsb">
        update camera_shipingsb
        <trim prefix="SET" suffixOverrides=",">
            <if test="sheXiangTID != null">sheXiangTID = #{sheXiangTID},</if>
            <if test="sheXiangTBM != null">sheXiangTBM = #{sheXiangTBM},</if>
            <if test="shiBieLXBM != null">shiBieLXBM = #{shiBieLXBM},</if>
            <if test="shiBieLXMC != null">shiBieLXMC = #{shiBieLXMC},</if>
            <if test="fenXiLXBM != null">fenXiLXBM = #{fenXiLXBM},</if>
            <if test="fileUrl != null">fileUrl = #{fileUrl},</if>
            <if test="shuJuSJ != null">shuJuSJ = #{shuJuSJ},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteCameraShipingsbById" parameterType="Long">
        delete from camera_shipingsb where id = #{id}
    </delete>
 
    <delete id="deleteCameraShipingsbByIds" parameterType="String">
        delete from camera_shipingsb where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>