product_mapping,user_device_bind新增更新时间和修改时间字段,修改sql和对象
This commit is contained in:
parent
26b70338ff
commit
1b278d23d3
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -12,6 +13,7 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static com.baomidou.mybatisplus.annotation.FieldStrategy.NOT_EMPTY;
|
||||
@ -54,6 +56,16 @@ public class ProductMapping implements Serializable {
|
||||
@ApiModelProperty("排序值")
|
||||
private Integer sortOrder;
|
||||
|
||||
@TableField("create_time")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@TableField("update_time")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
/**
|
||||
* 生成唯一键:productName + storeId + specValue + specUnit
|
||||
|
||||
@ -84,4 +84,9 @@ public class StoreDbConfig implements Serializable {
|
||||
@TableField("remark")
|
||||
@ApiModelProperty(value = "备注信息")
|
||||
private String remark;
|
||||
|
||||
@TableField("refresh_time")
|
||||
@ApiModelProperty(value = "刷新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date refreshTime;
|
||||
}
|
||||
@ -6,6 +6,8 @@ CREATE TABLE `user_device_bind` (
|
||||
`os_type` varchar(16) NOT NULL COMMENT '手机系统类型 (Android/iOS)',
|
||||
`bind_time` datetime NOT NULL COMMENT '绑定时间',
|
||||
`last_active` datetime NOT NULL COMMENT '最后活跃时间',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_user_id` (`user_id`),
|
||||
KEY `idx_cid` (`cid`),
|
||||
|
||||
@ -6,6 +6,8 @@ CREATE TABLE `product_mapping` (
|
||||
`description` text ,
|
||||
`sort_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序值',
|
||||
`store_id` int unsigned NOT NULL DEFAULT '0' COMMENT '店铺编号',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_product_name` (`product_name`) USING BTREE,
|
||||
KEY `idx_store_id` (`store_id`) USING BTREE
|
||||
@ -18,7 +20,7 @@ alter table shop_product_base add column `unit_price` DECIMAL(18,4) NOT NULL COM
|
||||
alter table shop_base_product_spec add column `store_id` int unsigned NOT NULL DEFAULT '0' COMMENT '店铺编号';
|
||||
alter table shop_base_product_spec add index `store_id` (`store_id`) USING BTREE;
|
||||
|
||||
INSERT INTO mall_dev.shop_base_product_state
|
||||
INSERT INTO shop_base_product_state
|
||||
(product_state_id, product_state_name, product_state_text_1, product_state_text_2, product_state_remark)
|
||||
VALUES(1003, 'PRODUCT_STATE_OFF_THE_SHELF_UNCHECK', '下架未分配商品', '同步数据未分配', '');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user