Ghi log IPN
CREATE TABLE IF NOT EXISTS nv4_wallet_ipn_logs (
id int(11) NOT NULL AUTO_INCREMENT,
userid int(11) NOT NULL DEFAULT '0' COMMENT 'ID thành viên nếu có',
log_ip varchar(64) NOT NULL DEFAULT '' COMMENT 'Địa chỉ IP',
log_data mediumtext NULL DEFAULT NULL COMMENT 'Dữ liệu dạng json_encode',
request_method varchar(20) NOT NULL DEFAULT '' COMMENT 'Loại truy vấn',
request_time int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Thời gian log',
user_agent text NULL DEFAULT NULL,
PRIMARY KEY (id),
KEY userid (userid),
KEY log_ip (log_ip),
KEY request_method (request_method),
KEY request_time (request_time)
) ENGINE=INNODB;
Thông báo có giao dịch mới đến kế toán
INSERT INTO `nv4_config` (`lang`, `module`, `config_name`, `config_value`) VALUES ('vi', 'wallet', 'accountants_emails', '');
ALTER TABLE `nv4_wallet_payment` ADD `active_completed_email` TINYINT(1) NOT NULL DEFAULT '0' COMMENT 'Kích hoạt gửi email thông báo các giao dịch chưa hoàn thành' AFTER `allowedoptionalmoney`, ADD `active_incomplete_email` TINYINT(1) NOT NULL DEFAULT '0' COMMENT 'Kích hoạt gửi email thông báo các giao dịch đã hoàn thành' AFTER `active_completed_email`;
Cấu hình thời gian hết hạn giao dịch
INSERT INTO `nv4_config` (`lang`, `module`, `config_name`, `config_value`) VALUES ('vi', 'wallet', 'transaction_expiration_time', '0');
INSERT INTO `nv4_config` (`lang`, `module`, `config_name`, `config_value`) VALUES ('vi', 'wallet', 'next_update_transaction_time', '0');
ALTER TABLE `nv4_wallet_transaction` ADD `is_expired` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '0: Chưa hết hạn, 1: Hết hạn' AFTER `tokenkey`, ADD INDEX `is_expired` (`is_expired`);
Chức năng phân quyền
CREATE TABLE nv4_wallet_admins (
admin_id mediumint(8) NOT NULL,
gid smallint(4) NOT NULL,
add_time int(11) NOT NULL DEFAULT '0',
update_time int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (admin_id),
KEY gid (gid)
) ENGINE=INNODB;
CREATE TABLE nv4_wallet_admin_groups (
gid smallint(4) NOT NULL AUTO_INCREMENT,
group_title varchar(100) NOT NULL DEFAULT '' COMMENT 'Tên nhóm',
add_time int(11) NOT NULL DEFAULT '0',
update_time int(11) NOT NULL DEFAULT '0',
is_wallet tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền xem và cập nhật ví tiền',
is_vtransaction tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền xem giao dịch',
is_mtransaction tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền xem và xử lý giao dịch',
is_vorder tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền xem các đơn hàng kết nối',
is_morder tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền xem và xử lý các đơn hàng kết nối',
is_exchange tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền quản lý tỷ giá',
is_money tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền quản lý tiền tệ',
is_payport tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền quản lý các cổng thanh toán',
is_configmod tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền thiết lập cấu hình module',
is_viewstats tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Quyền xem thống kê',
PRIMARY KEY (gid),
UNIQUE KEY group_title (group_title),
KEY is_wallet (is_wallet),
KEY is_vtransaction (is_vtransaction),
KEY is_mtransaction (is_mtransaction),
KEY is_vorder (is_vorder),
KEY is_morder (is_morder),
KEY is_exchange (is_exchange),
KEY is_money (is_money),
KEY is_payport (is_payport),
KEY is_configmod (is_configmod),
KEY is_viewstats (is_viewstats)
) ENGINE=INNODB;
Thay đổi Enginee của các bảng dữ liệu
ALTER TABLE `nv4_wallet_epay_log` ENGINE = INNODB;
ALTER TABLE `nv4_wallet_exchange` ENGINE = INNODB;
ALTER TABLE `nv4_wallet_exchange_log` ENGINE = INNODB;
ALTER TABLE `nv4_wallet_money` ENGINE = INNODB;
ALTER TABLE `nv4_wallet_money_sys` ENGINE = INNODB;
ALTER TABLE `nv4_wallet_payment` ENGINE = INNODB;
ALTER TABLE `nv4_wallet_payment_discount` ENGINE = INNODB;
ALTER TABLE `nv4_wallet_smslog` ENGINE = INNODB;
ALTER TABLE `nv4_wallet_transaction` DROP INDEX `customer_name`, ADD INDEX `customer_name` (`customer_name`(191)) USING BTREE;
ALTER TABLE `nv4_wallet_transaction` DROP INDEX `customer_email`, ADD INDEX `customer_email` (`customer_email`(191)) USING BTREE;
ALTER TABLE `nv4_wallet_transaction` ENGINE = INNODB;
ALTER TABLE `nv4_wallet_orders` ENGINE = INNODB;