perf:拉取芬玩岛数据信息,更新座位信息
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql:///xservice-script?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
|
||||
url: jdbc:mysql://120.27.153.87:3306/xservice-script-test?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
|
||||
username: root
|
||||
password: 12345678
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
@@ -0,0 +1,273 @@
|
||||
<?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.xiang.xservice.fwd.mapper.FwdPerformSeatInfoMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xiang.xservice.fwd.entity.pojo.FPerformSeatInfo" >
|
||||
<result column="id" property="id"/>
|
||||
<result column="seat_plan_id" property="seatPlanId" />
|
||||
<result column="seat_plan_name" property="seatPlanName" />
|
||||
<result column="perform_id" property="performId" />
|
||||
<result column="perform_name" property="performName" />
|
||||
<result column="stop_sale" property="stopSale" />
|
||||
<result column="shelf_status" property="shelfStatus" />
|
||||
<result column="price" property="price" />
|
||||
<result column="discount_price" property="discountPrice" />
|
||||
<result column="sub_status" property="subStatus" />
|
||||
<result column="quantity" property="quantity" />
|
||||
<result column="status" property="status" />
|
||||
<result column="max_sell_stock" property="maxSellStock" />
|
||||
<result column="sold_stock" property="soldStock" />
|
||||
<result column="left_stock" property="leftStock" />
|
||||
<result column="able_sale_quantity" property="ableSaleQuantity" />
|
||||
<result column="ash_show" property="ashShow" />
|
||||
<result column="ash_show_desc" property="ashShowDesc" />
|
||||
<result column="selectable" property="selectable" />
|
||||
<result column="display" property="display" />
|
||||
<result column="available_ticket_quantity" property="availableTicketQuantity" />
|
||||
<result column="available_all_ticket_quantity" property="availableAllTicketQuantity" />
|
||||
<result column="sale_time" property="saleTime" />
|
||||
<result column="project_id" property="projectId" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, seat_plan_id,
|
||||
seat_plan_name,
|
||||
perform_id,
|
||||
perform_name,
|
||||
stop_sale,
|
||||
shelf_status,
|
||||
price,
|
||||
discount_price,
|
||||
sub_status,
|
||||
quantity,
|
||||
status,
|
||||
max_sell_stock,
|
||||
sold_stock,
|
||||
left_stock,
|
||||
able_sale_quantity,
|
||||
ash_show,
|
||||
ash_show_desc,
|
||||
selectable,
|
||||
display,
|
||||
available_ticket_quantity,
|
||||
available_all_ticket_quantity,
|
||||
sale_time,
|
||||
project_id
|
||||
</sql>
|
||||
|
||||
<insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.xiang.xservice.fwd.entity.pojo.FPerformSeatInfo">
|
||||
INSERT INTO fwd_perform_seat_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="null != seatPlanId ">
|
||||
seat_plan_id,
|
||||
</if>
|
||||
<if test="null != seatPlanName ">
|
||||
seat_plan_name,
|
||||
</if>
|
||||
<if test="null != performId ">
|
||||
perform_id,
|
||||
</if>
|
||||
<if test="null != performName and '' != performName">
|
||||
perform_name,
|
||||
</if>
|
||||
<if test="null != stopSale ">
|
||||
stop_sale,
|
||||
</if>
|
||||
<if test="null != shelfStatus ">
|
||||
shelf_status,
|
||||
</if>
|
||||
<if test="null != price ">
|
||||
price,
|
||||
</if>
|
||||
<if test="null != discountPrice ">
|
||||
discount_price,
|
||||
</if>
|
||||
<if test="null != subStatus ">
|
||||
sub_status,
|
||||
</if>
|
||||
<if test="null != quantity ">
|
||||
quantity,
|
||||
</if>
|
||||
<if test="null != status ">
|
||||
status,
|
||||
</if>
|
||||
<if test="null != maxSellStock ">
|
||||
max_sell_stock,
|
||||
</if>
|
||||
<if test="null != soldStock ">
|
||||
sold_stock,
|
||||
</if>
|
||||
<if test="null != leftStock ">
|
||||
left_stock,
|
||||
</if>
|
||||
<if test="null != ableSaleQuantity ">
|
||||
able_sale_quantity,
|
||||
</if>
|
||||
<if test="null != ashShow ">
|
||||
ash_show,
|
||||
</if>
|
||||
<if test="null != ashShowDesc ">
|
||||
ash_show_desc,
|
||||
</if>
|
||||
<if test="null != selectable ">
|
||||
selectable,
|
||||
</if>
|
||||
<if test="null != display ">
|
||||
display,
|
||||
</if>
|
||||
<if test="null != availableTicketQuantity ">
|
||||
available_ticket_quantity,
|
||||
</if>
|
||||
<if test="null != availableAllTicketQuantity ">
|
||||
available_all_ticket_quantity,
|
||||
</if>
|
||||
<if test="null != saleTime ">
|
||||
sale_time,
|
||||
</if>
|
||||
<if test="null != projectId ">
|
||||
project_id
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="null != seatPlanId ">
|
||||
#{seatPlanId},
|
||||
</if>
|
||||
<if test="null != seatPlanName ">
|
||||
#{seatPlanName},
|
||||
</if>
|
||||
<if test="null != performId ">
|
||||
#{performId},
|
||||
</if>
|
||||
<if test="null != performName and '' != performName">
|
||||
#{performName},
|
||||
</if>
|
||||
<if test="null != stopSale ">
|
||||
#{stopSale},
|
||||
</if>
|
||||
<if test="null != shelfStatus ">
|
||||
#{shelfStatus},
|
||||
</if>
|
||||
<if test="null != price ">
|
||||
#{price},
|
||||
</if>
|
||||
<if test="null != discountPrice ">
|
||||
#{discountPrice},
|
||||
</if>
|
||||
<if test="null != subStatus ">
|
||||
#{subStatus},
|
||||
</if>
|
||||
<if test="null != quantity ">
|
||||
#{quantity},
|
||||
</if>
|
||||
<if test="null != status ">
|
||||
#{status},
|
||||
</if>
|
||||
<if test="null != maxSellStock ">
|
||||
#{maxSellStock},
|
||||
</if>
|
||||
<if test="null != soldStock ">
|
||||
#{soldStock},
|
||||
</if>
|
||||
<if test="null != leftStock ">
|
||||
#{leftStock},
|
||||
</if>
|
||||
<if test="null != ableSaleQuantity ">
|
||||
#{ableSaleQuantity},
|
||||
</if>
|
||||
<if test="null != ashShow ">
|
||||
#{ashShow},
|
||||
</if>
|
||||
<if test="null != ashShowDesc ">
|
||||
#{ashShowDesc},
|
||||
</if>
|
||||
<if test="null != selectable ">
|
||||
#{selectable},
|
||||
</if>
|
||||
<if test="null != display ">
|
||||
#{display},
|
||||
</if>
|
||||
<if test="null != availableTicketQuantity ">
|
||||
#{availableTicketQuantity},
|
||||
</if>
|
||||
<if test="null != availableAllTicketQuantity ">
|
||||
#{availableAllTicketQuantity},
|
||||
</if>
|
||||
<if test="null != saleTime ">
|
||||
#{saleTime},
|
||||
</if>
|
||||
<if test="null != projectId ">
|
||||
#{projectId}
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchSave">
|
||||
INSERT INTO fwd_perform_seat_info
|
||||
(
|
||||
seat_plan_id, seat_plan_name, perform_id, perform_name, stop_sale,
|
||||
shelf_status, price, discount_price, sub_status, quantity,
|
||||
status, max_sell_stock, sold_stock, left_stock, able_sale_quantity,
|
||||
ash_show, ash_show_desc, selectable, display,
|
||||
available_ticket_quantity, available_all_ticket_quantity,
|
||||
sale_time, project_id
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.seatPlanId}, #{item.seatPlanName}, #{item.performId}, #{item.performName}, #{item.stopSale},
|
||||
#{item.shelfStatus}, #{item.price}, #{item.discountPrice}, #{item.subStatus}, #{item.quantity},
|
||||
#{item.status}, #{item.maxSellStock}, #{item.soldStock}, #{item.leftStock}, #{item.ableSaleQuantity},
|
||||
#{item.ashShow}, #{item.ashShowDesc}, #{item.selectable}, #{item.display},
|
||||
#{item.availableTicketQuantity}, #{item.availableAllTicketQuantity},
|
||||
#{item.saleTime}, #{item.projectId}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="update" parameterType="com.xiang.xservice.fwd.entity.pojo.FPerformSeatInfo">
|
||||
UPDATE fwd_perform_seat_info
|
||||
<set>
|
||||
<if test="null != seatPlanId ">seat_plan_id = #{seatPlanId},</if>
|
||||
<if test="null != seatPlanName ">seat_plan_name = #{seatPlanName},</if>
|
||||
<if test="null != performId ">perform_id = #{performId},</if>
|
||||
<if test="null != performName and '' != performName">perform_name = #{performName},</if>
|
||||
<if test="null != stopSale ">stop_sale = #{stopSale},</if>
|
||||
<if test="null != shelfStatus ">shelf_status = #{shelfStatus},</if>
|
||||
<if test="null != price ">price = #{price},</if>
|
||||
<if test="null != discountPrice ">discount_price = #{discountPrice},</if>
|
||||
<if test="null != subStatus ">sub_status = #{subStatus},</if>
|
||||
<if test="null != quantity ">quantity = #{quantity},</if>
|
||||
<if test="null != status ">status = #{status},</if>
|
||||
<if test="null != maxSellStock ">max_sell_stock = #{maxSellStock},</if>
|
||||
<if test="null != soldStock ">sold_stock = #{soldStock},</if>
|
||||
<if test="null != leftStock ">left_stock = #{leftStock},</if>
|
||||
<if test="null != ableSaleQuantity ">able_sale_quantity = #{ableSaleQuantity},</if>
|
||||
<if test="null != ashShow ">ash_show = #{ashShow},</if>
|
||||
<if test="null != ashShowDesc ">ash_show_desc = #{ashShowDesc},</if>
|
||||
<if test="null != selectable ">selectable = #{selectable},</if>
|
||||
<if test="null != display ">display = #{display},</if>
|
||||
<if test="null != availableTicketQuantity ">available_ticket_quantity = #{availableTicketQuantity},</if>
|
||||
<if test="null != availableAllTicketQuantity ">available_all_ticket_quantity = #{availableAllTicketQuantity},</if>
|
||||
<if test="null != saleTime ">sale_time = #{saleTime},</if>
|
||||
<if test="null != projectId ">project_id = #{projectId}</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<select id="getPerformSeatInfoBySeatIds" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from fwd_perform_seat_info
|
||||
where seat_plan_id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getPerformSeatInfoBySeatIdAndPerformIdAndProjectId"
|
||||
resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from fwd_perform_seat_info
|
||||
where seat_plan_id = #{seatId} and perform_id = #{performId} and project_id = #{projectId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user