winter 2 лет назад
Родитель
Сommit
0c33b0e8bb
3 измененных файлов: 11 добавлений и 1 удалений
  1. +1
    -0
      mallinkAdmin/src/main/resources/db/migration/V20240200001.sql
  2. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxCashBackActivity.java
  3. +6
    -1
      mallinkService/src/main/resources/mapper/WxCashBackActivityMapper.xml

+ 1
- 0
mallinkAdmin/src/main/resources/db/migration/V20240200001.sql Просмотреть файл

@@ -9,6 +9,7 @@ CREATE TABLE `wx_cash_back_activity` (
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`limit_money` decimal(10,3) NOT NULL COMMENT '最低订单金额',
`all_merchant` int(1) NOT NULL DEFAULT '0' COMMENT '是否全部商户',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='卡券';



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

@@ -35,6 +35,8 @@ public class WxCashBackActivity extends TenantEntity {
private Date endTime;
@io.swagger.annotations.ApiModelProperty(value = "最低订单金额", name = "limitMoney")
private BigDecimal limitMoney;
@io.swagger.annotations.ApiModelProperty(value = "是否全部商户EnumYesOrNo", name = "allMerchant")
private Integer allMerchant;
@TableField(exist = false)
private Integer validTime;
@@ -62,4 +64,6 @@ public class WxCashBackActivity extends TenantEntity {
private Long merchantId;
}

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

@@ -12,10 +12,11 @@
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="limit_money" jdbcType="DECIMAL" property="limitMoney" />
<result column="all_merchant" jdbcType="INTEGER" property="allMerchant" />
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`status`,`name`,`create_date`,`update_date`,`start_time`,`end_time`,`limit_money`
`id`,`tenant_id`,`parent_tenant_id`,`status`,`name`,`create_date`,`update_date`,`start_time`,`end_time`,`limit_money`,`all_merchant`
</sql>

<sql id="dynamicWhereConditions">
@@ -40,6 +41,10 @@
and `end_time` &lt;= #{end}
</if>
<if test=" null != allMerchant">
and `all_merchant` = #{allMerchant}
</if>
<!-- 未过期 -->
<if test=" 1 == validTime">
and end_time &gt;= now()


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