Memory_LG 3 周之前
父节点
当前提交
b6d2a3d67c

+ 2 - 0
qmjszx-business/src/main/java/beilv/voucher/domain/BeilvVoucherMember.java

@@ -89,6 +89,8 @@ public class BeilvVoucherMember extends BaseEntity {
     @Excel(name = "付款金额")
     private BigDecimal payPrice;
 
+    private BigDecimal instantDiscount;
+
     public BeilvVoucherMember() {
 
     }

+ 6 - 4
qmjszx-business/src/main/resources/mapper/voucher/BeilvVoucherMemberMapper.xml

@@ -14,7 +14,7 @@
         <result property="voucherPrice" column="voucher_price"/>
         <result property="voucherType" column="voucher_type"/>
         <result property="isValidityText" column="isValidityText"/>
-        <result property="isValidityText" column="isValidityText"/>
+        <result property="instantDiscount" column="instant_discount"/>
     </resultMap>
 
     <sql id="selectBeilvVoucherMemberVo">
@@ -29,7 +29,8 @@
                v.voucher_type,
                m.username,
                vm.validity_time,
-               vm.is_validity
+               vm.is_validity,
+               v.instant_discount
         FROM beilv_voucher v
                  left join beilv_voucher_member vm on v.id = vm.voucher_id
                  left join sys_member m on vm.member_id = m.id
@@ -87,12 +88,13 @@
         v.voucher_price,
         v.voucher_type,
         vm.is_validity,
-        vm.validity_time
+        vm.validity_time,
+        v.instant_discount
         FROM beilv_voucher v
         left join beilv_voucher_member vm on v.id = vm.voucher_id
         left join sys_member m on vm.member_id = m.id
         where m.id = #{memberId}
-        <if test="voucherType != null and voucherType != ''">and voucher_type = #{voucherType}</if>
+        <if test="voucherType != null and voucherType != ''">and v.voucher_type = #{voucherType}</if>
         <if test="payPrice != null and payPrice != ''">and v.instant_discount &gt;= #{payPrice}</if>
         <if test="isValidity != null and isValidity != ''">and vm.is_validity = #{isValidity}</if>
     </select>