From 212f81d79dc966cdf5f73a658a070ca79d69e822 Mon Sep 17 00:00:00 2001 From: wujianwei <wjw@11.com> Date: 星期二, 09 九月 2025 16:40:02 +0800 Subject: [PATCH] 新增接口 --- service/src/main/resources/mapper/cwgl/SmartLockerApplicationMapper.xml | 194 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 194 insertions(+), 0 deletions(-) diff --git a/service/src/main/resources/mapper/cwgl/SmartLockerApplicationMapper.xml b/service/src/main/resources/mapper/cwgl/SmartLockerApplicationMapper.xml new file mode 100644 index 0000000..baa77ed --- /dev/null +++ b/service/src/main/resources/mapper/cwgl/SmartLockerApplicationMapper.xml @@ -0,0 +1,194 @@ +<?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.cwgl.mapper.SmartLockerApplicationMapper"> + + <resultMap type="com.ruoyi.cwgl.domain.SmartLockerApplication" id="SmartLockerApplicationResult"> + <result property="id" column="id" /> + <result property="commandType" column="command_type" /> + <result property="applicantCode" column="applicant_code" /> + <result property="applicantName" column="applicant_name" /> + <result property="itemType" column="item_type" /> + <result property="itemName" column="item_name" /> + <result property="lockerNo" column="locker_no" /> + <result property="lockerPort" column="locker_port" /> + <result property="status" column="status" /> + <result property="cancelTime" column="cancel_time" /> + <result property="receiveTime" column="receive_time" /> + <result property="createTime" column="create_time" /> + <result property="updateTime" column="update_time" /> + <result property="remark" column="remark" /> + <result property="createBy" column="create_by" /> + <result property="updateBy" column="update_by" /> + <result property="deleted" column="deleted" /> + </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 + </sql> + <sql id="selectSmartLockerApplicationVoCount"> + select count(0) from smart_locker_application as thisTab + </sql> + + <sql id="whereCondition"> + <if test="commandType != null "> and thisTab.command_type = #{commandType}</if> + <if test="applicantCode != null and applicantCode != ''"> and thisTab.applicant_code = #{applicantCode}</if> + <if test="applicantName != null and applicantName != ''"> and thisTab.applicant_name like concat('%', #{applicantName}, '%')</if> + <if test="itemType != null "> and thisTab.item_type = #{itemType}</if> + <if test="itemName != null and itemName != ''"> and thisTab.item_name like concat('%', #{itemName}, '%')</if> + <if test="lockerNo != null and lockerNo != ''"> and thisTab.locker_no = #{lockerNo}</if> + <if test="lockerPort != null "> and thisTab.locker_port = #{lockerPort}</if> + <if test="status != null "> and thisTab.status = #{status}</if> + <if test="cancelTime != null "> and thisTab.cancel_time = #{cancelTime}</if> + <if test="receiveTime != null "> and thisTab.receive_time = #{receiveTime}</if> + <if test="deleted != null "> and thisTab.deleted = #{deleted}</if> + </sql> + + <!--鏌ヨ--> + <select id="selectSmartLockerApplicationById" parameterType="Integer" resultMap="SmartLockerApplicationResult"> + <include refid="selectSmartLockerApplicationVo"/> + where id = #{id} + </select> + + <select id="selectSmartLockerApplicationCount" parameterType="com.ruoyi.cwgl.domain.SmartLockerApplication" resultType="int"> + <include refid="selectSmartLockerApplicationVoCount"/> + <where> + <include refid="whereCondition"/> + </where> + </select> + + <select id="selectSmartLockerApplicationList" parameterType="com.ruoyi.cwgl.domain.SmartLockerApplication" resultMap="SmartLockerApplicationResult"> + <include refid="selectSmartLockerApplicationVo"/> + <where> + <include refid="whereCondition"/> + </where> + order by thisTab.id desc + </select> + <select id="selectSmartLockerApplication" resultMap="SmartLockerApplicationResult"> + <include refid="selectSmartLockerApplicationVo"/> + + where applicant_name = #{driverName} + and applicant_code = #{driverCode} + and status = 0 + limit 1 + </select> + <select id="selectCwByLicensePlateNumber" resultType="java.lang.Integer"> + + SELECT `NAME` from tms_vehicle WHERE LICENSE_PLATE_NUMBER = #{licensePlateNumber} and BE_DELETE =0 order by id asc LIMIT 1 + </select> + + <!-- 鏂板 --> + <insert id="insertSmartLockerApplication" parameterType="com.ruoyi.cwgl.domain.SmartLockerApplication" useGeneratedKeys="true" keyProperty="id"> + insert into smart_locker_application + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="commandType != null">command_type,</if> + <if test="applicantCode != null and applicantCode != ''">applicant_code,</if> + <if test="applicantName != null and applicantName != ''">applicant_name,</if> + <if test="itemType != null">item_type,</if> + <if test="itemName != null and itemName != ''">item_name,</if> + <if test="lockerNo != null">locker_no,</if> + <if test="lockerPort != null">locker_port,</if> + <if test="status != null">status,</if> + <if test="cancelTime != null">cancel_time,</if> + <if test="receiveTime != null">receive_time,</if> + <if test="createTime != null">create_time,</if> + <if test="updateTime != null">update_time,</if> + <if test="remark != null">remark,</if> + <if test="createBy != null">create_by,</if> + <if test="updateBy != null">update_by,</if> + <if test="deleted != null">deleted,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="commandType != null">#{commandType},</if> + <if test="applicantCode != null and applicantCode != ''">#{applicantCode},</if> + <if test="applicantName != null and applicantName != ''">#{applicantName},</if> + <if test="itemType != null">#{itemType},</if> + <if test="itemName != null and itemName != ''">#{itemName},</if> + <if test="lockerNo != null">#{lockerNo},</if> + <if test="lockerPort != null">#{lockerPort},</if> + <if test="status != null">#{status},</if> + <if test="cancelTime != null">#{cancelTime},</if> + <if test="receiveTime != null">#{receiveTime},</if> + <if test="createTime != null">#{createTime},</if> + <if test="updateTime != null">#{updateTime},</if> + <if test="remark != null">#{remark},</if> + <if test="createBy != null">#{createBy},</if> + <if test="updateBy != null">#{updateBy},</if> + <if test="deleted != null">#{deleted},</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, + </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}, + </trim> + </foreach> + </insert> + + <!-- 淇敼 --> + <update id="updateSmartLockerApplication" parameterType="com.ruoyi.cwgl.domain.SmartLockerApplication"> + update smart_locker_application + <trim prefix="SET" suffixOverrides=","> + <if test="commandType != null">command_type = #{commandType},</if> + <if test="applicantCode != null and applicantCode != ''">applicant_code = #{applicantCode},</if> + <if test="applicantName != null and applicantName != ''">applicant_name = #{applicantName},</if> + <if test="itemType != null">item_type = #{itemType},</if> + <if test="itemName != null and itemName != ''">item_name = #{itemName},</if> + <if test="lockerNo != null">locker_no = #{lockerNo},</if> + <if test="lockerPort != null">locker_port = #{lockerPort},</if> + <if test="status != null">status = #{status},</if> + <if test="cancelTime != null">cancel_time = #{cancelTime},</if> + <if test="receiveTime != null">receive_time = #{receiveTime},</if> + <if test="createTime != null">create_time = #{createTime},</if> + <if test="updateTime != null">update_time = #{updateTime},</if> + <if test="remark != null">remark = #{remark},</if> + <if test="createBy != null">create_by = #{createBy},</if> + <if test="updateBy != null">update_by = #{updateBy},</if> + <if test="deleted != null">deleted = #{deleted},</if> + </trim> + where id = #{id} + </update> + <!-- 淇敼 --> + <update id="updateSmartLockerApplicationBatch" parameterType="java.util.List"> + <foreach collection="list" item="item" index="index" separator=";"> + update smart_locker_application + <trim prefix="SET" suffixOverrides=","> + <if test="item.commandType != null">command_type = #{item.commandType},</if> + <if test="item.applicantCode != null and item.applicantCode != ''">applicant_code = #{item.applicantCode},</if> + <if test="item.applicantName != null and item.applicantName != ''">applicant_name = #{item.applicantName},</if> + <if test="item.itemType != null">item_type = #{item.itemType},</if> + <if test="item.itemName != null and item.itemName != ''">item_name = #{item.itemName},</if> + <if test="item.lockerNo != null">locker_no = #{item.lockerNo},</if> + <if test="item.lockerPort != null">locker_port = #{item.lockerPort},</if> + <if test="item.status != null">status = #{item.status},</if> + <if test="item.cancelTime != null">cancel_time = #{item.cancelTime},</if> + <if test="item.receiveTime != null">receive_time = #{item.receiveTime},</if> + <if test="item.createTime != null">create_time = #{item.createTime},</if> + <if test="item.updateTime != null">update_time = #{item.updateTime},</if> + <if test="item.remark != null">remark = #{item.remark},</if> + <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> + </trim> + where id = #{item.id} + </foreach> + </update> + + <!--鍒犻櫎--> + <delete id="deleteSmartLockerApplicationById" parameterType="Integer"> + delete from smart_locker_application where id = #{id} + </delete> + <delete id="deleteSmartLockerApplicationByIds" parameterType="Integer"> + delete from smart_locker_application where id in + <foreach item="id" collection="array" open="(" separator="," close=")"> + #{id} + </foreach> + </delete> + +</mapper> \ No newline at end of file -- Gitblit v1.8.0