支付
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,112 @@
|
||||
<?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.check.point.mapper.ZdyCheckPointDeviceMapper">
|
||||
|
||||
<resultMap type="ZdyCheckPointDevice" id="ZdyCheckPointDeviceResult">
|
||||
<result property="checkPointId" column="check_point_id"/>
|
||||
<result property="deviceSn" column="device_sn"/>
|
||||
<result property="deviceType" column="device_type"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyCheckPointDeviceVo">
|
||||
select check_point_id, device_sn, device_type
|
||||
from zdy_check_point_device
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyCheckPointDeviceList" parameterType="ZdyCheckPointDevice"
|
||||
resultMap="ZdyCheckPointDeviceResult">
|
||||
<include refid="selectZdyCheckPointDeviceVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyCheckPointDeviceByCheckPointId" parameterType="Long"
|
||||
resultMap="ZdyCheckPointDeviceResult">
|
||||
<include refid="selectZdyCheckPointDeviceVo"/>
|
||||
where check_point_id = #{checkPointId}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyCheckPointDevice" parameterType="ZdyCheckPointDevice">
|
||||
insert into zdy_check_point_device
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="checkPointId != null">check_point_id,
|
||||
</if>
|
||||
<if test="deviceSn != null">device_sn,
|
||||
</if>
|
||||
<if test="deviceType != null">device_type,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="checkPointId != null">#{checkPointId},
|
||||
</if>
|
||||
<if test="deviceSn != null">#{deviceSn},
|
||||
</if>
|
||||
<if test="deviceType != null">#{deviceType},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyCheckPointDevice" parameterType="ZdyCheckPointDevice">
|
||||
update zdy_check_point_device
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceSn != null">device_sn =
|
||||
#{deviceSn},
|
||||
</if>
|
||||
<if test="deviceType != null">device_type =
|
||||
#{deviceType},
|
||||
</if>
|
||||
</trim>
|
||||
where check_point_id = #{checkPointId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyCheckPointDeviceByCheckPointId" parameterType="Long">
|
||||
delete
|
||||
from zdy_check_point_device
|
||||
where check_point_id = #{checkPointId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyCheckPointDeviceByCheckPointIds" parameterType="String">
|
||||
delete from zdy_check_point_device where check_point_id in
|
||||
<foreach item="checkPointId" collection="array" open="(" separator="," close=")">
|
||||
#{checkPointId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="listSns" parameterType="com.zhwl.check.point.domain.ZdyCheckPointDevice" resultType="java.lang.String">
|
||||
select device_sn
|
||||
from zdy_check_point_device
|
||||
where check_point_id = #{checkPointId}
|
||||
and device_type = #{deviceType}
|
||||
</select>
|
||||
|
||||
<delete id="delete">
|
||||
delete from zdy_check_point_device
|
||||
where check_point_id = #{zdyCheckPointDevice.checkPointId}
|
||||
and device_type = #{zdyCheckPointDevice.deviceType}
|
||||
and device_sn in
|
||||
<foreach item="sn" collection="snList" open="(" separator="," close=")">
|
||||
#{sn}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getCheckPointIdByDeviceTypeAndDeviceSn" resultType="java.lang.Long">
|
||||
select check_point_id
|
||||
from zdy_check_point_device
|
||||
where device_sn = #{deviceSn}
|
||||
and device_type = #{deviceType}
|
||||
</select>
|
||||
|
||||
<select id="listDeviceSnsExcludingCheckpoint" parameterType="com.zhwl.check.point.domain.ZdyCheckPointDevice"
|
||||
resultType="java.lang.String">
|
||||
select device_sn
|
||||
from zdy_check_point_device
|
||||
<where>
|
||||
device_type = #{deviceType}
|
||||
<if test="checkPointId != null">
|
||||
and check_point_id != #{checkPointId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,90 @@
|
||||
<?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.check.point.mapper.ZdyCheckPointLogMapper">
|
||||
|
||||
<resultMap type="ZdyCheckPointLog" id="ZdyCheckPointLogResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="checkPointId" column="check_point_id"/>
|
||||
<result property="idCard" column="id_card"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyCheckPointLogVo">
|
||||
select id, check_point_id, id_card, create_time
|
||||
from zdy_check_point_log
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyCheckPointLogList" parameterType="ZdyCheckPointLog" resultMap="ZdyCheckPointLogResult">
|
||||
<include refid="selectZdyCheckPointLogVo"/>
|
||||
<where>
|
||||
<if test="checkPointId != null ">
|
||||
and check_point_id = #{checkPointId}
|
||||
</if>
|
||||
<if test="idCard != null and idCard != ''">
|
||||
and id_card = #{idCard}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyCheckPointLogById" parameterType="Long"
|
||||
resultMap="ZdyCheckPointLogResult">
|
||||
<include refid="selectZdyCheckPointLogVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyCheckPointLog" parameterType="ZdyCheckPointLog" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_check_point_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="checkPointId != null">check_point_id,
|
||||
</if>
|
||||
<if test="idCard != null and idCard != ''">id_card,
|
||||
</if>
|
||||
create_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="checkPointId != null">#{checkPointId},
|
||||
</if>
|
||||
<if test="idCard != null and idCard != ''">#{idCard},
|
||||
</if>
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyCheckPointLog" parameterType="ZdyCheckPointLog">
|
||||
update zdy_check_point_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="checkPointId != null">check_point_id =
|
||||
#{checkPointId},
|
||||
</if>
|
||||
<if test="idCard != null and idCard != ''">id_card =
|
||||
#{idCard},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyCheckPointLogById" parameterType="Long">
|
||||
delete from zdy_check_point_log where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyCheckPointLogByIds" parameterType="String">
|
||||
delete from zdy_check_point_log where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="countTodayByCheckPointIdAndIdCard" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from zdy_check_point_log
|
||||
where check_point_id = #{checkPointId}
|
||||
and id_card = #{idCard}
|
||||
and DATE(create_time) = DATE(NOW())
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,157 @@
|
||||
<?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.check.point.mapper.ZdyCheckPointMapper">
|
||||
|
||||
<resultMap type="ZdyCheckPoint" id="ZdyCheckPointResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="pointName" column="point_name"/>
|
||||
<result property="freeTicketType" column="free_ticket_type"/>
|
||||
<result property="age" column="age"/>
|
||||
<result property="cardSegment" column="card_segment"/>
|
||||
<result property="frequency" column="frequency"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="scenicId" column="scenic_id"/>
|
||||
<result property="scenicName" column="scenic_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyCheckPointVo">
|
||||
select cp.id,
|
||||
cp.point_name,
|
||||
cp.free_ticket_type,
|
||||
cp.age,
|
||||
cp.card_segment,
|
||||
cp.frequency,
|
||||
cp.create_time,
|
||||
cp.create_by,
|
||||
cp.update_time,
|
||||
cp.update_by,
|
||||
cp.dept_id,
|
||||
cp.scenic_id,
|
||||
zs.scenic_name
|
||||
from zdy_check_point cp
|
||||
left join zdy_scenic zs on zs.id = cp.scenic_id
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyCheckPointList" parameterType="ZdyCheckPoint" resultMap="ZdyCheckPointResult">
|
||||
<include refid="selectZdyCheckPointVo"/>
|
||||
left join sys_dept d on d.dept_id = cp.dept_id
|
||||
<where>
|
||||
<if test="pointName != null and pointName != ''">
|
||||
and point_name like concat('%', #{pointName}, '%')
|
||||
</if>
|
||||
<if test="freeTicketType != null and freeTicketType != ''">
|
||||
and free_ticket_type = #{freeTicketType}
|
||||
</if>
|
||||
<if test="age != null ">
|
||||
and age = #{age}
|
||||
</if>
|
||||
<if test="cardSegment != null and cardSegment != ''">
|
||||
and card_segment = #{cardSegment}
|
||||
</if>
|
||||
<if test="frequency != null ">
|
||||
and frequency = #{frequency}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyCheckPointById" parameterType="Long"
|
||||
resultMap="ZdyCheckPointResult">
|
||||
<include refid="selectZdyCheckPointVo"/>
|
||||
where cp.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyCheckPoint" parameterType="ZdyCheckPoint" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_check_point
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="pointName != null">point_name,
|
||||
</if>
|
||||
<if test="freeTicketType != null">free_ticket_type,
|
||||
</if>
|
||||
<if test="age != null">age,
|
||||
</if>
|
||||
<if test="cardSegment != null">card_segment,
|
||||
</if>
|
||||
<if test="frequency != null">frequency,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id,
|
||||
</if>
|
||||
create_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="pointName != null">#{pointName},
|
||||
</if>
|
||||
<if test="freeTicketType != null">#{freeTicketType},
|
||||
</if>
|
||||
<if test="age != null">#{age},
|
||||
</if>
|
||||
<if test="cardSegment != null">#{cardSegment},
|
||||
</if>
|
||||
<if test="frequency != null">#{frequency},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
<if test="scenicId != null">#{scenicId},
|
||||
</if>
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyCheckPoint" parameterType="ZdyCheckPoint">
|
||||
update zdy_check_point
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="pointName != null">point_name =
|
||||
#{pointName},
|
||||
</if>
|
||||
<if test="freeTicketType != null">free_ticket_type =
|
||||
#{freeTicketType},
|
||||
</if>
|
||||
<if test="age != null">age =
|
||||
#{age},
|
||||
</if>
|
||||
<if test="cardSegment != null">card_segment =
|
||||
#{cardSegment},
|
||||
</if>
|
||||
<if test="frequency != null">frequency =
|
||||
#{frequency},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyCheckPointById" parameterType="Long">
|
||||
delete
|
||||
from zdy_check_point
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyCheckPointByIds" parameterType="String">
|
||||
delete from zdy_check_point where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,96 @@
|
||||
<?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.check.point.mapper.ZdyCheckPointVerifiableMapper">
|
||||
|
||||
<resultMap type="ZdyCheckPointVerifiable" id="ZdyCheckPointVerifiableResult">
|
||||
<result property="checkPointId" column="check_point_id"/>
|
||||
<result property="ticketId" column="ticket_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyCheckPointVerifiableVo">
|
||||
select check_point_id, ticket_id
|
||||
from zdy_check_point_verifiable
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyCheckPointVerifiableList" parameterType="ZdyCheckPointVerifiable" resultMap="ZdyCheckPointVerifiableResult">
|
||||
<include refid="selectZdyCheckPointVerifiableVo"/>
|
||||
<where>
|
||||
<if test="checkPointId != null ">
|
||||
and check_point_id = #{checkPointId}
|
||||
</if>
|
||||
<if test="ticketId != null ">
|
||||
and ticket_id = #{ticketId}
|
||||
</if>
|
||||
<if test="empowerFlag != null and empowerFlag != ''">
|
||||
and empower_flag = #{empowerFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyCheckPointVerifiableByCheckPointId" parameterType="Long"
|
||||
resultMap="ZdyCheckPointVerifiableResult">
|
||||
<include refid="selectZdyCheckPointVerifiableVo"/>
|
||||
where check_point_id = #{checkPointId}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyCheckPointVerifiable" parameterType="ZdyCheckPointVerifiable">
|
||||
insert into zdy_check_point_verifiable
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="checkPointId != null">check_point_id,
|
||||
</if>
|
||||
<if test="ticketId != null">ticket_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="checkPointId != null">#{checkPointId},
|
||||
</if>
|
||||
<if test="ticketId != null">#{ticketId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyCheckPointVerifiable" parameterType="ZdyCheckPointVerifiable">
|
||||
update zdy_check_point_verifiable
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="empowerFlag != null">empower_flag =
|
||||
#{empowerFlag},
|
||||
</if>
|
||||
</trim>
|
||||
where check_point_id = #{checkPointId} and ticket_id = #{ticketId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyCheckPointVerifiableByCheckPointId" parameterType="Long">
|
||||
delete from zdy_check_point_verifiable where check_point_id = #{checkPointId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyCheckPointVerifiableByCheckPointIds" parameterType="String">
|
||||
delete from zdy_check_point_verifiable where check_point_id in
|
||||
<foreach item="checkPointId" collection="array" open="(" separator="," close=")">
|
||||
#{checkPointId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="listTicketIdByCheckPointId" parameterType="java.lang.Long" resultType="java.lang.Long">
|
||||
select ticket_id
|
||||
from zdy_check_point_verifiable
|
||||
where check_point_id = #{checkPointId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByTicketIdsAndCheckPointId">
|
||||
delete from zdy_check_point_verifiable where
|
||||
check_point_id = #{checkPointId}
|
||||
and ticket_id in
|
||||
<foreach item="ticketId" collection="ticketIds" open="(" separator="," close=")">
|
||||
#{ticketId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="existZdyCheckPointVerifiable" parameterType="ZdyCheckPointVerifiable" resultType="java.lang.Integer">
|
||||
select exists(select 1
|
||||
from zdy_check_point_verifiable
|
||||
where check_point_id = #{checkPointId}
|
||||
and ticket_id = #{ticketId})
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user