개발환경 변경 및 설명 추가
This commit is contained in:
@@ -65,10 +65,8 @@
|
||||
<otherwise>
|
||||
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,
|
||||
T.card_num, T.rtid,
|
||||
/* the original approval, shown under a credit cancel row */
|
||||
ORG.reg_time AS org_reg_time, ORG.order_time AS org_order_time, ORG.type AS org_type, ORG.amount AS org_amount,
|
||||
ORG.approval AS org_approval, ORG.card_num AS org_card_num, ORG.pay_name AS org_pay_name, ORG.pay_vendor AS org_pay_vendor,
|
||||
ORG.column_no AS org_column_no, ORG.code AS org_code, ORG.goods_name AS org_goods_name
|
||||
/* the original approval, used for the cancel column and the cancel receipt of a credit cancel row */
|
||||
ORG.order_time AS org_order_time, ORG.goods_name AS org_goods_name
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM transactions AS T
|
||||
@@ -388,6 +386,15 @@
|
||||
HAVING card_count != 0 OR cash_count != 0 OR tmoney_count != 0 OR cbee_count != 0
|
||||
</select>
|
||||
|
||||
<!-- The original credit approval of a cancel: same terminal and same approval number, latest one first -->
|
||||
<select id="selectOrgTransactionId" resultType="java.lang.Long">
|
||||
SELECT transaction_id
|
||||
FROM transactions
|
||||
WHERE type = 'D1' AND uid1 = #{uid1} AND approval = #{approval}
|
||||
ORDER BY transaction_id DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<insert id="insertTransaction">
|
||||
INSERT INTO transactions
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -406,6 +413,7 @@
|
||||
<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='rtid != null'>rtid,</if>
|
||||
<if test='pay_vendor != null and pay_vendor != ""'>pay_vendor</if>
|
||||
</trim>
|
||||
VALUES
|
||||
@@ -425,6 +433,7 @@
|
||||
<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='rtid != null'>#{rtid},</if>
|
||||
<if test='pay_vendor != null and pay_vendor != ""'>#{pay_vendor}</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
Reference in New Issue
Block a user