| @@ -21,6 +21,9 @@ public class WxCardInfo implements Serializable { | |||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| /**租户ID*/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||||
| private String tenantId; | |||||
| /**券ID*/ | /**券ID*/ | ||||
| @io.swagger.annotations.ApiModelProperty(value = "券ID", name = "couponId") | @io.swagger.annotations.ApiModelProperty(value = "券ID", name = "couponId") | ||||
| private Long couponId; | private Long couponId; | ||||
| @@ -54,6 +57,7 @@ public class WxCardInfo implements Serializable { | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") | |||||
| ,CouponId_ASC("`coupon_id` ASC"),CouponId_DESC("`coupon_id` DESC") | ,CouponId_ASC("`coupon_id` ASC"),CouponId_DESC("`coupon_id` DESC") | ||||
| ,TransactionId_ASC("`transaction_id` ASC"),TransactionId_DESC("`transaction_id` DESC") | ,TransactionId_ASC("`transaction_id` ASC"),TransactionId_DESC("`transaction_id` DESC") | ||||
| ,Amount_ASC("`amount` ASC"),Amount_DESC("`amount` DESC") | ,Amount_ASC("`amount` ASC"),Amount_DESC("`amount` DESC") | ||||
| @@ -20,7 +20,10 @@ public class WxCardSpend implements Serializable { | |||||
| protected List<Long> ids; | protected List<Long> ids; | ||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| /**租户ID*/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||||
| private String tenantId; | |||||
| /**储值卡ID*/ | /**储值卡ID*/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="储值卡ID",name="cardId") | @io.swagger.annotations.ApiModelProperty(value="储值卡ID",name="cardId") | ||||
| private Long cardId; | private Long cardId; | ||||
| @@ -57,6 +60,7 @@ public class WxCardSpend implements Serializable { | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") | |||||
| ,CardId_ASC("`card_id` ASC"),CardId_DESC("`card_id` DESC") | ,CardId_ASC("`card_id` ASC"),CardId_DESC("`card_id` DESC") | ||||
| ,OwnerId_ASC("`owner_id` ASC"),OwnerId_DESC("`owner_id` DESC") | ,OwnerId_ASC("`owner_id` ASC"),OwnerId_DESC("`owner_id` DESC") | ||||
| ,MerchantId_ASC("`merchant_id` ASC"),MerchantId_DESC("`merchant_id` DESC") | ,MerchantId_ASC("`merchant_id` ASC"),MerchantId_DESC("`merchant_id` DESC") | ||||
| @@ -3,7 +3,8 @@ | |||||
| <mapper namespace="com.iformall.mapper.WxCardInfoMapper"> | <mapper namespace="com.iformall.mapper.WxCardInfoMapper"> | ||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCardInfo"> | <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCardInfo"> | ||||
| <id column="id" jdbcType="BIGINT" property="id" /> | <id column="id" jdbcType="BIGINT" property="id" /> | ||||
| <result column="coupon_id" jdbcType="VARCHAR" property="couponId" /> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||||
| <result column="coupon_id" jdbcType="BIGINT" property="couponId" /> | |||||
| <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" /> | <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" /> | ||||
| <result column="amount" jdbcType="INTEGER" property="amount" /> | <result column="amount" jdbcType="INTEGER" property="amount" /> | ||||
| <result column="remaining_amount" jdbcType="INTEGER" property="remainingAmount" /> | <result column="remaining_amount" jdbcType="INTEGER" property="remainingAmount" /> | ||||
| @@ -15,7 +16,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`coupon_id`,`transaction_id`,`amount`,`remaining_amount`,`service_fee_amount`,`share_fee_amount`,`remaining_share_fee_amount`,`create_date`,`update_date` | |||||
| `id`,`tenant_id`,`coupon_id`,`transaction_id`,`amount`,`remaining_amount`,`service_fee_amount`,`share_fee_amount`,`remaining_share_fee_amount`,`create_date`,`update_date` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -23,11 +24,14 @@ | |||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and `id` = #{id} | and `id` = #{id} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != couponId "> | <if test=" null != couponId "> | ||||
| and `coupon_id` like concat('%', #{couponId},'%') | |||||
| and `coupon_id` = #{couponId} | |||||
| </if> | </if> | ||||
| <if test=" null != transactionId "> | <if test=" null != transactionId "> | ||||
| and `transaction_id` like concat('%', #{transactionId},'%') | |||||
| and `transaction_id` = #{transactionId} | |||||
| </if> | </if> | ||||
| <if test=" null != amount "> | <if test=" null != amount "> | ||||
| and `amount` = #{amount} | and `amount` = #{amount} | ||||
| @@ -3,6 +3,7 @@ | |||||
| <mapper namespace="com.iformall.mapper.WxCardSpendMapper"> | <mapper namespace="com.iformall.mapper.WxCardSpendMapper"> | ||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCardSpend"> | <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCardSpend"> | ||||
| <id column="id" jdbcType="BIGINT" property="id" /> | <id column="id" jdbcType="BIGINT" property="id" /> | ||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||||
| <result column="card_id" jdbcType="BIGINT" property="cardId" /> | <result column="card_id" jdbcType="BIGINT" property="cardId" /> | ||||
| <result column="owner_id" jdbcType="BIGINT" property="ownerId" /> | <result column="owner_id" jdbcType="BIGINT" property="ownerId" /> | ||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | ||||
| @@ -16,14 +17,17 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`card_id`,`owner_id`,`merchant_id`,`order_id`,`payment`,`real_payment`,`remain_amount`,`before_amount`,`create_date`,`update_date` | |||||
| `id`,`tenant_id`,`card_id`,`owner_id`,`merchant_id`,`order_id`,`payment`,`real_payment`,`remain_amount`,`before_amount`,`create_date`,`update_date` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where 1 = 1 | where 1 = 1 | ||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and `id` = #{id} | and `id` = #{id} | ||||
| </if> | |||||
| </if> | |||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != cardId "> | <if test=" null != cardId "> | ||||
| and `card_id` = #{cardId} | and `card_id` = #{cardId} | ||||
| </if> | </if> | ||||