alter table `AR_ORDER` add column REMAIN_PV decimal(16,2) not null default 0.00 comment "当期未计入的剩余PV";
alter table `AR_ORDER_GOODS` add column REMAIN_PV decimal(16,2) not null default 0.00 comment "当期未计入的剩余PV";

alter table `AR_APPROACH_ORDER` add column REMAIN_PV decimal(16,2) not null default 0.00 comment "当期未计入的剩余PV";

ALTER TABLE `AR_SHOP_GOODS` ADD COLUMN PV_SPLIT TINYINT NOT NULL DEFAULT 0 COMMENT "是否BV分期";

CREATE TABLE `AR_REMAIN_PV`  (
  `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `USER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `REMAIN_PV` decimal(16, 2) NULL DEFAULT NULL,
  `UPDATED_AT` int(10) NOT NULL,
  `STATUS` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

CREATE TABLE `AR_FLOW_REMAIN_PV`  (
  `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `USER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `REMAIN_PV_FLOW` decimal(16, 2) NULL DEFAULT NULL,
  `REMAIN_PV_TOTAL` decimal(16, 2) NULL DEFAULT NULL,
  `PERIOD_NUM` int(11) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL,
  `ORDER_SN` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

alter table `AR_ORDER` add column IS_AUTO int(11) not null default 0 comment "假订单标志";
alter table `AR_APPROACH_ORDER` add column IS_AUTO int(11) not null default 0 comment "假订单标志";
