| @@ -9,6 +9,7 @@ CREATE TABLE `wx_cash_back_activity` ( | |||||
| `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||||
| `update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | `update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | ||||
| `limit_money` decimal(10,3) NOT NULL COMMENT '最低订单金额', | `limit_money` decimal(10,3) NOT NULL COMMENT '最低订单金额', | ||||
| `all_merchant` int(1) NOT NULL DEFAULT '0' COMMENT '是否全部商户', | |||||
| PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='卡券'; | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='卡券'; | ||||
| @@ -35,6 +35,8 @@ public class WxCashBackActivity extends TenantEntity { | |||||
| private Date endTime; | private Date endTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "最低订单金额", name = "limitMoney") | @io.swagger.annotations.ApiModelProperty(value = "最低订单金额", name = "limitMoney") | ||||
| private BigDecimal limitMoney; | private BigDecimal limitMoney; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否全部商户EnumYesOrNo", name = "allMerchant") | |||||
| private Integer allMerchant; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer validTime; | private Integer validTime; | ||||
| @@ -62,4 +64,6 @@ public class WxCashBackActivity extends TenantEntity { | |||||
| private Long merchantId; | private Long merchantId; | ||||
| } | } | ||||
| @@ -12,10 +12,11 @@ | |||||
| <result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> | <result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> | ||||
| <result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> | <result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> | ||||
| <result column="limit_money" jdbcType="DECIMAL" property="limitMoney" /> | <result column="limit_money" jdbcType="DECIMAL" property="limitMoney" /> | ||||
| <result column="all_merchant" jdbcType="INTEGER" property="allMerchant" /> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <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> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -40,6 +41,10 @@ | |||||
| and `end_time` <= #{end} | and `end_time` <= #{end} | ||||
| </if> | </if> | ||||
| <if test=" null != allMerchant"> | |||||
| and `all_merchant` = #{allMerchant} | |||||
| </if> | |||||
| <!-- 未过期 --> | <!-- 未过期 --> | ||||
| <if test=" 1 == validTime"> | <if test=" 1 == validTime"> | ||||
| and end_time >= now() | and end_time >= now() | ||||