支付
This commit is contained in:
@@ -0,0 +1,192 @@
|
||||
<?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.zhwl.device.ticket_machine.mapper.DeviceTicketMachineLogMapper">
|
||||
|
||||
<resultMap type="DeviceTicketMachineLog" id="DeviceTicketMachineLogResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="serialNo" column="serial_no"/>
|
||||
<result property="ticketType" column="ticket_type"/>
|
||||
<result property="ticketNum" column="ticket_num"/>
|
||||
<result property="orderCode" column="order_code"/>
|
||||
<result property="outNum" column="out_num"/>
|
||||
<result property="verificationCode" column="verification_code"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="scenicId" column="scenic_id"/>
|
||||
<result property="scenicName" column="scenic_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceTicketMachineLogVo">
|
||||
select zdtml.id,
|
||||
zdtml.name,
|
||||
zdtml.serial_no,
|
||||
zdtml.ticket_type,
|
||||
zdtml.ticket_num,
|
||||
zdtml.order_code,
|
||||
zdtml.out_num,
|
||||
zdtml.verification_code,
|
||||
zdtml.create_time,
|
||||
zdtml.scenic_id,
|
||||
zs.scenic_name
|
||||
from zdy_device_ticket_machine_log zdtml
|
||||
left join zdy_scenic zs on zs.id = zdtml.scenic_id
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceTicketMachineLogList" parameterType="DeviceTicketMachineLog" resultMap="DeviceTicketMachineLogResult">
|
||||
<include refid="selectDeviceTicketMachineLogVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">
|
||||
and zdtml.name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="serialNo != null and serialNo != ''">
|
||||
and zdtml.serial_no like concat('%', #{serialNo}, '%')
|
||||
</if>
|
||||
<if test="ticketType != null and ticketType != ''">
|
||||
and zdtml.ticket_type = #{ticketType}
|
||||
</if>
|
||||
<if test="ticketNum != null ">
|
||||
and zdtml.ticket_num = #{ticketNum}
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
and zdtml.order_code = #{orderCode}
|
||||
</if>
|
||||
<if test="outNum != null ">
|
||||
and zdtml.out_num = #{outNum}
|
||||
</if>
|
||||
<if test="verificationCode != null and verificationCode != ''">
|
||||
and zdtml.verification_code = #{verificationCode}
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and zdtml.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceTicketMachineLogById" parameterType="Long"
|
||||
resultMap="DeviceTicketMachineLogResult">
|
||||
<include refid="selectDeviceTicketMachineLogVo"/>
|
||||
where zdtml.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDeviceTicketMachineLog" parameterType="DeviceTicketMachineLog" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_device_ticket_machine_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,
|
||||
</if>
|
||||
<if test="serialNo != null">serial_no,
|
||||
</if>
|
||||
<if test="ticketType != null">ticket_type,
|
||||
</if>
|
||||
<if test="ticketNum != null">ticket_num,
|
||||
</if>
|
||||
<if test="orderCode != null">order_code,
|
||||
</if>
|
||||
<if test="outNum != null">out_num,
|
||||
</if>
|
||||
<if test="verificationCode != null">verification_code,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},
|
||||
</if>
|
||||
<if test="serialNo != null">#{serialNo},
|
||||
</if>
|
||||
<if test="ticketType != null">#{ticketType},
|
||||
</if>
|
||||
<if test="ticketNum != null">#{ticketNum},
|
||||
</if>
|
||||
<if test="orderCode != null">#{orderCode},
|
||||
</if>
|
||||
<if test="outNum != null">#{outNum},
|
||||
</if>
|
||||
<if test="verificationCode != null">#{verificationCode},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="scenicId != null">#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeviceTicketMachineLog" parameterType="DeviceTicketMachineLog">
|
||||
update zdy_device_ticket_machine_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="serialNo != null">serial_no =
|
||||
#{serialNo},
|
||||
</if>
|
||||
<if test="ticketType != null">ticket_type =
|
||||
#{ticketType},
|
||||
</if>
|
||||
<if test="ticketNum != null">ticket_num =
|
||||
#{ticketNum},
|
||||
</if>
|
||||
<if test="orderCode != null">order_code =
|
||||
#{orderCode},
|
||||
</if>
|
||||
<if test="outNum != null">out_num =
|
||||
#{outNum},
|
||||
</if>
|
||||
<if test="verificationCode != null">verification_code =
|
||||
#{verificationCode},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateNameBySerialNo">
|
||||
update zdy_device_ticket_machine_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="ticketType != null">ticket_type =
|
||||
#{ticketType},
|
||||
</if>
|
||||
<if test="ticketNum != null">ticket_num =
|
||||
#{ticketNum},
|
||||
</if>
|
||||
<if test="orderCode != null">order_code =
|
||||
#{orderCode},
|
||||
</if>
|
||||
<if test="outNum != null">out_num =
|
||||
#{outNum},
|
||||
</if>
|
||||
<if test="verificationCode != null">verification_code =
|
||||
#{verificationCode},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
where serial_no = #{serialNo}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceTicketMachineLogById" parameterType="Long">
|
||||
delete from zdy_device_ticket_machine_log where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceTicketMachineLogByIds" parameterType="String">
|
||||
delete from zdy_device_ticket_machine_log where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,289 @@
|
||||
<?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.zhwl.device.ticket_machine.mapper.DeviceTicketMachineMapper">
|
||||
|
||||
<resultMap type="DeviceTicketMachine" id="DeviceTicketMachineResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="serialNo" column="serial_no"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="ip" column="ip"/>
|
||||
<result property="mac" column="mac"/>
|
||||
<result property="version" column="version"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="printerStatus" column="printer_status"/>
|
||||
<result property="havePaperNum" column="have_paper_num"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="statusTime" column="status_time"/>
|
||||
<result property="printerStatusTime" column="printer_status_time"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="scenicId" column="scenic_id"/>
|
||||
<result property="scenicName" column="scenic_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceTicketMachineVo">
|
||||
select zdtm.id,
|
||||
zdtm.name,
|
||||
zdtm.serial_no,
|
||||
zdtm.model,
|
||||
zdtm.ip,
|
||||
zdtm.mac,
|
||||
zdtm.version,
|
||||
zdtm.address,
|
||||
zdtm.status,
|
||||
zdtm.printer_status,
|
||||
zdtm.have_paper_num,
|
||||
zdtm.password,
|
||||
zdtm.create_by,
|
||||
zdtm.create_time,
|
||||
zdtm.status_time,
|
||||
zdtm.printer_status_time,
|
||||
zdtm.dept_id,
|
||||
zdtm.scenic_id,
|
||||
zs.scenic_name
|
||||
from zdy_device_ticket_machine zdtm
|
||||
left join zdy_scenic zs on zs.id = zdtm.scenic_id
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceTicketMachineList" parameterType="DeviceTicketMachine"
|
||||
resultMap="DeviceTicketMachineResult">
|
||||
<include refid="selectDeviceTicketMachineVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">
|
||||
and zdtm.name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="serialNo != null and serialNo != ''">
|
||||
and zdtm.serial_no like concat('%', #{serialNo}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and zdtm.status = #{status}
|
||||
</if>
|
||||
<if test="deptId != null and deptId != ''">
|
||||
and zdtm.deptId = #{dept_id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceTicketMachineById" parameterType="Long"
|
||||
resultMap="DeviceTicketMachineResult">
|
||||
<include refid="selectDeviceTicketMachineVo"/>
|
||||
where zdtm.id = #{id}
|
||||
</select>
|
||||
<select id="selectDeviceTicketMachineBySerialNo"
|
||||
resultMap="DeviceTicketMachineResult">
|
||||
<include refid="selectDeviceTicketMachineVo"/>
|
||||
where zdtm.serial_no = #{serialNo} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDeviceTicketMachine" parameterType="DeviceTicketMachine" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_device_ticket_machine
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,
|
||||
</if>
|
||||
<if test="serialNo != null and serialNo != ''">serial_no,
|
||||
</if>
|
||||
<if test="model != null">model,
|
||||
</if>
|
||||
<if test="ip != null">ip,
|
||||
</if>
|
||||
<if test="mac != null">mac,
|
||||
</if>
|
||||
<if test="version != null">version,
|
||||
</if>
|
||||
<if test="address != null">address,
|
||||
</if>
|
||||
<if test="status != null and status != ''">status,
|
||||
</if>
|
||||
<if test="printerStatus != null">printer_status,
|
||||
</if>
|
||||
<if test="havePaperNum != null">have_paper_num,
|
||||
</if>
|
||||
<if test="password != null and password != ''">password,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="statusTime != null">status_time,
|
||||
</if>
|
||||
<if test="printerStatusTime != null">printer_status_time,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},
|
||||
</if>
|
||||
<if test="serialNo != null and serialNo != ''">#{serialNo},
|
||||
</if>
|
||||
<if test="model != null">#{model},
|
||||
</if>
|
||||
<if test="ip != null">#{ip},
|
||||
</if>
|
||||
<if test="mac != null">#{mac},
|
||||
</if>
|
||||
<if test="version != null">#{version},
|
||||
</if>
|
||||
<if test="address != null">#{address},
|
||||
</if>
|
||||
<if test="status != null and status != ''">#{status},
|
||||
</if>
|
||||
<if test="printerStatus != null">#{printerStatus},
|
||||
</if>
|
||||
<if test="havePaperNum != null">#{havePaperNum},
|
||||
</if>
|
||||
<if test="password != null and password != ''">#{password},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="statusTime != null">#{statusTime},
|
||||
</if>
|
||||
<if test="printerStatusTime != null">#{printerStatusTime},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
<if test="scenicId != null">#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeviceTicketMachine" parameterType="DeviceTicketMachine">
|
||||
update zdy_device_ticket_machine
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="serialNo != null and serialNo != ''">serial_no =
|
||||
#{serialNo},
|
||||
</if>
|
||||
<if test="model != null">model =
|
||||
#{model},
|
||||
</if>
|
||||
<if test="ip != null">ip =
|
||||
#{ip},
|
||||
</if>
|
||||
<if test="mac != null">mac =
|
||||
#{mac},
|
||||
</if>
|
||||
<if test="version != null">version =
|
||||
#{version},
|
||||
</if>
|
||||
<if test="address != null">address =
|
||||
#{address},
|
||||
</if>
|
||||
<if test="status != null and status != ''">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="printerStatus != null">printer_status =
|
||||
#{printerStatus},
|
||||
</if>
|
||||
<if test="havePaperNum != null">have_paper_num =
|
||||
#{havePaperNum},
|
||||
</if>
|
||||
<if test="password != null and password != ''">password =
|
||||
#{password},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="statusTime != null">status_time =
|
||||
#{statusTime},
|
||||
</if>
|
||||
<if test="printerStatusTime != null">printer_status_time =
|
||||
#{printerStatusTime},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateTicketMachineBySerialNo" parameterType="DeviceTicketMachine">
|
||||
update zdy_device_ticket_machine
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="model != null">model =
|
||||
#{model},
|
||||
</if>
|
||||
<if test="ip != null">ip =
|
||||
#{ip},
|
||||
</if>
|
||||
<if test="mac != null">mac =
|
||||
#{mac},
|
||||
</if>
|
||||
<if test="version != null">version =
|
||||
#{version},
|
||||
</if>
|
||||
<if test="address != null">address =
|
||||
#{address},
|
||||
</if>
|
||||
<if test="status != null and status != ''">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="printerStatus != null">printer_status =
|
||||
#{printerStatus},
|
||||
</if>
|
||||
<if test="havePaperNum != null">have_paper_num =
|
||||
#{havePaperNum},
|
||||
</if>
|
||||
<if test="password != null and password != ''">password =
|
||||
#{password},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="statusTime != null">status_time =
|
||||
#{statusTime},
|
||||
</if>
|
||||
<if test="printerStatusTime != null">printer_status_time =
|
||||
#{printerStatusTime},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
where serial_no = #{serialNo}
|
||||
</update>
|
||||
<update id="updateHavePaperNum">
|
||||
update zdy_device_ticket_machine
|
||||
set have_paper_num = have_paper_num - #{ticketNum}
|
||||
where serial_no = #{serialNo}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceTicketMachineById" parameterType="Long">
|
||||
delete
|
||||
from zdy_device_ticket_machine
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceTicketMachineByIds" parameterType="String">
|
||||
delete from zdy_device_ticket_machine where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user