支付
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.
@@ -0,0 +1,222 @@
|
||||
<?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.pointsmall.mapper.PointsMallMapper">
|
||||
|
||||
<resultMap type="PointsMallVo" id="PointsMallResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="ticketId" column="ticket_id"/>
|
||||
<result property="ticketType" column="ticket_type"/>
|
||||
<result property="points" column="points"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delistReasonType" column="delist_reason_type"/>
|
||||
<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="delFlag" column="del_flag"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="ticketName" column="ticket_name"/>
|
||||
<result property="salePrice" column="sales_rice"/>
|
||||
<result property="inventory" column="inventory"/>
|
||||
<result property="descr" column="descr"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPointsMallVo">
|
||||
select pm.id,
|
||||
pm.ticket_id,
|
||||
pm.ticket_type,
|
||||
pm.points,
|
||||
pm.status,
|
||||
pm.delist_reason_type,
|
||||
pm.create_time,
|
||||
pm.create_by,
|
||||
pm.update_time,
|
||||
pm.update_by,
|
||||
pm.del_flag,
|
||||
pm.sort,
|
||||
pm.descr,
|
||||
t.name as ticket_name,
|
||||
t.sales_rice,
|
||||
t.inventory
|
||||
from zdy_points_mall pm left join zdy_ticket t on pm.ticket_id = t.id
|
||||
</sql>
|
||||
|
||||
<select id="selectPointsMallList" parameterType="PointsMallVo" resultMap="PointsMallResult">
|
||||
<include refid="selectPointsMallVo"/>
|
||||
<where>
|
||||
and pm.del_flag = '0'
|
||||
<if test="ticketId != null ">
|
||||
and pm.ticket_id = #{ticketId}
|
||||
</if>
|
||||
<if test="ticketId != null ">
|
||||
and t.ticket_name like concat('%',#{ticketName},'%')
|
||||
</if>
|
||||
<if test="ticketType != null and ticketType != ''">
|
||||
and pm.ticket_type = #{ticketType}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and pm.status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
order by pm.sort asc,pm.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectPointsMallById" parameterType="Long"
|
||||
resultMap="PointsMallResult">
|
||||
<include refid="selectPointsMallVo"/>
|
||||
where pm.id = #{id}
|
||||
</select>
|
||||
<select id="selectPointsMallByTicketId" parameterType="Long"
|
||||
resultMap="PointsMallResult">
|
||||
<include refid="selectPointsMallVo"/>
|
||||
where pm.ticket_id = #{ticketId}
|
||||
</select>
|
||||
<select id="selectPointsMallAppList" resultType="com.zhwl.pointsmall.domain.vo.PointsMallAppList">
|
||||
SELECT
|
||||
pm.id,
|
||||
pm.ticket_id AS ticketId,
|
||||
pm.ticket_type AS ticketType,
|
||||
pm.points,
|
||||
t.name AS ticketName,
|
||||
t.image43 AS image43
|
||||
FROM
|
||||
zdy_points_mall pm
|
||||
LEFT JOIN
|
||||
zdy_ticket t ON pm.ticket_id = t.id
|
||||
LEFT JOIN
|
||||
zdy_vip_user vu ON vu.mini_program_user_id = #{userId}
|
||||
WHERE
|
||||
(#{userId} IS NULL OR pm.points >= vu.points)
|
||||
</select>
|
||||
<select id="selectPointsMallAppInfo" resultType="com.zhwl.pointsmall.domain.vo.PointsMallAppInfo">
|
||||
select pm.id,
|
||||
pm.points,
|
||||
pm.descr,
|
||||
vu.points AS userPoints
|
||||
from zdy_points_mall pm
|
||||
LEFT JOIN
|
||||
zdy_vip_user vu ON vu.mini_program_user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<insert id="insertPointsMall" parameterType="PointsMall" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zdy_points_mall
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,
|
||||
</if>
|
||||
<if test="ticketId != null">ticket_id,
|
||||
</if>
|
||||
<if test="ticketType != null and ticketType != ''">ticket_type,
|
||||
</if>
|
||||
<if test="points != null">points,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="delistReasonType != null">delist_reason_type,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="sort !=null">
|
||||
sort,
|
||||
</if>
|
||||
<if test="descr != null">descr,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},
|
||||
</if>
|
||||
<if test="ticketId != null">#{ticketId},
|
||||
</if>
|
||||
<if test="ticketType != null and ticketType != ''">#{ticketType},
|
||||
</if>
|
||||
<if test="points != null">#{points},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="delistReasonType != null">#{delistReasonType},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="sort !=null">
|
||||
#{sort},
|
||||
</if>
|
||||
<if test="descr != null">#{descr},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<sql id="updatePointsMallSql">
|
||||
update zdy_points_mall
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="ticketId != null">ticket_id =
|
||||
#{ticketId},
|
||||
</if>
|
||||
<if test="ticketType != null and ticketType != ''">ticket_type =
|
||||
#{ticketType},
|
||||
</if>
|
||||
<if test="points != null">points =
|
||||
#{points},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="delistReasonType != null">delist_reason_type =
|
||||
#{delistReasonType},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag =
|
||||
#{delFlag},
|
||||
</if>
|
||||
<if test="sort !=null">
|
||||
sort =#{sort},
|
||||
</if>
|
||||
<if test="descr != null">descr =
|
||||
#{descr},
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
<update id="updatePointsMall" parameterType="PointsMall">
|
||||
<include refid="updatePointsMallSql"/>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updatePointsMallByTicketId">
|
||||
<include refid="updatePointsMallSql"/>
|
||||
where ticket_id = #{ticketId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePointsMallById" parameterType="Long">
|
||||
update zdy_points_mall set del_flag = '2'
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePointsMallByIds" parameterType="String">
|
||||
update zdy_points_mall set del_flag='2' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,174 @@
|
||||
<?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.pointsmall.mapper.PointsRedeemLogMapper">
|
||||
|
||||
<resultMap type="PointsRedeemLog" id="PointsRedeemLogResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="ticketId" column="ticket_id"/>
|
||||
<result property="ticketNameOrder" column="ticket_name_order"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="orderCode" column="order_code"/>
|
||||
<result property="ticketType" column="ticket_type"/>
|
||||
<result property="points" column="points"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="nickname" column="nickname"/>
|
||||
<result property="buyQuantity" column="buy_quantity"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPointsRedeemLogVo">
|
||||
select id,
|
||||
ticket_id,
|
||||
ticket_name_order,
|
||||
order_id,
|
||||
order_code,
|
||||
ticket_type,
|
||||
points,
|
||||
create_time,
|
||||
user_id,
|
||||
nickname,
|
||||
buy_quantity
|
||||
from zdy_points_redeem_log
|
||||
</sql>
|
||||
|
||||
<select id="selectPointsRedeemLogList" parameterType="PointsRedeemLog" resultMap="PointsRedeemLogResult">
|
||||
<include refid="selectPointsRedeemLogVo"/>
|
||||
<where>
|
||||
<if test="ticketId != null ">
|
||||
and ticket_id = #{ticketId}
|
||||
</if>
|
||||
<if test="ticketNameOrder != null and ticketNameOrder != ''">
|
||||
and ticket_name_order = #{ticketNameOrder}
|
||||
</if>
|
||||
<if test="orderId != null ">
|
||||
and order_id = #{orderId}
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
and order_code = #{orderCode}
|
||||
</if>
|
||||
<if test="ticketType != null and ticketType != ''">
|
||||
and ticket_type = #{ticketType}
|
||||
</if>
|
||||
<if test="points != null ">
|
||||
and points = #{points}
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="nickname != null and nickname != ''">
|
||||
and nickname like concat('%', #{nickname}, '%')
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectPointsRedeemLogById" parameterType="Long"
|
||||
resultMap="PointsRedeemLogResult">
|
||||
<include refid="selectPointsRedeemLogVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPointsRedeemLog" parameterType="PointsRedeemLog" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zdy_points_redeem_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,
|
||||
</if>
|
||||
<if test="ticketId != null">ticket_id,
|
||||
</if>
|
||||
<if test="ticketNameOrder != null and ticketNameOrder != ''">ticket_name_order,
|
||||
</if>
|
||||
<if test="orderId != null">order_id,
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">order_code,
|
||||
</if>
|
||||
<if test="ticketType != null and ticketType != ''">ticket_type,
|
||||
</if>
|
||||
<if test="points != null">points,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="userId != null">user_id,
|
||||
</if>
|
||||
<if test="nickname != null and nickname != ''">nickname,
|
||||
</if>
|
||||
<if test="buyQuantity != null">buy_quantity,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},
|
||||
</if>
|
||||
<if test="ticketId != null">#{ticketId},
|
||||
</if>
|
||||
<if test="ticketNameOrder != null and ticketNameOrder != ''">#{ticketNameOrder},
|
||||
</if>
|
||||
<if test="orderId != null">#{orderId},
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">#{orderCode},
|
||||
</if>
|
||||
<if test="ticketType != null and ticketType != ''">#{ticketType},
|
||||
</if>
|
||||
<if test="points != null">#{points},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="userId != null">#{userId},
|
||||
</if>
|
||||
<if test="nickname != null and nickname != ''">#{nickname},
|
||||
</if>
|
||||
<if test="buyQuantity != null">#{buyQuantity},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePointsRedeemLog" parameterType="PointsRedeemLog">
|
||||
update zdy_points_redeem_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="ticketId != null">ticket_id =
|
||||
#{ticketId},
|
||||
</if>
|
||||
<if test="ticketNameOrder != null and ticketNameOrder != ''">ticket_name_order =
|
||||
#{ticketNameOrder},
|
||||
</if>
|
||||
<if test="orderId != null">order_id =
|
||||
#{orderId},
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">order_code =
|
||||
#{orderCode},
|
||||
</if>
|
||||
<if test="ticketType != null and ticketType != ''">ticket_type =
|
||||
#{ticketType},
|
||||
</if>
|
||||
<if test="points != null">points =
|
||||
#{points},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="userId != null">user_id =
|
||||
#{userId},
|
||||
</if>
|
||||
<if test="nickname != null and nickname != ''">nickname =
|
||||
#{nickname},
|
||||
</if>
|
||||
<if test="buyQuantity != null">buy_quantity =
|
||||
#{buyQuantity},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePointsRedeemLogById" parameterType="Long">
|
||||
delete
|
||||
from zdy_points_redeem_log
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePointsRedeemLogByIds" parameterType="String">
|
||||
delete from zdy_points_redeem_log where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user