Просмотр исходного кода

[储值卡][修改]:卡信息、卡消费表添加tenant_id

release_toaliyun_real
Stormeye Wu 7 лет назад
Родитель
Сommit
3514b9d65c
4 измененных файлов: 23 добавлений и 7 удалений
  1. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxCardInfo.java
  2. +5
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxCardSpend.java
  3. +8
    -4
      mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml
  4. +6
    -2
      mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml

+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxCardInfo.java Просмотреть файл

@@ -21,6 +21,9 @@ public class WxCardInfo implements Serializable {
@Transient
protected String sortColumns;

/**租户ID*/
@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
/**券ID*/
@io.swagger.annotations.ApiModelProperty(value = "券ID", name = "couponId")
private Long couponId;
@@ -54,6 +57,7 @@ public class WxCardInfo implements Serializable {
public static enum Field
{
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")
,TransactionId_ASC("`transaction_id` ASC"),TransactionId_DESC("`transaction_id` DESC")
,Amount_ASC("`amount` ASC"),Amount_DESC("`amount` DESC")


+ 5
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxCardSpend.java Просмотреть файл

@@ -20,7 +20,10 @@ public class WxCardSpend implements Serializable {
protected List<Long> ids;
@Transient
protected String sortColumns;

/**租户ID*/
@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
/**储值卡ID*/
@io.swagger.annotations.ApiModelProperty(value="储值卡ID",name="cardId")
private Long cardId;
@@ -57,6 +60,7 @@ public class WxCardSpend implements Serializable {
public static enum Field
{
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")
,OwnerId_ASC("`owner_id` ASC"),OwnerId_DESC("`owner_id` DESC")
,MerchantId_ASC("`merchant_id` ASC"),MerchantId_DESC("`merchant_id` DESC")


+ 8
- 4
mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml Просмотреть файл

@@ -3,7 +3,8 @@
<mapper namespace="com.iformall.mapper.WxCardInfoMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCardInfo">
<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="amount" jdbcType="INTEGER" property="amount" />
<result column="remaining_amount" jdbcType="INTEGER" property="remainingAmount" />
@@ -15,7 +16,7 @@
</resultMap>
<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 id="dynamicWhereConditions">
@@ -23,11 +24,14 @@
<if test=" null != id ">
and `id` = #{id}
</if>
<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != couponId ">
and `coupon_id` like concat('%', #{couponId},'%')
and `coupon_id` = #{couponId}
</if>
<if test=" null != transactionId ">
and `transaction_id` like concat('%', #{transactionId},'%')
and `transaction_id` = #{transactionId}
</if>
<if test=" null != amount ">
and `amount` = #{amount}


+ 6
- 2
mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml Просмотреть файл

@@ -3,6 +3,7 @@
<mapper namespace="com.iformall.mapper.WxCardSpendMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCardSpend">
<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="owner_id" jdbcType="BIGINT" property="ownerId" />
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
@@ -16,14 +17,17 @@
</resultMap>
<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 id="dynamicWhereConditions">
where 1 = 1
<if test=" null != id ">
and `id` = #{id}
</if>
</if>
<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != cardId ">
and `card_id` = #{cardId}
</if>


Загрузка…
Отмена
Сохранить