3달간 수정 사항

This commit is contained in:
comicgum
2026-09-04 23:52:28 +09:00
parent d26eb50875
commit 4187407e96
110 changed files with 4439 additions and 2456 deletions
@@ -7,11 +7,11 @@
<select id="selectTransaction" resultType="map">
SELECT
<choose>
<when test="isCount == true">
<when test='isCount == true'>
COUNT(*)
</when>
<otherwise>
T.reg_time, T.order_time, T.amount, T.type, T.approval, T.uid1, T.pay_name, T.pay_vendor, T.slot, T.code, T.goods_name, T.pay_unique_num, T.order_time
T.reg_time, T.order_time, T.amount, T.type, T.approval, T.uid1, T.pay_name, T.pay_vendor, T.column_no, T.code, T.goods_name, T.pay_unique_num, T.order_time
</otherwise>
</choose>
FROM transactions AS T
@@ -19,23 +19,23 @@
JOIN terminal_biz_group TBG ON TBG.terminal_id = T2.terminal_id
JOIN biz_group AS BG ON BG.biz_group_id = TBG.biz_group_id
WHERE ( TBG.biz_group_id = #{biz_group_id}
<if test="is_group_access == false">
<if test='is_group_access == false'>
OR BG.top_group_id = #{biz_group_id}
</if>
)
<if test="date_end != null and date_end != ''">
<if test='date_end != null and date_end != ""'>
AND DATE(T.reg_time) &lt;= #{date_end}
</if>
<if test="uid1 != null and uid1 != ''">
<if test='uid1 != null and uid1 != ""'>
AND T.uid1 = #{uid1}
</if>
<if test="isCount == false">
<if test='isCount == false'>
ORDER BY T.transaction_id DESC LIMIT #{limit} OFFSET #{offset}
</if>
</select>
-->
<select id="selectTransaction" resultType="map">
<if test="is_group_access == false">
<if test='is_group_access == false'>
WITH target_group AS (
WITH RECURSIVE group_tree AS (
SELECT
@@ -59,35 +59,38 @@
</if>
SELECT
<choose>
<when test="isCount == true">
<when test='isCount == true'>
COUNT(*)
</when>
<otherwise>
T.reg_time, T.order_time, T.amount, T.type, T.approval, T.uid1, T.pay_name, T.pay_vendor, T.slot, T.code, T.goods_name, T.pay_unique_num, T.order_time
T.reg_time, T.order_time, D.name AS device_name, T.amount, T.type, T.approval, T.uid1, T.pay_name, T.pay_vendor, T.column_no, T.code, T.goods_name, T.pay_unique_num, T.order_time
</otherwise>
</choose>
FROM transactions AS T
JOIN device D ON T.device_id = D.device_id
WHERE
<choose>
<when test="is_group_access == false">
<when test='is_group_access == false'>
T.biz_group_id IN ( SELECT biz_group_id FROM target_group )
</when>
<otherwise>
T.biz_group_id = #{biz_group_id}
</otherwise>
</choose>
<if test="date_start != null and date_start != ''">AND #{date_start} &lt;= DATE(T.reg_time)</if>
<if test="date_end != null and date_end != ''">AND DATE(T.reg_time) &lt;= #{date_end}</if>
<if test="uid1 != null and uid1 != ''">AND T.uid1 = #{uid1}</if>
<if test="uid1_type != null and uid1_type != 0">AND T.uid1_type = #{uid1_type}</if>
<if test="type != null and type != ''">AND T.type = #{type}</if>
<if test="amount != null and amount != 0">AND T.amount = #{amount}</if>
<if test="approval != null and approval != ''">AND T.approval = #{approval}</if>
<if test="slot != null and slot != ''">AND T.slot = #{slot}</if>
<if test="code != null and code != ''">AND T.code = #{code}</if>
<if test="goods_name != null and goods_name != ''">AND T.goods_name = #{goods_name}</if>
<if test="pay_vendor != null and pay_vendor != ''">AND T.pay_vendor = #{pay_vendor}</if>
<if test="isCount == false and is_excel == false">
<if test='date_start != null and date_start != ""'>AND #{date_start} &lt;= DATE(T.reg_time)</if>
<if test='date_end != null and date_end != ""'>AND DATE(T.reg_time) &lt;= #{date_end}</if>
<if test='device_name != null and device_name != ""'>AND D.name like CONCAT('%', #{device_name}, '%')</if>
<if test='uid1 != null and uid1 != ""'>AND T.uid1 = #{uid1}</if>
<if test='uid1_type != null and uid1_type != 0'>AND T.uid1_type = #{uid1_type}</if>
<if test='type != null and type != ""'>AND T.type = #{type}</if>
<if test='amount != null and amount != 0'>AND T.amount = #{amount}</if>
<if test='approval != null and approval != ""'>AND T.approval = #{approval}</if>
<if test='column_no != null and column_no != ""'>AND T.column_no = #{column_no}</if>
<if test='code != null and code != ""'>AND T.code = #{code}</if>
<if test='goods_name != null and goods_name != ""'>AND T.goods_name like CONCAT('%', #{goods_name}, '%')</if>
<if test='pay_name != null and pay_name != ""'>AND T.pay_name like CONCAT('%', #{pay_name}, '%')</if>
<if test='pay_vendor != null and pay_vendor != ""'>AND T.pay_vendor like CONCAT('%', #{pay_vendor}, '%')</if>
<if test='isCount == false and is_excel == false'>
ORDER BY T.transaction_id DESC LIMIT #{limit} OFFSET #{offset}
</if>
</select>
@@ -95,30 +98,31 @@
<select id="selectTransactionBizGroup0" resultType="map">
SELECT
<choose>
<when test="isCount == true">
<when test='isCount == true'>
COUNT(*)
</when>
<otherwise>
T.reg_time, T.order_time, T.amount, T.type, T.approval, T.uid1, T.pay_name, T.pay_vendor, T.slot, T.code, T.goods_name, T.pay_unique_num, T.order_time
T.reg_time, T.order_time, T.amount, T.type, T.approval, T.uid1, T.pay_name, T.pay_vendor, T.column_no, T.code, T.goods_name, T.pay_unique_num, T.order_time
</otherwise>
</choose>
FROM transactions AS T
WHERE biz_group_id = 0
<if test="date_end != null and date_end != ''">
<if test='date_end != null and date_end != ""'>
AND DATE(T.reg_time) &lt;= #{date_end}
</if>
<if test="date_start != null and date_start != ''">AND #{date_start} &lt;= DATE(T.reg_time)</if>
<if test="date_end != null and date_end != ''">AND DATE(T.reg_time) &lt;= #{date_end}</if>
<if test="uid1 != null and uid1 != ''">AND T.uid1 = #{uid1}</if>
<if test="uid1_type != null and uid1_type != 0">AND T.uid1_type = #{uid1_type}</if>
<if test="type != null and type != ''">AND T.type = #{type}</if>
<if test="amount != null and amount != 0">AND T.amount = #{amount}</if>
<if test="approval != null and approval != ''">AND T.approval = #{approval}</if>
<if test="slot != null and slot != ''">AND T.slot = #{slot}</if>
<if test="code != null and code != ''">AND T.code = #{code}</if>
<if test="goods_name != null and goods_name != ''">AND T.goods_name = #{goods_name}</if>
<if test="pay_vendor != null and pay_vendor != ''">AND T.pay_vendor = #{pay_vendor}</if>
<if test="isCount == false and is_excel == false">
<if test='date_start != null and date_start != ""'>AND #{date_start} &lt;= DATE(T.reg_time)</if>
<if test='date_end != null and date_end != ""'>AND DATE(T.reg_time) &lt;= #{date_end}</if>
<if test='uid1 != null and uid1 != ""'>AND T.uid1 = #{uid1}</if>
<if test='uid1_type != null and uid1_type != 0'>AND T.uid1_type = #{uid1_type}</if>
<if test='type != null and type != ""'>AND T.type = #{type}</if>
<if test='amount != null and amount != 0'>AND T.amount = #{amount}</if>
<if test='approval != null and approval != ""'>AND T.approval = #{approval}</if>
<if test='column_no != null and column_no != ""'>AND T.column_no = #{column_no}</if>
<if test='code != null and code != ""'>AND T.code = #{code}</if>
<if test='goods_name != null and goods_name != ""'>AND T.goods_name like CONCAT('%', #{goods_name}, '%')</if>
<if test='pay_name != null and pay_name != ""'>AND T.pay_name like CONCAT('%', #{pay_name}, '%')</if>
<if test='pay_vendor != null and pay_vendor != ""'>AND T.pay_vendor like CONCAT('%', #{pay_vendor}, '%')</if>
<if test='isCount == false and is_excel == false'>
ORDER BY T.transaction_id DESC LIMIT #{limit} OFFSET #{offset}
</if>
</select>
@@ -127,7 +131,7 @@
<select id="selectTransaction3" resultType="map">
SELECT
<choose>
<when test="isCount == true">
<when test='isCount == true'>
COUNT(*)
</when>
<otherwise>
@@ -152,24 +156,170 @@
JOIN device_biz_group DBG ON DBG.device_id = D.device_id
JOIN biz_group AS BG ON BG.biz_group_id = DBG.biz_group_id
WHERE ( DBG.biz_group_id = #{biz_group_id}
<if test="is_group_access == false">
<if test='is_group_access == false'>
OR BG.top_group_id = #{biz_group_id}
</if>
)
<if test="date_end != null and date_end != ''">
<if test='date_end != null and date_end != ""'>
AND DATE(T.reg_time) &lt;= #{date_end}
</if>
<if test="uid1 != null and uid1 != ''">
<if test='uid1 != null and uid1 != ""'>
AND TER.uid1 = #{uid1}
</if>
GROUP BY DATE_FORMAT(STR_TO_DATE(T.order_time, '%y%m%d%H%i%s'), '%Y-%m-%d'), D.name, TER.uid1
<if test="isCount == false">
<if test='isCount == false'>
ORDER BY date, D.name;
</if>
</select>
-->
<select id="selectTransaction3" resultType="map">
<if test="is_group_access == false">
<if test='is_group_access == false'>
WITH target_group AS (
WITH RECURSIVE group_tree AS (
SELECT
BG1.biz_group_id,
1 AS depth
FROM biz_group BG1
WHERE BG1.state != 2 AND BG1.biz_group_id = #{biz_group_id}
UNION ALL
SELECT
BG2.biz_group_id,
GT.depth + 1
FROM biz_group BG2
INNER JOIN group_tree GT ON BG2.pid = GT.biz_group_id
WHERE BG2.state != 2 AND GT.depth &lt; 10
)
SELECT biz_group_id
FROM group_tree
)
</if>
<choose>
<when test='isCount == true'>
SELECT COUNT(*) AS total_count
FROM (
SELECT 1
</when>
<otherwise>
SELECT
<choose>
<when test='date_type == 2'>DATE_FORMAT(T.reg_time, '%Y-%m')</when>
<otherwise>DATE_FORMAT(T.reg_time, '%Y-%m-%d')</otherwise>
</choose> AS date,
<if test='query_uid1 == true'>
D.name AS device_name, T.uid1 AS uid1,
</if>
/* 카드 */
COUNT(CASE WHEN
<choose>
<when test='approval_type == 0'>T.type IN ('D1','D4','I1','I4')</when>
<when test='approval_type == 1'>T.type IN ('D1','I1')</when>
<when test='approval_type == 2'>T.type IN ('D4','I4')</when>
</choose>
THEN 1 END) AS card_count,
SUM(CASE WHEN
<choose>
<when test='approval_type == 0'>T.type IN ('D1','D4','I1','I4')</when>
<when test='approval_type == 1'>T.type IN ('D1','I1')</when>
<when test='approval_type == 2'>T.type IN ('D4','I4')</when>
</choose>
THEN T.amount ELSE 0 END) AS card_amount,
/* 현금 */
COUNT(CASE WHEN
<choose>
<when test='approval_type == 0'>T.type IN ('B1','B4')</when>
<when test='approval_type == 1'>T.type IN ('B1')</when>
<when test='approval_type == 2'>T.type IN ('B4')</when>
</choose>
THEN 1 END) AS cash_count,
SUM(CASE WHEN
<choose>
<when test='approval_type == 0'>T.type IN ('B1','B4')</when>
<when test='approval_type == 1'>T.type IN ('B1')</when>
<when test='approval_type == 2'>T.type IN ('B4')</when>
</choose>
THEN T.amount ELSE 0 END) AS cash_amount,
/* T머니 */
COUNT(CASE WHEN
<choose>
<when test='approval_type == 0'>T.type IN ('TM1','TM4')</when>
<when test='approval_type == 1'>T.type IN ('TM1')</when>
<when test='approval_type == 2'>T.type IN ('TM4')</when>
</choose>
THEN 1 END) AS tmoney_count,
SUM(CASE WHEN
<choose>
<when test='approval_type == 0'>T.type IN ('TM1','TM4')</when>
<when test='approval_type == 1'>T.type IN ('TM1')</when>
<when test='approval_type == 2'>T.type IN ('TM4')</when>
</choose>
THEN T.amount ELSE 0 END) AS tmoney_amount,
/* 캐시비 */
COUNT(CASE WHEN
<choose>
<when test='approval_type == 0'>T.type IN ('EB1','EB4')</when>
<when test='approval_type == 1'>T.type IN ('EB1')</when>
<when test='approval_type == 2'>T.type IN ('EB4')</when>
</choose>
THEN 1 END) AS cbee_count,
SUM(CASE WHEN
<choose>
<when test='approval_type == 0'>T.type IN ('EB1','EB4')</when>
<when test='approval_type == 1'>T.type IN ('EB1')</when>
<when test='approval_type == 2'>T.type IN ('EB4')</when>
</choose>
THEN T.amount ELSE 0 END) AS cbee_amount,
/* 합계 */
(
SUM(CASE WHEN T.type IN ('D1','D4','I1','I4') THEN T.amount ELSE 0 END) +
SUM(CASE WHEN T.type IN ('B1','B4') THEN T.amount ELSE 0 END) +
SUM(CASE WHEN T.type IN ('TM1','TM4') THEN T.amount ELSE 0 END) +
SUM(CASE WHEN T.type IN ('EB1','EB4') THEN T.amount ELSE 0 END)
) AS total
</otherwise>
</choose>
FROM transactions AS T
JOIN device D ON D.device_id = T.device_id
WHERE
<choose>
<when test='is_group_access == false'>
T.biz_group_id IN ( SELECT biz_group_id FROM target_group )
</when>
<otherwise>
T.biz_group_id = #{biz_group_id}
</otherwise>
</choose>
<if test='date_start != null and date_start != ""'>AND #{date_start} &lt;= DATE(T.reg_time)</if>
<if test='date_end != null and date_end != ""'>AND DATE(T.reg_time) &lt;= #{date_end}</if>
<if test='device_name != null and device_name != ""'>AND D.name like CONCAT('%', #{device_name}, '%')</if>
<if test='uid1 != null and uid1 != ""'>AND T.uid1 = #{uid1}</if>
GROUP BY
<choose>
<when test='date_type == 2'>DATE_FORMAT(T.reg_time, '%Y-%m')</when>
<otherwise>DATE_FORMAT(T.reg_time, '%Y-%m-%d')</otherwise>
</choose>
<if test='query_uid1 == true'>, D.name, T.uid1</if>
<choose>
<when test='isCount == true'>
HAVING COUNT(CASE WHEN T.type IN ('D1','D4','I1','I4','B1','B4','TM1','TM4','EB1','EB4') THEN 1 END) != 0
) AS counted
</when>
<otherwise>
<if test='isCount == false and is_excel == false'>
HAVING card_count != 0 OR cash_count != 0 OR tmoney_count != 0 OR cbee_count != 0
ORDER BY date DESC LIMIT #{limit} OFFSET #{offset}
</if>
</otherwise>
</choose>
</select>
<select id="selectTransactionSum" resultType="map">
<if test='is_group_access == false'>
WITH target_group AS (
WITH RECURSIVE group_tree AS (
SELECT
@@ -192,162 +342,84 @@
)
</if>
SELECT
<choose>
<when test="date_type == 2">DATE_FORMAT(T.reg_time, '%Y-%m')</when>
<otherwise>DATE_FORMAT(T.reg_time, '%Y-%m-%d')</otherwise>
</choose> AS date,
D.name AS device_name,
T.uid1 AS uid1,
/* 카드 */
COUNT(CASE
WHEN
<choose>
<when test="approval_type == 0">T.type IN ('D1','D4','I1','I4')</when>
<when test="approval_type == 1">T.type IN ('D1','I1')</when>
<when test="approval_type == 2">T.type IN ('D4','I4')</when>
</choose>
THEN 1 END) AS card_count,
SUM(CASE
WHEN
<choose>
<when test="approval_type == 0">T.type IN ('D1','D4','I1','I4')</when>
<when test="approval_type == 1">T.type IN ('D1','I1')</when>
<when test="approval_type == 2">T.type IN ('D4','I4')</when>
</choose>
THEN T.amount ELSE 0 END) AS card_amount,
SUM(T.type IN ('D1','D4','I1','I4')) AS card_count,
IFNULL(SUM(CASE WHEN T.type IN ('D1','D4','I1','I4') THEN T.amount ELSE 0 END), 0) AS card_amount,
/* 현금 */
COUNT(CASE
WHEN
<choose>
<when test="approval_type == 0">T.type IN ('B1','B4')</when>
<when test="approval_type == 1">T.type IN ('B1')</when>
<when test="approval_type == 2">T.type IN ('B4')</when>
</choose>
THEN 1 END) AS cash_count,
SUM(CASE
WHEN
<choose>
<when test="approval_type == 0">T.type IN ('B1','B4')</when>
<when test="approval_type == 1">T.type IN ('B1')</when>
<when test="approval_type == 2">T.type IN ('B4')</when>
</choose>
THEN T.amount ELSE 0 END) AS cash_amount,
SUM(T.type IN ('B1','B4')) AS cash_count,
IFNULL(SUM(CASE WHEN T.type IN ('B1','B4') THEN T.amount ELSE 0 END), 0) AS cash_amount,
/* T머니 */
COUNT(CASE
WHEN
<choose>
<when test="approval_type == 0">T.type IN ('TM1','TM4')</when>
<when test="approval_type == 1">T.type IN ('TM1')</when>
<when test="approval_type == 2">T.type IN ('TM4')</when>
</choose>
THEN 1 END) AS tmoney_count,
SUM(CASE
WHEN
<choose>
<when test="approval_type == 0">T.type IN ('TM1','TM4')</when>
<when test="approval_type == 1">T.type IN ('TM1')</when>
<when test="approval_type == 2">T.type IN ('TM4')</when>
</choose>
THEN T.amount ELSE 0 END) AS tmoney_amount,
SUM(T.type IN ('TM1','TM4')) AS tmoney_count,
IFNULL(SUM(CASE WHEN T.type IN ('TM1','TM4') THEN T.amount ELSE 0 END), 0) AS tmoney_amount,
/* 캐시비 */
COUNT(CASE
WHEN
<choose>
<when test="approval_type == 0">T.type IN ('EB1','EB4')</when>
<when test="approval_type == 1">T.type IN ('EB1')</when>
<when test="approval_type == 2">T.type IN ('EB4')</when>
</choose>
THEN 1 END) AS cbee_count,
SUM(CASE
WHEN
<choose>
<when test="approval_type == 0">T.type IN ('EB1','EB4')</when>
<when test="approval_type == 1">T.type IN ('EB1')</when>
<when test="approval_type == 2">T.type IN ('EB4')</when>
</choose>
THEN T.amount ELSE 0 END) AS cbee_amount,
SUM(T.type IN ('EB1','EB4')) AS cbee_count,
IFNULL(SUM(CASE WHEN T.type IN ('EB1','EB4') THEN T.amount ELSE 0 END), 0) AS cbee_amount,
/* 합계 */
(
SUM(CASE WHEN T.type IN ('D1','D4','I1','I4') THEN T.amount ELSE 0 END) +
SUM(CASE WHEN T.type IN ('B1','B4') THEN T.amount ELSE 0 END) +
SUM(CASE WHEN T.type IN ('TM1','TM4') THEN T.amount ELSE 0 END) +
SUM(CASE WHEN T.type IN ('EB1','EB4') THEN T.amount ELSE 0 END)
IFNULL(SUM(CASE WHEN T.type IN ('D1','D4','I1','I4') THEN T.amount ELSE 0 END), 0) +
IFNULL(SUM(CASE WHEN T.type IN ('B1','B4') THEN T.amount ELSE 0 END), 0) +
IFNULL(SUM(CASE WHEN T.type IN ('TM1','TM4') THEN T.amount ELSE 0 END), 0) +
IFNULL(SUM(CASE WHEN T.type IN ('EB1','EB4') THEN T.amount ELSE 0 END), 0)
) AS total
FROM transactions AS T
JOIN device D ON D.device_id = T.device_id
WHERE
<choose>
<when test="is_group_access == false">
<when test='is_group_access == false'>
T.biz_group_id IN ( SELECT biz_group_id FROM target_group )
</when>
<otherwise>
T.biz_group_id = #{biz_group_id}
</otherwise>
</choose>
<if test="date_start != null and date_start != ''">AND #{date_start} &lt;= DATE(T.reg_time)</if>
<if test="date_end != null and date_end != ''">AND DATE(T.reg_time) &lt;= #{date_end}</if>
GROUP BY
<choose>
<when test="date_type == 2">DATE_FORMAT(T.reg_time, '%Y-%m')</when>
<otherwise>DATE_FORMAT(T.reg_time, '%Y-%m-%d')</otherwise>
</choose>,
D.name,
T.uid1
<if test='date_start != null and date_start != ""'>AND #{date_start} &lt;= DATE(T.reg_time)</if>
<if test='date_end != null and date_end != ""'>AND DATE(T.reg_time) &lt;= #{date_end}</if>
HAVING card_count != 0 OR cash_count != 0 OR tmoney_count != 0 OR cbee_count != 0
ORDER BY
date DESC
</select>
<insert id="insertTransaction">
INSERT INTO transactions
<trim prefix="(" suffix=")" suffixOverrides=",">
reg_time, process,
<if test="biz_group_id != null">biz_group_id,</if>
<if test="device_id != null">device_id,</if>
<if test="uid1 != null and uid1 != ''">uid1,</if>
<if test="uid1_type != null and uid1_type != 0">uid1_type,</if>
<if test="order_time != null and order_time != ''">order_time,</if>
<if test="type != null and type != ''">type,</if>
<if test="amount != null and amount != 0">amount,</if>
<if test="approval != null and approval != ''">approval,</if>
<if test="pay_unique_num != null and pay_unique_num != ''">pay_unique_num,</if>
<if test="slot != null and slot != ''">slot,</if>
<if test="code != null and code != ''">code,</if>
<if test="goods_name != null and goods_name != ''">goods_name,</if>
<if test="price != null and price != 0">price,</if>
<if test="pay_name != null and pay_name != ''">pay_name,</if>
<if test="pay_vendor != null and pay_vendor != ''">pay_vendor</if>
<if test='biz_group_id != null'>biz_group_id,</if>
<if test='device_id != null'>device_id,</if>
<if test='uid1 != null and uid1 != ""'>uid1,</if>
<if test='uid1_type != null and uid1_type != 0'>uid1_type,</if>
<if test='order_time != null and order_time != ""'>order_time,</if>
<if test='type != null and type != ""'>type,</if>
<if test='amount != null and amount != 0'>amount,</if>
<if test='approval != null and approval != ""'>approval,</if>
<if test='pay_unique_num != null and pay_unique_num != ""'>pay_unique_num,</if>
<if test='column_no != null and column_no != ""'>column_no,</if>
<if test='code != null and code != ""'>code,</if>
<if test='goods_name != null and goods_name != ""'>goods_name,</if>
<if test='price != null and price != 0'>price,</if>
<if test='pay_name != null and pay_name != ""'>pay_name,</if>
<if test='pay_vendor != null and pay_vendor != ""'>pay_vendor</if>
</trim>
VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
NOW(), 1,
<if test="biz_group_id != null">#{biz_group_id},</if>
<if test="device_id != null">#{device_id},</if>
<if test="uid1 != null and uid1 != ''">#{uid1},</if>
<if test="uid1_type != null and uid1_type != 0">#{uid1_type},</if>
<if test="order_time != null and order_time != ''">#{order_time},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="amount != null and amount != 0">#{amount},</if>
<if test="approval != null and approval != ''">#{approval},</if>
<if test="pay_unique_num != null and pay_unique_num != ''">#{pay_unique_num},</if>
<if test="slot != null and slot != ''">#{slot},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="goods_name != null and goods_name != ''">#{goods_name},</if>
<if test="price != null and price != 0">#{price},</if>
<if test="pay_name != null and pay_name != ''">#{pay_name},</if>
<if test="pay_vendor != null and pay_vendor != ''">#{pay_vendor}</if>
<if test='biz_group_id != null'>#{biz_group_id},</if>
<if test='device_id != null'>#{device_id},</if>
<if test='uid1 != null and uid1 != ""'>#{uid1},</if>
<if test='uid1_type != null and uid1_type != 0'>#{uid1_type},</if>
<if test='order_time != null and order_time != ""'>#{order_time},</if>
<if test='type != null and type != ""'>#{type},</if>
<if test='amount != null and amount != 0'>#{amount},</if>
<if test='approval != null and approval != ""'>#{approval},</if>
<if test='pay_unique_num != null and pay_unique_num != ""'>#{pay_unique_num},</if>
<if test='column_no != null and column_no != ""'>#{column_no},</if>
<if test='code != null and code != ""'>#{code},</if>
<if test='goods_name != null and goods_name != ""'>#{goods_name},</if>
<if test='price != null and price != 0'>#{price},</if>
<if test='pay_name != null and pay_name != ""'>#{pay_name},</if>
<if test='pay_vendor != null and pay_vendor != ""'>#{pay_vendor}</if>
</trim>
</insert>
</mapper>