wujianwei
2025-09-10 32337b3f584a5b95af114697178251b51ecc14fd
service/src/main/resources/mapper/cwgl/SmartLockerApplicationMapper.xml
@@ -22,10 +22,11 @@
        <result property="createBy"    column="create_by"    />
        <result property="updateBy"    column="update_by"    />
        <result property="deleted"    column="deleted"    />
        <result property="deadlineTime"    column="deadline_time"    />
    </resultMap>
    <sql id="selectSmartLockerApplicationVo">
        select thisTab.id, thisTab.command_type, thisTab.applicant_code, thisTab.applicant_name, thisTab.item_type, thisTab.item_name, thisTab.locker_no, thisTab.locker_port, thisTab.status, thisTab.cancel_time, thisTab.receive_time, thisTab.create_time, thisTab.update_time, thisTab.remark, thisTab.create_by, thisTab.update_by, thisTab.deleted from smart_locker_application AS thisTab
        select thisTab.id, thisTab.command_type, thisTab.applicant_code, thisTab.applicant_name, thisTab.item_type, thisTab.item_name, thisTab.locker_no, thisTab.locker_port, thisTab.status, thisTab.cancel_time, thisTab.receive_time, thisTab.create_time, thisTab.update_time, thisTab.remark, thisTab.create_by, thisTab.update_by, thisTab.deleted, thisTab.deadline_time from smart_locker_application AS thisTab
    </sql>
    <sql id="selectSmartLockerApplicationVoCount">
        select count(0) from smart_locker_application as thisTab
@@ -98,6 +99,7 @@
            <if test="createBy != null">create_by,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="deleted != null">deleted,</if>
            <if test="deadlineTime != null">deadline_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="commandType != null">#{commandType},</if>
@@ -116,17 +118,18 @@
            <if test="createBy != null">#{createBy},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="deleted != null">#{deleted},</if>
            <if test="deadlineTime != null">#{deadlineTime},</if>
         </trim>
    </insert>
    <insert id="insertSmartLockerApplicationBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into smart_locker_application
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,command_type,applicant_code,applicant_name,item_type,item_name,locker_no,locker_port,status,cancel_time,receive_time,create_time,update_time,remark,create_by,update_by,deleted,
            id,command_type,applicant_code,applicant_name,item_type,item_name,locker_no,locker_port,status,cancel_time,receive_time,create_time,update_time,remark,create_by,update_by,deleted,deadline_time,
        </trim>
        <foreach item="item" index="index" collection="list" separator=",">
            <trim prefix="(" suffix=") " suffixOverrides=",">
                #{item.id},#{item.commandType},#{item.applicantCode},#{item.applicantName},#{item.itemType},#{item.itemName},#{item.lockerNo},#{item.lockerPort},#{item.status},#{item.cancelTime},#{item.receiveTime},#{item.createTime},#{item.updateTime},#{item.remark},#{item.createBy},#{item.updateBy},#{item.deleted},
                #{item.id},#{item.commandType},#{item.applicantCode},#{item.applicantName},#{item.itemType},#{item.itemName},#{item.lockerNo},#{item.lockerPort},#{item.status},#{item.cancelTime},#{item.receiveTime},#{item.createTime},#{item.updateTime},#{item.remark},#{item.createBy},#{item.updateBy},#{item.deleted},#{item.deadlineTime},
            </trim>
        </foreach>
    </insert>
@@ -151,6 +154,7 @@
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="deleted != null">deleted = #{deleted},</if>
            <if test="deadlineTime != null">deadline_time = #{deadlineTime},</if>
        </trim>
        where id = #{id}
    </update>
@@ -175,10 +179,19 @@
                <if test="item.createBy != null">create_by = #{item.createBy},</if>
                <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
                <if test="item.deleted != null">deleted = #{item.deleted},</if>
                <if test="item.deadlineTime != null">deadline_time = #{item.deadlineTime},</if>
            </trim>
        where id = #{item.id}
        </foreach>
    </update>
    <update id="updateExpiredStatus">
        UPDATE smart_locker_application
        SET status = 3, update_time = NOW()
        WHERE status = 0
        AND deadline_time &lt;  NOW()
    </update>
    <!--删除-->
    <delete id="deleteSmartLockerApplicationById" parameterType="Integer">