Commit 1b88f7ea authored by wux's avatar wux
parents b88447cf a5dbda18
ALTER TABLE member_user_level_config
ADD COLUMN level INT COMMENT '等级',
ADD COLUMN status INT COMMENT '状态(0.未发布,1.已启用,2.已禁用,3.已过期)',
ADD COLUMN rule_number VARCHAR(20) COMMENT '规则编号',
ADD COLUMN validity_period INT COMMENT '等级有效期',
ADD COLUMN accumulation_period INT COMMENT '积分累计周期',
ADD COLUMN start_date DATETIME COMMENT '积分开始累计时间',
ADD COLUMN enable_date DATETIME COMMENT '启用日期',
ADD COLUMN start_time DATETIME COMMENT '等级规则有效期开始时间',
ADD COLUMN end_time DATETIME COMMENT '等级规则有效期结束时间',
ADD COLUMN description VARCHAR(200) COMMENT '等级说明',
ADD COLUMN sort INT COMMENT '匹配顺序(限制为数字)';
INSERT INTO jiedao.system_menu (name, permission, menu_type, sort, parent_id, `path`, icon, component, status, creator, create_time, updater, update_time, deleted, is_show_in_menu_bar, name_en, keepalive, redirect, badge_field) VALUES('会员等级设置', '', 2, 1, 1520, 'operatingLevel', '#', 'ecw/memberManagement/operatingLevel', 0, '1', '2024-12-13 14:37:24', '1', '2024-12-13 15:14:29', 0, 0, '会员等级设置', 0, NULL, NULL);
CREATE TABLE `jiedao`.`member_user_level_log`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`config_id` bigint NOT NULL COMMENT '会员等级配置id',
`operator` VARCHAR(255) NOT NULL COMMENT '操作人',
`remarks` TEXT NULL COMMENT '备注',
`operate_type` INT NOT NULL COMMENT '操作类型',
`bpm_process_id` BIGINT NULL COMMENT '流程ID',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员等级日志表' ROW_FORMAT = Dynamic;
INSERT INTO jiedao.system_dict_type (name, `type`, status, remark, creator, create_time, updater, update_time, deleted) VALUES('会员等级', 'membership_levels', 0, NULL, '1', '2024-12-12 14:03:26', '1', '2024-12-12 14:09:37', 0);
INSERT INTO jiedao.system_dict_data (sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted, label_en, label_fr) VALUES(0, '青铜会员', '1', 'membership_levels', 0, 'default', '', NULL, '1', '2024-12-12 14:10:46', '1', '2024-12-12 14:17:06', 0, 'Bronze Member', 'Bronze Member');
INSERT INTO jiedao.system_dict_data (sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted, label_en, label_fr) VALUES(0, '银级会员', '2', 'membership_levels', 0, 'default', '', NULL, '1', '2024-12-12 14:14:17', '1', '2024-12-12 14:17:25', 0, 'Silver Member', 'Silver Member');
INSERT INTO jiedao.system_dict_data (sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted, label_en, label_fr) VALUES(0, '黄金级会员', '3', 'membership_levels', 0, 'default', '', NULL, '1', '2024-12-12 14:15:09', '1', '2024-12-12 14:17:37', 0, 'Gold Member', 'Gold Member');
INSERT INTO jiedao.system_dict_data (sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted, label_en, label_fr) VALUES(0, '白金级会员', '4', 'membership_levels', 0, 'default', '', NULL, '1', '2024-12-12 14:15:59', '1', '2024-12-12 14:17:48', 0, 'Platinum Member', 'Platinum Member');
INSERT INTO jiedao.system_dict_type
(name, `type`, status, remark, creator, create_time, updater, update_time, deleted)
VALUES('用户等级操作类型', 'member_user_operate_log', 0, NULL, '1', '2024-12-25 09:55:40', '1', '2024-12-25 09:55:40', 0);
INSERT INTO jiedao.system_dict_data
(sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted, label_en, label_fr)
VALUES(0, '升级', '1', 'member_user_operate_log', 0, 'default', '', NULL, '1', '2024-12-25 09:58:31', '1', '2024-12-25 10:07:04', 0, 'Upgrade', 'Mise à niveau');
INSERT INTO jiedao.system_dict_data
(sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted, label_en, label_fr)
VALUES(1, '降级', '2', 'member_user_operate_log', 0, 'default', '', NULL, '1', '2024-12-25 09:58:50', '1', '2024-12-25 10:06:59', 0, 'Downgrade', 'Rétrogradation');
INSERT INTO jiedao.system_dict_data
(sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted, label_en, label_fr)
VALUES(2, '修改信息', '3', 'member_user_operate_log', 0, 'default', '', NULL, '1', '2024-12-25 09:59:24', '1', '2024-12-25 10:06:54', 0, 'Modify Information', 'Modifier les informations');
CREATE TABLE `jiedao`.`member_user_level_details`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`config_id` bigint NOT NULL COMMENT '会员等级配置id',
`member_id` bigint NOT NULL COMMENT '会员id',
`level` INT NULL COMMENT '等级',
`validity_period` INT NULL COMMENT '等级有效期',
`specific_settings` bit(1) NOT NULL DEFAULT b'0' COMMENT '特殊设置(0关闭 1开启)',
`remarks` TEXT NULL COMMENT '备注',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员等级详情表' ROW_FORMAT = Dynamic;
CREATE TABLE `jiedao`.`member_user_level_operate_log`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`config_id` bigint NOT NULL COMMENT '会员等级配置id',
`config_name` VARCHAR(255) NOT NULL COMMENT '会员等级配置名称',
`member_id` bigint NOT NULL COMMENT '会员id',
`operator` VARCHAR(255) NOT NULL COMMENT '操作人',
`remarks` TEXT NULL COMMENT '说明',
`level` INT COMMENT '等级',
`operate_type` INT NOT NULL COMMENT '操作类型',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员等级操作记录日志表' ROW_FORMAT = Dynamic;
\ No newline at end of file
UPDATE jiedao.ecw_region SET title_fr='Europe' where title_zh like '%欧洲(Europe)%' and title_en='Europe';
UPDATE jiedao.ecw_region SET title_fr='Asie' where title_zh like '%亚洲(Asia)%' and title_en='Asia';
UPDATE jiedao.ecw_region SET title_fr='Afrique' where title_zh like '%非洲(Africa)%' and title_en='Africa';
UPDATE jiedao.ecw_region SET title_fr='Amérique du Sud' where title_zh like '%南美洲%' and title_en='South America';
UPDATE jiedao.ecw_region SET title_fr='Amérique du Nord' where title_zh like '%北美洲(North America)%' and title_en='North America';
UPDATE jiedao.ecw_region SET title_fr='Océanie' where title_zh like '%大洋洲(Oceania)%' and title_en='Oceania';
UPDATE jiedao.ecw_region SET title_fr='Antarctique' where title_zh like '%南极洲(Antarctica)%' and title_en='Antarctica';
UPDATE jiedao.ecw_region SET title_fr='Chine' where title_zh like '%中国%' and title_en='China';
UPDATE jiedao.ecw_region SET title_fr='Pékin' where title_zh like '%北京%' and title_en='Beijing';
UPDATE jiedao.ecw_region SET title_fr='Tianjin' where title_zh like '%天津%' and title_en='Tianjin';
UPDATE jiedao.ecw_region SET title_fr='Province du Hebei' where title_zh like '%河北省%' and title_en='Hebei Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Shanxi' where title_zh like '%山西省%' and title_en='Shanxi Province';
UPDATE jiedao.ecw_region SET title_fr='Région autonome de la Mongolie intérieure' where title_zh like '%内蒙古自治区%' and title_en='Inner Mongolia Autonomous Region';
UPDATE jiedao.ecw_region SET title_fr='Province du Liaoning' where title_zh like '%辽宁省%' and title_en='Liaoning Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Jilin' where title_zh like '%吉林省%' and title_en='Jilin Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Heilongjiang' where title_zh like '%黑龙江省%' and title_en='Heilongjiang Province';
UPDATE jiedao.ecw_region SET title_fr='Shanghai' where title_zh like '%上海%' and title_en='Shanghai';
UPDATE jiedao.ecw_region SET title_fr='Province du Jiangsu' where title_zh like '%江苏省%' and title_en='Jiangsu Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Zhejiang' where title_zh like '%浙江省%' and title_en='Zhejiang Province';
UPDATE jiedao.ecw_region SET title_fr='Province de l''Anhui' where title_zh like '%安徽省%' and title_en='Anhui Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Fujian' where title_zh like '%福建省%' and title_en='Fujian Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Jiangxi' where title_zh like '%江西省%' and title_en='Jiangxi Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Shandong' where title_zh like '%山东省%' and title_en='Shandong Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Henan' where title_zh like '%河南省%' and title_en='Henan Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Hubei' where title_zh like '%湖北省%' and title_en='Hubei province';
UPDATE jiedao.ecw_region SET title_fr='Province du Hunan' where title_zh like '%湖南省%' and title_en='Hunan Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Guangdong' where title_zh like '%广东省%' and title_en='Guangdong Province';
UPDATE jiedao.ecw_region SET title_fr='Région autonome Zhuang du Guangxi' where title_zh like '%广西壮族自治区%' and title_en='Guangxi Zhuang Autonomous Region';
UPDATE jiedao.ecw_region SET title_fr='Hainan' where title_zh like '%海南省%' and title_en='Hainan';
UPDATE jiedao.ecw_region SET title_fr='Chongqing' where title_zh like '%重庆%' and title_en='Chongqing';
UPDATE jiedao.ecw_region SET title_fr='Province du Sichuan' where title_zh like '%四川省%' and title_en='Sichuan Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Guizhou' where title_zh like '%贵州省%' and title_en='Guizhou Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Yunnan' where title_zh like '%云南省%' and title_en='Yunnan Province';
UPDATE jiedao.ecw_region SET title_fr='Région autonome du Tibet' where title_zh like '%西藏自治区%' and title_en='Tibet Autonomous Region';
UPDATE jiedao.ecw_region SET title_fr='Province du Shaanxi' where title_zh like '%陕西省%' and title_en='Shaanxi Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Gansu' where title_zh like '%甘肃省%' and title_en='Gansu Province';
UPDATE jiedao.ecw_region SET title_fr='Province du Qinghai' where title_zh like '%青海省%' and title_en='Qinghai Province';
UPDATE jiedao.ecw_region SET title_fr='Région autonome Hui du Ningxia' where title_zh like '%宁夏回族自治区%' and title_en='Ningxia Hui Autonomous Region';
UPDATE jiedao.ecw_region SET title_fr='Région autonome ouïghoure du Xinjiang' where title_zh like '%新疆维吾尔自治区%' and title_en='Xinjiang Uygur Autonomous Region';
UPDATE jiedao.ecw_region SET title_fr='Taïwan' where title_zh like '%台湾%' and title_en='Taiwan';
UPDATE jiedao.ecw_region SET title_fr='Région administrative spéciale de Hong Kong' where title_zh like '%香港特别行政区%' and title_en='Hong Kong Special Administrative Region';
UPDATE jiedao.ecw_region SET title_fr='Région administrative spéciale de Macao' where title_zh like '%澳门特别行政区%' and title_en='Macao Special Administrative Region';
UPDATE jiedao.ecw_region SET title_fr='Outre-mer' where title_zh like '%海外%' and title_en='overseas';
UPDATE jiedao.ecw_region SET title_fr='Pékin' where title_zh like '%北京市%' and title_en='Beijing';
UPDATE jiedao.ecw_region SET title_fr='Tianjin' where title_zh like '%天津市%' and title_en='Tianjin';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shijiazhuang' where title_zh like '%石家庄市%' and title_en='Shijiazhuang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tangshan' where title_zh like '%唐山市%' and title_en='Tangshan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Qinhuangdao' where title_zh like '%秦皇岛市%' and title_en='Qinhuangdao City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Handan' where title_zh like '%邯郸市%' and title_en='Handan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xingtai' where title_zh like '%邢台市%' and title_en='Xingtai City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Baoding' where title_zh like '%保定市%' and title_en='Baoding City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhangjiakou' where title_zh like '%张家口市%' and title_en='Zhangjiakou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Chengde' where title_zh like '%承德市%' and title_en='Chengde City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Cangzhou' where title_zh like '%沧州市%' and title_en='Cangzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Langfang' where title_zh like '%廊坊市%' and title_en='Langfang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Hengshui' where title_zh like '%衡水市%' and title_en='Hengshui City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Taiyuan' where title_zh like '%太原市%' and title_en='Taiyuan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Datong' where title_zh like '%大同市%' and title_en='Datong City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yangquan' where title_zh like '%阳泉市%' and title_en='Yangquan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Changzhi' where title_zh like '%长治市%' and title_en='Changzhi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jincheng' where title_zh like '%晋城市%' and title_en='Jincheng City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shuozhou' where title_zh like '%朔州市%' and title_en='Shuozhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jinzhong' where title_zh like '%晋中市%' and title_en='Jinzhong';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yuncheng' where title_zh like '%运城市%' and title_en='Yuncheng City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xinzhou' where title_zh like '%忻州市%' and title_en='xinzhou';
UPDATE jiedao.ecw_region SET title_fr='Ville de Linfen' where title_zh like '%临汾市%' and title_en='Linfen City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Luliang' where title_zh like '%吕梁市%' and title_en='Luliang City';
UPDATE jiedao.ecw_region SET title_fr='Hohhot' where title_zh like '%呼和浩特市%' and title_en='Hohhot';
UPDATE jiedao.ecw_region SET title_fr='Ville de Baotou' where title_zh like '%包头市%' and title_en='Baotou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Wuhai' where title_zh like '%乌海市%' and title_en='Wuhai City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Chifeng' where title_zh like '%赤峰市%' and title_en='Chifeng City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tongliao' where title_zh like '%通辽市%' and title_en='Tongliao City';
UPDATE jiedao.ecw_region SET title_fr='Ville d''Ordos' where title_zh like '%鄂尔多斯市%' and title_en='ordos city';
UPDATE jiedao.ecw_region SET title_fr='Ville de Hulun Buir' where title_zh like '%呼伦贝尔市%' and title_en='Hulun Buir City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Bayannur' where title_zh like '%巴彦淖尔市%' and title_en='Bayannur City';
UPDATE jiedao.ecw_region SET title_fr='Ville d''Ulanqab' where title_zh like '%乌兰察布市%' and title_en='Ulanqab City';
UPDATE jiedao.ecw_region SET title_fr='Ligue de Xing''an' where title_zh like '%兴安盟%' and title_en='Xing''an League';
UPDATE jiedao.ecw_region SET title_fr='Ligue de Xilingol' where title_zh like '%锡林郭勒盟%' and title_en='Xilingol League';
UPDATE jiedao.ecw_region SET title_fr='Ligue d''Alxa' where title_zh like '%阿拉善盟%' and title_en='alxa league';
UPDATE jiedao.ecw_region SET title_fr='Shenyang' where title_zh like '%沈阳市%' and title_en='Shenyang';
UPDATE jiedao.ecw_region SET title_fr='Dalian' where title_zh like '%大连市%' and title_en='Dalian';
UPDATE jiedao.ecw_region SET title_fr='Ville de Anshan' where title_zh like '%鞍山市%' and title_en='Anshan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Fushun' where title_zh like '%抚顺市%' and title_en='Fushun City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Benxi' where title_zh like '%本溪市%' and title_en='Benxi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Dandong' where title_zh like '%丹东市%' and title_en='Dandong City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jinzhou' where title_zh like '%锦州市%' and title_en='Jinzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yingkou' where title_zh like '%营口市%' and title_en='Yingkou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Fuxin' where title_zh like '%阜新市%' and title_en='Fuxin City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Liaoyang' where title_zh like '%辽阳市%' and title_en='Liaoyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Panjin' where title_zh like '%盘锦市%' and title_en='Panjin City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tieling' where title_zh like '%铁岭市%' and title_en='Tieling City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Chaoyang' where title_zh like '%朝阳市%' and title_en='Chaoyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huludao' where title_zh like '%葫芦岛市%' and title_en='Huludao City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Changchun' where title_zh like '%长春市%' and title_en='Changchun City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jilin' where title_zh like '%吉林市%' and title_en='Jilin City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Siping' where title_zh like '%四平市%' and title_en='Siping City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Liaoyuan' where title_zh like '%辽源市%' and title_en='Liaoyuan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tonghua' where title_zh like '%通化市%' and title_en='Tonghua City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Baishan' where title_zh like '%白山市%' and title_en='Baishan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Songyuan' where title_zh like '%松原市%' and title_en='Songyuan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Baicheng' where title_zh like '%白城市%' and title_en='Baicheng City';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome coréenne de Yanbian' where title_zh like '%延边朝鲜族自治州%' and title_en='Yanbian Korean Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Ville de Harbin' where title_zh like '%哈尔滨市%' and title_en='Harbin City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Qiqihar' where title_zh like '%齐齐哈尔市%' and title_en='Qiqihar City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jixi' where title_zh like '%鸡西市%' and title_en='Jixi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Hegang' where title_zh like '%鹤岗市%' and title_en='Hegang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shuangyashan' where title_zh like '%双鸭山市%' and title_en='Shuangyashan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Daqing' where title_zh like '%大庆市%' and title_en='Daqing City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yichun' where title_zh like '%伊春市%' and title_en='Yichun City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jiamusi' where title_zh like '%佳木斯市%' and title_en='Jiamusi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Qitaihe' where title_zh like '%七台河市%' and title_en='Qitaihe City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Mudanjiang' where title_zh like '%牡丹江市%' and title_en='Mudanjiang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Heihe' where title_zh like '%黑河市%' and title_en='Heihe City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Suihua' where title_zh like '%绥化市%' and title_en='Suihua City';
UPDATE jiedao.ecw_region SET title_fr='Monts du Grand Khingan' where title_zh like '%大兴安岭地区%' and title_en='Greater Khingan Mountains';
UPDATE jiedao.ecw_region SET title_fr='Shanghai' where title_zh like '%上海市%' and title_en='Shanghai';
UPDATE jiedao.ecw_region SET title_fr='Ville de Nanjing' where title_zh like '%南京市%' and title_en='Nanjing City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Wuxi' where title_zh like '%无锡市%' and title_en='Wuxi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xuzhou' where title_zh like '%徐州市%' and title_en='Xuzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Changzhou' where title_zh like '%常州市%' and title_en='Changzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Suzhou' where title_zh like '%苏州市%' and title_en='Suzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Nantong' where title_zh like '%南通市%' and title_en='Nantong City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Lianyungang' where title_zh like '%连云港市%' and title_en='Lianyungang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huai''an' where title_zh like '%淮安市%' and title_en='Huai''an City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yancheng' where title_zh like '%盐城市%' and title_en='yancheng';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yangzhou' where title_zh like '%扬州市%' and title_en='Yangzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhenjiang' where title_zh like '%镇江市%' and title_en='Zhenjiang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Taizhou' where title_zh like '%泰州市%' and title_en='Taizhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Suqian' where title_zh like '%宿迁市%' and title_en='Suqian City';
UPDATE jiedao.ecw_region SET title_fr='Hangzhou' where title_zh like '%杭州市%' and title_en='Hangzhou';
UPDATE jiedao.ecw_region SET title_fr='Ville de Ningbo' where title_zh like '%宁波市%' and title_en='Ningbo City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Wenzhou' where title_zh like '%温州市%' and title_en='Wenzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jiaxing' where title_zh like '%嘉兴市%' and title_en='Jiaxing City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huzhou' where title_zh like '%湖州市%' and title_en='Huzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shaoxing' where title_zh like '%绍兴市%' and title_en='Shaoxing City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jinhua' where title_zh like '%金华市%' and title_en='Jinhua City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Quzhou' where title_zh like '%衢州市%' and title_en='Quzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhoushan' where title_zh like '%舟山市%' and title_en='Zhoushan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Taizhou' where title_zh like '%台州市%' and title_en='Taizhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Lishui' where title_zh like '%丽水市%' and title_en='Lishui City';
UPDATE jiedao.ecw_region SET title_fr='Hefei' where title_zh like '%合肥市%' and title_en='Hefei';
UPDATE jiedao.ecw_region SET title_fr='Ville de Wuhu' where title_zh like '%芜湖市%' and title_en='Wuhu City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Bengbu' where title_zh like '%蚌埠市%' and title_en='Bengbu City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huainan' where title_zh like '%淮南市%' and title_en='Huainan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Ma''anshan' where title_zh like '%马鞍山市%' and title_en='Ma''anshan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huaibei' where title_zh like '%淮北市%' and title_en='Huaibei City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tongling' where title_zh like '%铜陵市%' and title_en='tongling';
UPDATE jiedao.ecw_region SET title_fr='Ville d''Anqing' where title_zh like '%安庆市%' and title_en='Anqing City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huangshan' where title_zh like '%黄山市%' and title_en='Huangshan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Chuzhou' where title_zh like '%滁州市%' and title_en='Chuzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Fuyang' where title_zh like '%阜阳市%' and title_en='Fuyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Suzhou' where title_zh like '%宿州市%' and title_en='Suzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Lu''an' where title_zh like '%六安市%' and title_en='Lu''an City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Bozhou' where title_zh like '%亳州市%' and title_en='Bozhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Chizhou' where title_zh like '%池州市%' and title_en='chizhou';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xuancheng' where title_zh like '%宣城市%' and title_en='Xuancheng City';
UPDATE jiedao.ecw_region SET title_fr='Fuzhou' where title_zh like '%福州市%' and title_en='Fuzhou City';
UPDATE jiedao.ecw_region SET title_fr='Xiamen' where title_zh like '%厦门市%' and title_en='Xiamen';
UPDATE jiedao.ecw_region SET title_fr='Ville de Putian' where title_zh like '%莆田市%' and title_en='Putian City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Sanming' where title_zh like '%三明市%' and title_en='Sanming City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Quanzhou' where title_zh like '%泉州市%' and title_en='Quanzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhangzhou' where title_zh like '%漳州市%' and title_en='Zhangzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Nanping' where title_zh like '%南平市%' and title_en='Nanping City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Longyan' where title_zh like '%龙岩市%' and title_en='Longyan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Ningde' where title_zh like '%宁德市%' and title_en='Ningde City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Nanchang' where title_zh like '%南昌市%' and title_en='Nanchang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jingdezhen' where title_zh like '%景德镇市%' and title_en='Jingdezhen City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Pingxiang' where title_zh like '%萍乡市%' and title_en='Pingxiang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jiujiang' where title_zh like '%九江市%' and title_en='Jiujiang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xinyu' where title_zh like '%新余市%' and title_en='Xinyu City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yingtan' where title_zh like '%鹰潭市%' and title_en='Yingtan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Ganzhou' where title_zh like '%赣州市%' and title_en='Ganzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Ji''an' where title_zh like '%吉安市%' and title_en='Ji''an City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yichun' where title_zh like '%宜春市%' and title_en='Yichun City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Fuzhou' where title_zh like '%抚州市%' and title_en='Fuzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shangrao' where title_zh like '%上饶市%' and title_en='Shangrao City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jinan' where title_zh like '%济南市%' and title_en='Jinan City';
UPDATE jiedao.ecw_region SET title_fr='Qingdao' where title_zh like '%青岛市%' and title_en='Qingdao';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zibo' where title_zh like '%淄博市%' and title_en='Zibo City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zaozhuang' where title_zh like '%枣庄市%' and title_en='Zaozhuang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Dongying' where title_zh like '%东营市%' and title_en='Dongying City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yantai' where title_zh like '%烟台市%' and title_en='Yantai City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Weifang' where title_zh like '%潍坊市%' and title_en='Weifang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jining' where title_zh like '%济宁市%' and title_en='Jining City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tai''an' where title_zh like '%泰安市%' and title_en='Tai''an City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Weihai' where title_zh like '%威海市%' and title_en='Weihai City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Rizhao' where title_zh like '%日照市%' and title_en='Rizhao City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Laiwu' where title_zh like '%莱芜市%' and title_en='Laiwu';
UPDATE jiedao.ecw_region SET title_fr='Ville de Linyi' where title_zh like '%临沂市%' and title_en='Linyi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Dezhou' where title_zh like '%德州市%' and title_en='Dezhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Liaocheng' where title_zh like '%聊城市%' and title_en='LiaoCheng';
UPDATE jiedao.ecw_region SET title_fr='Ville de Binzhou' where title_zh like '%滨州市%' and title_en='Binzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Heze' where title_zh like '%菏泽市%' and title_en='HeZe';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhengzhou' where title_zh like '%郑州市%' and title_en='Zhengzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Kaifeng' where title_zh like '%开封市%' and title_en='Kaifeng City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Luoyang' where title_zh like '%洛阳市%' and title_en='Luoyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Pingdingshan' where title_zh like '%平顶山市%' and title_en='Pingdingshan City';
UPDATE jiedao.ecw_region SET title_fr='Ville d''Anyang' where title_zh like '%安阳市%' and title_en='Anyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Hebi' where title_zh like '%鹤壁市%' and title_en='Hebi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xinxiang' where title_zh like '%新乡市%' and title_en='Xinxiang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jiaozuo' where title_zh like '%焦作市%' and title_en='Jiaozuo City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Puyang' where title_zh like '%濮阳市%' and title_en='Puyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xuchang' where title_zh like '%许昌市%' and title_en='Xuchang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Luohe' where title_zh like '%漯河市%' and title_en='Luohe City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Sanmenxia' where title_zh like '%三门峡市%' and title_en='Sanmenxia City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Nanyang' where title_zh like '%南阳市%' and title_en='Nanyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shangqiu' where title_zh like '%商丘市%' and title_en='Shangqiu City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xinyang' where title_zh like '%信阳市%' and title_en='Xinyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhoukou' where title_zh like '%周口市%' and title_en='Zhoukou';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhumadian' where title_zh like '%驻马店市%' and title_en='Zhumadian City';
UPDATE jiedao.ecw_region SET title_fr='Wuhan' where title_zh like '%武汉市%' and title_en='Wuhan';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huangshi' where title_zh like '%黄石市%' and title_en='Huangshi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shiyan' where title_zh like '%十堰市%' and title_en='Shiyan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yichang' where title_zh like '%宜昌市%' and title_en='Yichang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xiangyang' where title_zh like '%襄阳市%' and title_en='Xiangyang';
UPDATE jiedao.ecw_region SET title_fr='Ville d''Ezhou' where title_zh like '%鄂州市%' and title_en='Ezhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jingmen' where title_zh like '%荆门市%' and title_en='Jingmen City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xiaogan' where title_zh like '%孝感市%' and title_en='Xiaogan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jingzhou' where title_zh like '%荆州市%' and title_en='jingzhou';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huanggang' where title_zh like '%黄冈市%' and title_en='Huanggang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xianning' where title_zh like '%咸宁市%' and title_en='Xianning';
UPDATE jiedao.ecw_region SET title_fr='Ville de Suizhou' where title_zh like '%随州市%' and title_en='suizhou';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Tujia et Miao d''Enshi' where title_zh like '%恩施土家族苗族自治州%' and title_en='Enshi Tujia and Miao Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Ville de Changsha' where title_zh like '%长沙市%' and title_en='Changsha City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhuzhou' where title_zh like '%株洲市%' and title_en='Zhuzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xiangtan' where title_zh like '%湘潭市%' and title_en='Xiangtan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Hengyang' where title_zh like '%衡阳市%' and title_en='Hengyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shaoyang' where title_zh like '%邵阳市%' and title_en='Shaoyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yueyang' where title_zh like '%岳阳市%' and title_en='Yueyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Changde' where title_zh like '%常德市%' and title_en='Changde City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhangjiajie' where title_zh like '%张家界市%' and title_en='Zhangjiajie City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yiyang' where title_zh like '%益阳市%' and title_en='Yiyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Chenzhou' where title_zh like '%郴州市%' and title_en='Chenzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yongzhou' where title_zh like '%永州市%' and title_en='Yongzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huaihua' where title_zh like '%怀化市%' and title_en='huaihua';
UPDATE jiedao.ecw_region SET title_fr='Ville de Loudi' where title_zh like '%娄底市%' and title_en='Loudi City';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Tujia et Miao de Xiangxi' where title_zh like '%湘西土家族苗族自治州%' and title_en='Xiangxi Tujia and Miao Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Ville de Guangzhou' where title_zh like '%广州市%' and title_en='Guangzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shaoguan' where title_zh like '%韶关市%' and title_en='Shaoguan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shenzhen' where title_zh like '%深圳市%' and title_en='Shenzhen City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhuhai' where title_zh like '%珠海市%' and title_en='Zhuhai City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shantou' where title_zh like '%汕头市%' and title_en='Shantou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Foshan' where title_zh like '%佛山市%' and title_en='Foshan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jiangmen' where title_zh like '%江门市%' and title_en='Jiangmen City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhanjiang' where title_zh like '%湛江市%' and title_en='Zhanjiang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Maoming' where title_zh like '%茂名市%' and title_en='Maoming City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhaoqing' where title_zh like '%肇庆市%' and title_en='Zhaoqing City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Huizhou' where title_zh like '%惠州市%' and title_en='Huizhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Meizhou' where title_zh like '%梅州市%' and title_en='Meizhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shanwei' where title_zh like '%汕尾市%' and title_en='Shanwei City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Heyuan' where title_zh like '%河源市%' and title_en='Heyuan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yangjiang' where title_zh like '%阳江市%' and title_en='Yangjiang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Qingyuan' where title_zh like '%清远市%' and title_en='Qingyuan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Dongguan' where title_zh like '%东莞市%' and title_en='Dongguan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhongshan' where title_zh like '%中山市%' and title_en='zhongshan';
UPDATE jiedao.ecw_region SET title_fr='Îles Dongsha' where title_zh like '%东沙群岛%' and title_en='the Dongsha Islands';
UPDATE jiedao.ecw_region SET title_fr='Ville de Chaozhou' where title_zh like '%潮州市%' and title_en='Chaozhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jieyang' where title_zh like '%揭阳市%' and title_en='Jieyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yunfu' where title_zh like '%云浮市%' and title_en='Yunfu City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Nanning' where title_zh like '%南宁市%' and title_en='Nanning City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Liuzhou' where title_zh like '%柳州市%' and title_en='Liuzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Guilin' where title_zh like '%桂林市%' and title_en='Guilin City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Wuzhou' where title_zh like '%梧州市%' and title_en='Wuzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Beihai' where title_zh like '%北海市%' and title_en='Beihai City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Fangchenggang' where title_zh like '%防城港市%' and title_en='Fangchenggang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Qinzhou' where title_zh like '%钦州市%' and title_en='Qinzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Guigang' where title_zh like '%贵港市%' and title_en='Guigang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yulin' where title_zh like '%玉林市%' and title_en='Yulin City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Baise' where title_zh like '%百色市%' and title_en='Baise City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Hezhou' where title_zh like '%贺州市%' and title_en='Hezhou';
UPDATE jiedao.ecw_region SET title_fr='Ville de Hechi' where title_zh like '%河池市%' and title_en='Hechi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Laibin' where title_zh like '%来宾市%' and title_en='Laibin City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Chongzuo' where title_zh like '%崇左市%' and title_en='Chongzuo City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Haikou' where title_zh like '%海口市%' and title_en='Haikou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Sanya' where title_zh like '%三亚市%' and title_en='The city of Sanya';
UPDATE jiedao.ecw_region SET title_fr='Sansha' where title_zh like '%三沙市%' and title_en='Sansha';
UPDATE jiedao.ecw_region SET title_fr='Ville de Chongqing' where title_zh like '%重庆市%' and title_en='Chongqing City';
UPDATE jiedao.ecw_region SET title_fr='Chengdu' where title_zh like '%成都市%' and title_en='Chengdu';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zigong' where title_zh like '%自贡市%' and title_en='Zigong City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Panzhihua' where title_zh like '%攀枝花市%' and title_en='Panzhihua City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Luzhou' where title_zh like '%泸州市%' and title_en='Luzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Deyang' where title_zh like '%德阳市%' and title_en='deyang';
UPDATE jiedao.ecw_region SET title_fr='Ville de Mianyang' where title_zh like '%绵阳市%' and title_en='Mianyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Guangyuan' where title_zh like '%广元市%' and title_en='Guangyuan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Suining' where title_zh like '%遂宁市%' and title_en='Suining City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Neijiang' where title_zh like '%内江市%' and title_en='Neijiang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Leshan' where title_zh like '%乐山市%' and title_en='Leshan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Nanchong' where title_zh like '%南充市%' and title_en='Nanchong City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Meishan' where title_zh like '%眉山市%' and title_en='Meishan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yibin' where title_zh like '%宜宾市%' and title_en='Yibin City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Guang''an' where title_zh like '%广安市%' and title_en='Guang''an City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Dazhou' where title_zh like '%达州市%' and title_en='Dazhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Ya''an' where title_zh like '%雅安市%' and title_en='Ya''an City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Bazhong' where title_zh like '%巴中市%' and title_en='Bazhong City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Ziyang' where title_zh like '%资阳市%' and title_en='Ziyang City';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome tibétaine et qiang de Aba' where title_zh like '%阿坝藏族羌族自治州%' and title_en='Aba Tibetan and Qiang Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome tibétaine de Ganzi' where title_zh like '%甘孜藏族自治州%' and title_en='Ganzi Tibetan Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Yi de Liangshan' where title_zh like '%凉山彝族自治州%' and title_en='Liangshan Yi Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Ville de Guiyang' where title_zh like '%贵阳市%' and title_en='Guiyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Liupanshui' where title_zh like '%六盘水市%' and title_en='liupanshui city';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zunyi' where title_zh like '%遵义市%' and title_en='Zunyi City';
UPDATE jiedao.ecw_region SET title_fr='Ville d''Anshun' where title_zh like '%安顺市%' and title_en='Anshun City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tongren' where title_zh like '%铜仁市%' and title_en='Tongren';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Buyei et Miao de Qianxinan' where title_zh like '%黔西南布依族苗族自治州%' and title_en='Qianxinan Buyei and Miao Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Ville de Bijie' where title_zh like '%毕节市%' and title_en='Bijie City';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Miao et Dong de Qiandongnan' where title_zh like '%黔东南苗族侗族自治州%' and title_en='Qiandongnan Miao and Dong Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Buyei et Miao de Qiannan' where title_zh like '%黔南布依族苗族自治州%' and title_en='Qiannan Buyei and Miao Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Kunming' where title_zh like '%昆明市%' and title_en='Kunming';
UPDATE jiedao.ecw_region SET title_fr='Ville de Qujing' where title_zh like '%曲靖市%' and title_en='Qujing';
UPDATE jiedao.ecw_region SET title_fr='Ville de YuXi' where title_zh like '%玉溪市%' and title_en='YuXi';
UPDATE jiedao.ecw_region SET title_fr='Ville de Baoshan' where title_zh like '%保山市%' and title_en='baoshan';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhaotong' where title_zh like '%昭通市%' and title_en='zhaotong';
UPDATE jiedao.ecw_region SET title_fr='Ville de Lijiang' where title_zh like '%丽江市%' and title_en='lijiang';
UPDATE jiedao.ecw_region SET title_fr='Ville de Pu''er' where title_zh like '%普洱市%' and title_en='Pu''er City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Lincang' where title_zh like '%临沧市%' and title_en='Lincang City';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Yi de Chuxiong' where title_zh like '%楚雄彝族自治州%' and title_en='Chuxiong Yi Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Hani et Yi de Honghe' where title_zh like '%红河哈尼族彝族自治州%' and title_en='Honghe Hani and Yi Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Zhuang et Miao de Wenshan' where title_zh like '%文山壮族苗族自治州%' and title_en='Wenshan Zhuang and Miao Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Dai de Xishuangbanna' where title_zh like '%西双版纳傣族自治州%' and title_en='Xishuangbanna Dai Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Bai de Dali' where title_zh like '%大理白族自治州%' and title_en='Dali Bai Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Dai et Jingpo de Dehong' where title_zh like '%德宏傣族景颇族自治州%' and title_en='Dehong Dai and Jingpo Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Lisu de Nujiang' where title_zh like '%怒江傈僳族自治州%' and title_en='Nujiang Lisu Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome tibétaine de Diqing' where title_zh like '%迪庆藏族自治州%' and title_en='Diqing Tibetan Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Ville de Lhasa' where title_zh like '%拉萨市%' and title_en='Lhasa City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Changdu' where title_zh like '%昌都市%' and title_en='Changdu';
UPDATE jiedao.ecw_region SET title_fr='Région de Shannan' where title_zh like '%山南地区%' and title_en='Shannan region';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shigatse' where title_zh like '%日喀则市%' and title_en='Shigatse City';
UPDATE jiedao.ecw_region SET title_fr='Région de Naqu' where title_zh like '%那曲地区%' and title_en='Naqu region';
UPDATE jiedao.ecw_region SET title_fr='Région d''Ali' where title_zh like '%阿里地区%' and title_en='Ali region';
UPDATE jiedao.ecw_region SET title_fr='Ville de Linzhi' where title_zh like '%林芝市%' and title_en='Linzhi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xi''an' where title_zh like '%西安市%' and title_en='Xi''an City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tongchuan' where title_zh like '%铜川市%' and title_en='Tongchuan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Baoji' where title_zh like '%宝鸡市%' and title_en='Baoji City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xianyang' where title_zh like '%咸阳市%' and title_en='Xianyang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Weinan' where title_zh like '%渭南市%' and title_en='Weinan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yan''an' where title_zh like '%延安市%' and title_en='Yan''an City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Hanzhong' where title_zh like '%汉中市%' and title_en='Hanzhong City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yulin' where title_zh like '%榆林市%' and title_en='Yulin City';
UPDATE jiedao.ecw_region SET title_fr='Ville d''Ankang' where title_zh like '%安康市%' and title_en='Ankang City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shangluo' where title_zh like '%商洛市%' and title_en='shangluo';
UPDATE jiedao.ecw_region SET title_fr='Ville de Lanzhou' where title_zh like '%兰州市%' and title_en='Lanzhou City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jiayuguan' where title_zh like '%嘉峪关市%' and title_en='Jiayuguan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jinchang' where title_zh like '%金昌市%' and title_en='Jinchang';
UPDATE jiedao.ecw_region SET title_fr='Ville de Baiyin' where title_zh like '%白银市%' and title_en='Baiyin City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tianshui' where title_zh like '%天水市%' and title_en='Tianshui City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Wuwei' where title_zh like '%武威市%' and title_en='Wuwei City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhangye' where title_zh like '%张掖市%' and title_en='Zhangye City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Pingliang' where title_zh like '%平凉市%' and title_en='Pingliang';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jiuquan' where title_zh like '%酒泉市%' and title_en='jiuquan';
UPDATE jiedao.ecw_region SET title_fr='Ville de Qingyang' where title_zh like '%庆阳市%' and title_en='qingyang';
UPDATE jiedao.ecw_region SET title_fr='Ville de Dingxi' where title_zh like '%定西市%' and title_en='dingxi';
UPDATE jiedao.ecw_region SET title_fr='Ville de Longnan' where title_zh like '%陇南市%' and title_en='Longnan City';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Hui de Linxia' where title_zh like '%临夏回族自治州%' and title_en='Linxia Hui Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome tibétaine de Gannan' where title_zh like '%甘南藏族自治州%' and title_en='Gannan Tibetan Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xining' where title_zh like '%西宁市%' and title_en='Xining City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Haidong' where title_zh like '%海东市%' and title_en='Haidong City';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome tibétaine de Haibei' where title_zh like '%海北藏族自治州%' and title_en='Haibei Tibetan Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome tibétaine de Huangnan' where title_zh like '%黄南藏族自治州%' and title_en='Huangnan Tibetan Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome tibétaine de Hainan' where title_zh like '%海南藏族自治州%' and title_en='Hainan Tibetan Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome tibétaine de Golog' where title_zh like '%果洛藏族自治州%' and title_en='Golog Tibetan Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome tibétaine de Yushu' where title_zh like '%玉树藏族自治州%' and title_en='Yushu Tibetan Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Mongole et tibétaine de Haixi' where title_zh like '%海西蒙古族藏族自治州%' and title_en='Haixi Mongol and Tibetan Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Ville de Yinchuan' where title_zh like '%银川市%' and title_en='Yinchuan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Shizuishan' where title_zh like '%石嘴山市%' and title_en='Shizuishan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Wuzhong' where title_zh like '%吴忠市%' and title_en='Wuzhong City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Guyuan' where title_zh like '%固原市%' and title_en='Guyuan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Zhongwei' where title_zh like '%中卫市%' and title_en='Zhongwei City';
UPDATE jiedao.ecw_region SET title_fr='Ville d''Urumqi' where title_zh like '%乌鲁木齐市%' and title_en='Urumqi';
UPDATE jiedao.ecw_region SET title_fr='Ville de Karamay' where title_zh like '%克拉玛依市%' and title_en='Karamay City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Turpan' where title_zh like '%吐鲁番市%' and title_en='Turpan City';
UPDATE jiedao.ecw_region SET title_fr='Région de Hami' where title_zh like '%哈密地区%' and title_en='Hami region';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome Hui de Changji' where title_zh like '%昌吉回族自治州%' and title_en='Changji Hui Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome mongole de Bortala' where title_zh like '%博尔塔拉蒙古自治州%' and title_en='Bortala Mongol Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome mongole de Bayingolin' where title_zh like '%巴音郭楞蒙古自治州%' and title_en='Bayingolin Mongolian Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Région d''Aksu' where title_zh like '%阿克苏地区%' and title_en='Aksu region';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome kirghize de Kizilsu' where title_zh like '%克孜勒苏柯尔克孜自治州%' and title_en='Kizilsu Kyrgyz Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='Région de Kashgar' where title_zh like '%喀什地区%' and title_en='Kashgar region';
UPDATE jiedao.ecw_region SET title_fr='Région de Hotan' where title_zh like '%和田地区%' and title_en='Hotan Region';
UPDATE jiedao.ecw_region SET title_fr='Préfecture autonome kazakhe d''Ili' where title_zh like '%伊犁哈萨克自治州%' and title_en='Ili Kazak Autonomous Prefecture';
UPDATE jiedao.ecw_region SET title_fr='District de Tacheng' where title_zh like '%塔城地区%' and title_en='Tacheng District';
UPDATE jiedao.ecw_region SET title_fr='Région d''Altay' where title_zh like '%阿勒泰地区%' and title_en='Altay region';
UPDATE jiedao.ecw_region SET title_fr='Ville de Taipei' where title_zh like '%台北市%' and title_en='Taipei City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Kaohsiung' where title_zh like '%高雄市%' and title_en='Kaohsiung City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Tainan' where title_zh like '%台南市%' and title_en='Tainan City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Taichung' where title_zh like '%台中市%' and title_en='Taichung City';
UPDATE jiedao.ecw_region SET title_fr='Comté de Jinmen' where title_zh like '%金门县%' and title_en='Jinmen County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Nantou' where title_zh like '%南投县%' and title_en='Nantou County';
UPDATE jiedao.ecw_region SET title_fr='Ville de Keelung' where title_zh like '%基隆市%' and title_en='Keelung City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Hsinchu' where title_zh like '%新竹市%' and title_en='Hsinchu City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Jiayi' where title_zh like '%嘉义市%' and title_en='Jiayi City';
UPDATE jiedao.ecw_region SET title_fr='Ville de Xinbei' where title_zh like '%新北市%' and title_en='Xinbei City';
UPDATE jiedao.ecw_region SET title_fr='Comté de Yilan' where title_zh like '%宜兰县%' and title_en='Yilan County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Xinzhu' where title_zh like '%新竹县%' and title_en='Xinzhu County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Taoyuan' where title_zh like '%桃园县%' and title_en='Taoyuan County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Miaoli' where title_zh like '%苗栗县%' and title_en='Miaoli County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Changhua' where title_zh like '%彰化县%' and title_en='Changhua County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Jiayi' where title_zh like '%嘉义县%' and title_en='Jiayi County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Yunlin' where title_zh like '%云林县%' and title_en='Yunlin County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Pingdong' where title_zh like '%屏东县%' and title_en='Pingdong County';
UPDATE jiedao.ecw_region SET title_fr='Taitung' where title_zh like '%台东县%' and title_en='Taitung';
UPDATE jiedao.ecw_region SET title_fr='Comté de Hualien' where title_zh like '%花莲县%' and title_en='Hualien County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Penghu' where title_zh like '%澎湖县%' and title_en='Penghu County';
UPDATE jiedao.ecw_region SET title_fr='Comté de Lianjiang' where title_zh like '%连江县%' and title_en='Lianjiang County';
UPDATE jiedao.ecw_region SET title_fr='Île de Hong Kong' where title_zh like '%香港岛%' and title_en='Hong Kong Island';
UPDATE jiedao.ecw_region SET title_fr='Kowloon' where title_zh like '%九龙%' and title_en='Kowloon';
UPDATE jiedao.ecw_region SET title_fr='Nouveaux Territoires' where title_zh like '%新界%' and title_en='New Territories';
UPDATE jiedao.ecw_region SET title_fr='Péninsule de Macao' where title_zh like '%澳门半岛%' and title_en='Macau Peninsula';
UPDATE jiedao.ecw_region SET title_fr='Îles périphériques' where title_zh like '%离岛%' and title_en='Outlying islands';
UPDATE jiedao.ecw_region SET title_fr='Outre-mer' where title_zh like '%海外%' and title_en='overseas';
UPDATE jiedao.ecw_region SET title_fr='Yiwu' where title_zh like '%义乌市%' and title_en='yiwu';
UPDATE jiedao.ecw_region SET title_fr='Nigeria' where title_zh like '%尼日利亚(Nigeria)%' and title_en='Nigeria';
UPDATE jiedao.ecw_region SET title_fr='Ghana' where title_zh like '%加纳(Ghana)%' and title_en='Ghana';
UPDATE jiedao.ecw_region SET title_fr='Mozambique (Maputo)' where title_zh like '%莫桑比克(Maputo)%' and title_en='Mozambique (Maputo)';
UPDATE jiedao.ecw_region SET title_fr='Kenya' where title_zh like '%肯尼亚(Kenya)%' and title_en='Kenya';
UPDATE jiedao.ecw_region SET title_fr='Émirats Arabes Unis (CGU)' where title_zh like '%阿联酋(CGU)%' and title_en='United Arab Emirates (CGU)';
UPDATE jiedao.ecw_region SET title_fr='Lagos' where title_zh like '%拉各斯 (Lagso)%' and title_en='Lagso';
UPDATE jiedao.ecw_region SET title_fr='Onitsha' where title_zh like '%奥尼查 (Onitsha)%' and title_en='Onitsha';
UPDATE jiedao.ecw_region SET title_fr='Lagos (Nigeria)' where title_zh like '%拉各斯 (Lagos)%' and title_en='Lagos (Nigeria)';
UPDATE jiedao.ecw_region SET title_fr='Onitsha, Nigeria' where title_zh like '%奥尼查 (Onitsha)%' and title_en='Onitsha, Nigeria';
UPDATE jiedao.ecw_region SET title_fr='Capitale (Accra)' where title_zh like '%首都(Acrra )%' and title_en='Capital (Acrra)';
UPDATE jiedao.ecw_region SET title_fr='Accra' where title_zh like '%阿克拉(加纳)(Accra)%' and title_en='Accra';
UPDATE jiedao.ecw_region SET title_fr='Maputo' where title_zh like '%马普托(Maputo)%' and title_en='Maputo';
UPDATE jiedao.ecw_region SET title_fr='Maputo' where title_zh like '%马普托(莫桑比克)(Maputo)%' and title_en='Maputo';
UPDATE jiedao.ecw_region SET title_fr='Nairobi' where title_zh like '%内罗毕(Nairobi)%' and title_en='Nairobi';
UPDATE jiedao.ecw_region SET title_fr='Nairobi' where title_zh like '%内罗毕(肯尼亚)(Nairobi)%' and title_en='Nairobi';
UPDATE jiedao.ecw_region SET title_fr='Dubaï' where title_zh like '%迪拜(阿联酋)(Dubai)%' and title_en='Dubai';
UPDATE jiedao.ecw_region SET title_fr='Dubaï' where title_zh like '%迪拜(Dubai)%' and title_en='Dubai';
UPDATE jiedao.ecw_region SET title_fr='Côte d''Ivoire' where title_zh like '%科特迪瓦(Cote D’lvoire)%' and title_en='Cote D’lvoire';
UPDATE jiedao.ecw_region SET title_fr='Abidjan' where title_zh like '%阿比让(Abidjan)%' and title_en='Abidjan';
UPDATE jiedao.ecw_region SET title_fr='Abidjan' where title_zh like '%阿比让(Abidjan)%' and title_en='Abidjan';
UPDATE jiedao.ecw_region SET title_fr='Beira' where title_zh like '%贝拉(Beira)%' and title_en='Beira';
UPDATE jiedao.ecw_region SET title_fr='Beira' where title_zh like '%贝拉(Beira)%' and title_en='Beira';
UPDATE jiedao.ecw_region SET title_fr='Chimoio' where title_zh like '%希莫尤(Chimoio)%' and title_en='Chimoio';
UPDATE jiedao.ecw_region SET title_fr='Chimoio' where title_zh like '%希莫尤(Chimoio)%' and title_en='Chimoio';
UPDATE jiedao.ecw_region SET title_fr='Quelimane' where title_zh like '%克利马纳%' and title_en='Quelimane';
UPDATE jiedao.ecw_region SET title_fr='Quelimane' where title_zh like '%克利马纳(Quelimane)%' and title_en='Quelimane';
UPDATE jiedao.ecw_region SET title_fr='Nampula' where title_zh like '%楠普拉%' and title_en='Nampula';
UPDATE jiedao.ecw_region SET title_fr='Nampula' where title_zh like '%楠普拉(Nampula)%' and title_en='Nampula';
UPDATE jiedao.ecw_region SET title_fr='Kumasi' where title_zh like '%库马西(Kumasi)%' and title_en='Kumasi';
UPDATE jiedao.ecw_region SET title_fr='Kumasi' where title_zh like '%库马西(Kumasi)%' and title_en='kumasi';
UPDATE jiedao.ecw_region SET title_fr='Kano' where title_zh like '%卡诺(Kano)%' and title_en='Kano';
UPDATE jiedao.ecw_region SET title_fr='Kano (Nigeria)' where title_zh like '%卡诺(Kano)%' and title_en='Kano (Nigeria)';
UPDATE jiedao.ecw_region SET title_fr='Tanzanie' where title_zh like '%坦桑尼亚(Tansania)%' and title_en='Tansania';
UPDATE jiedao.ecw_region SET title_fr='Dar es Salaam' where title_zh like '%达累斯萨拉姆(Dar es Salaam)%' and title_en='Dar es Salaam';
UPDATE jiedao.ecw_region SET title_fr='Dar es Salaam' where title_zh like '%达累斯萨拉姆(Dar es Salaam)%' and title_en='Dar es Salaam';
UPDATE jiedao.ecw_region SET title_fr='Nakuru' where title_zh like '%纳库鲁%' and title_en='Nakuru';
UPDATE jiedao.ecw_region SET title_fr='Mombasa' where title_zh like '%蒙巴萨%' and title_en='Mombasa';
UPDATE jiedao.ecw_region SET title_fr='Nakuru' where title_zh like '%纳库鲁(Nakuru)%' and title_en='Nakuru';
UPDATE jiedao.ecw_region SET title_fr='Mombasa' where title_zh like '%蒙巴萨(Mombasa)%' and title_en='Mombasa';
update ecw_warehouse set title_fr='Mombasa' where title_zh='Mombasa' and title_en='Mombasa';
update ecw_warehouse set title_fr='Nakuru' where title_zh='Nakuru' and title_en='Nakuru';
......@@ -4,7 +4,6 @@ import cn.iocoder.yudao.framework.http.core.Request;
import cn.iocoder.yudao.framework.http.core.Response;
import cn.iocoder.yudao.framework.http.util.HttpUtils;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
import java.util.Map;
......@@ -46,7 +45,6 @@ public class BulksmsHttp {
* @param password 密码
* @return 参数映射
*/
@NotNull
public Map<String, Object> setParams(String mobiles, String message, String senderName, String username, String password) {
Map<String, Object> param = new HashMap<>();
param.put("username", username);
......
......@@ -52,7 +52,6 @@ public class SendChampHttp {
* @param apiKey SendChamp API密钥
* @return 返回构造好的请求头Map对象
*/
@NotNull
public Map<String, String> setHeader(String apiKey) {
Map<String, String> header = new HashMap<>();
header.put("Accept", "application/json,text/plain,*/*");
......
......@@ -71,4 +71,5 @@ public interface ErrorCodeConstants {
ErrorCode USER_ADDRESS_NOT_EXISTS = new ErrorCode(1004008026, "user.address.not.exists");
ErrorCode USER_ADDRESS_FIELD_ERROR = new ErrorCode(1004008027, "user.address.field.error");
ErrorCode SCORE_RULE_CUSTOMERSIDE_ERROR = new ErrorCode(1004008028, "score.rule.customer.side.error");
ErrorCode LEVEL_RULE_NOT_EXISTS = new ErrorCode(1004008028, "level.rule.not.exists");
}
package cn.iocoder.yudao.module.member.enums;
public enum MemberLevelStatusEnum {
ENABLED(1, "已启用"),
DRAFT(0, "未发布"),
CLOSED(2, "已禁用"),
EXPIRED(3, "已过期");
private final int value;
private final String name;
MemberLevelStatusEnum(int value, String name) {
this.value = value;
this.name = name;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
}
......@@ -3,9 +3,8 @@ package cn.iocoder.yudao.module.member.controller.admin.level;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.member.service.level.MemberUserLevelConfigService;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigBaseRespVO;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigReqVO;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigUpdateVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.ScoreRuleStatusReqVO;
import cn.iocoder.yudao.module.member.vo.userLevel.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
......@@ -44,7 +43,13 @@ public class MemberUserLevelConfigController {
public CommonResult<Boolean> delete(@Valid @RequestBody List<Long> ids) {
return success(userLevelConfigService.delete(ids));
}
@PostMapping("/get")
@ApiOperation("获得等级规则详情")
//@PreAuthorize("@ss.hasPermission('member:score-rule:query')")
public CommonResult<MemberUserLevelConfigBaseRespVO> getMemberUserLevelConfig(@Valid @RequestBody IdReqVo idReqVo) {
MemberUserLevelConfigBaseRespVO memberUserLevelConfigBaseRespVO = userLevelConfigService.getMemberUserLevelConfig(idReqVo.getId());
return success(memberUserLevelConfigBaseRespVO);
}
@PostMapping("/add")
@ApiOperation("新增")
public CommonResult<Boolean> add(@Valid @RequestBody MemberUserLevelConfigUpdateVO query) {
......@@ -56,4 +61,11 @@ public class MemberUserLevelConfigController {
public CommonResult<Boolean> update(@Valid @RequestBody MemberUserLevelConfigUpdateVO query) {
return success(userLevelConfigService.updateLevel(query));
}
@PostMapping("/status")
@ApiOperation("启用关闭")
//@PreAuthorize("@ss.hasPermission('member:score-rule:update')")
public CommonResult<Boolean> updateStatus(@Valid @RequestBody MemberUserLevelStatusReqVO memberUserLevelReqVO) {
userLevelConfigService.updateStatus(memberUserLevelReqVO);
return success(true);
}
}
package cn.iocoder.yudao.module.member.controller.admin.levelLog;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.member.service.levelLog.MemberUserLevelLogService;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Validated
@RestController
@Api(tags = "管理后台 - 会员等级记录")
@RequestMapping("/member/user-level-log")
public class MemberUserLevelLogController {
@Resource
private MemberUserLevelLogService memberUserLevelLogService;
@PostMapping("/page")
@ApiOperation("获得等级记录分页")
//@PreAuthorize("@ss.hasPermission('member:user-level-log:query')")
public CommonResult<PageResult<MemberUserLevelLogBackVO>> page(@Valid @RequestBody MemberUserLevelLogQueryVO query) {
PageResult<MemberUserLevelLogBackVO> pageResult = memberUserLevelLogService.getPage(query);
return success(pageResult);
}
}
package cn.iocoder.yudao.module.member.controller.admin.levelOperateLog;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.member.service.levelOperateLog.MemberUserLevelOperateLogService;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Validated
@RestController
@Api(tags = "管理后台 - 会员等级操作记录")
@RequestMapping("/member/level-operate-log")
public class MemberUserLevelOperateLogController {
@Resource
private MemberUserLevelOperateLogService memberUserLevelOperateLogService;
@PostMapping("/page")
@ApiOperation("获得等级操作记录分页")
//@PreAuthorize("@ss.hasPermission('member:user-level-log:query')")
public CommonResult<PageResult<MemberUserLevelOperateLogBackVO>> page(@Valid @RequestBody MemberUserLevelOperateLogQueryVO query) {
PageResult<MemberUserLevelOperateLogBackVO> pageResult = memberUserLevelOperateLogService.getPage(query);
return success(pageResult);
}
}
......@@ -29,4 +29,6 @@ public class AppMemberUserScoreInfoRespVO {
private Integer upperCount;
@ApiModelProperty(value = "图标")
private String levelIcon;
@ApiModelProperty(value = "会员等级")
private Integer level;
}
......@@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import java.util.Date;
@Data
@Builder
......@@ -34,4 +35,48 @@ public class MemberUserLevelConfigDO extends BaseDO {
* 图标
*/
private String icon;
/**
* 等级(字典配置)
*/
private Integer level;
/**
* 状态(0.未发布,1.已启用,2.已禁用,3.已过期)
*/
private Integer status;
/**
* 规则编号
*/
private String ruleNumber;
/**
* 等级有效期(数字正整数或为空)
*/
private Integer validityPeriod;
/**
* 积分累计周期(数字正整数或为空)
*/
private Integer accumulationPeriod;
/**
* 积分累计开始日期(时间选择框,时间选择,不需要日期,可为空)
*/
private Date startDate;
/**
* 启用日期
*/
private Date enableDate;
/**
* 等级规则有效期开始时间(时间选择框,结束时间可不填写,代表长期有效)
*/
private Date startTime;
/**
* 等级规则有效期结束时间(时间选择框,结束时间可不填写,代表长期有效)
*/
private Date endTime;
/**
* 等级说明
*/
private String description;
/**
* 匹配顺序(限制为数字)
*/
private Integer sort;
}
package cn.iocoder.yudao.module.member.dal.dataobject.levelLog;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("member_user_level_log")
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class MemberUserLevelLogDO extends BaseDO {
/**
* 主键
*/
@TableId
private Long id;
private Long configId;
private String operator;
private String remarks;
private Integer operateType;
private Long bpmProcessId;
}
package cn.iocoder.yudao.module.member.dal.dataobject.levelOperatLog;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("member_user_level_operate_log")
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class MemberUserLevelOperateLogDO extends BaseDO {
/**
* 主键
*/
@TableId
private Long id;
private Long configId;
private String configName;
private Long memberId;
private String operator;
private String remarks;
private Integer level;
private Integer operateType;
}
......@@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.member.dal.mysql.memberUserLevel;
import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper;
import cn.iocoder.yudao.module.member.dal.dataobject.level.MemberUserLevelConfigDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
/**
* 会员等级 Mapper
......@@ -10,5 +12,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface MemberUserLevelConfigMapper extends AbstractMapper<MemberUserLevelConfigDO> {
@ResultType(String.class)
@Select({"select rule_number from member_user_level_config order by rule_number desc limit 1"})
String getCurrentMaxMemberUserLevelRuleNumber();
}
package cn.iocoder.yudao.module.member.dal.mysql.memberUserLevelLog;
import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper;
import cn.iocoder.yudao.module.member.dal.dataobject.levelLog.MemberUserLevelLogDO;
import cn.iocoder.yudao.module.member.dal.dataobject.scoreLog.MemberUserScoreLogDO;
import cn.iocoder.yudao.module.member.vo.memberUserScoreLog.MemberUserScoreLogBackVO;
import cn.iocoder.yudao.module.member.vo.memberUserScoreLog.MemberUserScoreLogQueryVO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogQueryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 会员积分 Mapper
* @author 系统管理员
*/
@Mapper
public interface MemberUserLevelLogMapper extends AbstractMapper<MemberUserLevelLogDO> {
List<MemberUserLevelLogBackVO> getPageRecordList(@Param("start") int start, @Param("size") int size, @Param("query") MemberUserLevelLogQueryVO query);
int getPageCount(@Param("query") MemberUserLevelLogQueryVO query);
}
package cn.iocoder.yudao.module.member.dal.mysql.memberUserLevelOperateLog;
import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper;
import cn.iocoder.yudao.module.member.dal.dataobject.levelLog.MemberUserLevelLogDO;
import cn.iocoder.yudao.module.member.dal.dataobject.levelOperatLog.MemberUserLevelOperateLogDO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogQueryVO;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogQueryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 会员积分 Mapper
* @author 系统管理员
*/
@Mapper
public interface MemberUserLevelOperateLogMapper extends AbstractMapper<MemberUserLevelOperateLogDO> {
List<MemberUserLevelOperateLogBackVO> getPageRecordList(@Param("start") int start, @Param("size") int size, @Param("query") MemberUserLevelOperateLogQueryVO query);
int getPageCount(@Param("query") MemberUserLevelOperateLogQueryVO query);
}
......@@ -6,7 +6,9 @@ import cn.iocoder.yudao.module.member.dal.dataobject.level.MemberUserLevelConfig
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigBaseRespVO;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigReqVO;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigUpdateVO;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelStatusReqVO;
import javax.validation.Valid;
import java.util.List;
/**
......@@ -20,9 +22,13 @@ public interface MemberUserLevelConfigService extends IService<MemberUserLevelCo
Boolean delete(List<Long> ids);
MemberUserLevelConfigBaseRespVO getMemberUserLevelConfig(Long id);
Boolean add(MemberUserLevelConfigUpdateVO query);
Boolean updateLevel(MemberUserLevelConfigUpdateVO query);
MemberUserLevelConfigBaseRespVO getLevelByCount(Integer scoreCount);
void updateStatus(@Valid MemberUserLevelStatusReqVO memberUserLevelReqVO);
}
......@@ -5,9 +5,15 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.module.member.dal.dataobject.level.MemberUserLevelConfigDO;
import cn.iocoder.yudao.module.member.dal.mysql.memberUserLevel.MemberUserLevelConfigMapper;
import cn.iocoder.yudao.module.member.enums.MemberLevelStatusEnum;
import cn.iocoder.yudao.module.member.service.levelLog.MemberUserLevelLogService;
import cn.iocoder.yudao.module.member.util.MenberUserLevelGenCodeUtils;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigBaseRespVO;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigReqVO;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigUpdateVO;
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelStatusReqVO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogCreateReq;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
......@@ -16,13 +22,14 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.LEVEL_BOUND_RANGE_CONFLICT;
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.LEVEL_BOUND_RANGE_ERROR;
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*;
/**
* 会员积分 Service 实现类
......@@ -35,7 +42,12 @@ import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.LEVEL_BOUN
public class MemberUserLevelConfigServiceImpl extends AbstractService<MemberUserLevelConfigMapper, MemberUserLevelConfigDO> implements MemberUserLevelConfigService {
private final MemberUserLevelConfigMapper memberUserLevelConfigMapper;
@Resource
private MenberUserLevelGenCodeUtils menberUserLevelGenCodeUtils;
@Resource
private MemberUserLevelLogService logService;
@Resource
private AdminUserApi adminUserApi;
public MemberUserLevelConfigServiceImpl(MemberUserLevelConfigMapper memberUserLevelConfigMapper) {
this.memberUserLevelConfigMapper = memberUserLevelConfigMapper;
}
......@@ -45,6 +57,18 @@ public class MemberUserLevelConfigServiceImpl extends AbstractService<MemberUser
int start = (query.getPageNo() - 1) * query.getPageSize();
int size = query.getPageSize();
LambdaQueryWrapper<MemberUserLevelConfigDO> wrapper = Wrappers.lambdaQuery();
if (query.getName() != null){
wrapper.like(MemberUserLevelConfigDO::getName, query.getName());
}
if (query.getStatus() != null){
wrapper.eq(MemberUserLevelConfigDO::getStatus, query.getStatus());
}
if (query.getLevel() != null){
wrapper.eq(MemberUserLevelConfigDO::getLevel, query.getLevel());
}
if (query.getBeginCreateTime() != null&& query.getEndCreateTime() != null){
wrapper.between(MemberUserLevelConfigDO::getEnableDate, query.getBeginCreateTime(), query.getEndCreateTime());
}
wrapper.eq(MemberUserLevelConfigDO::getDeleted, 0);
wrapper.last(String.format("limit %s, %s", start, size));
List<MemberUserLevelConfigDO> list = this.list(wrapper);
......@@ -64,11 +88,40 @@ public class MemberUserLevelConfigServiceImpl extends AbstractService<MemberUser
return this.update(wrapper);
}
@Override
public MemberUserLevelConfigBaseRespVO getMemberUserLevelConfig(Long id) {
MemberUserLevelConfigDO memberUserLevelConfigDO = memberUserLevelConfigMapper.selectById(id);
if (memberUserLevelConfigDO== null){
throw exception(SCORE_RULE_NOT_EXISTS);
}
MemberUserLevelConfigBaseRespVO memberUserLevelConfigBaseRespVO = BeanUtil.copyProperties(memberUserLevelConfigDO, MemberUserLevelConfigBaseRespVO.class);
String creator = adminUserApi.getUserName(memberUserLevelConfigDO.getCreator());
memberUserLevelConfigBaseRespVO.setCreator(creator);
String updater = adminUserApi.getUserName(memberUserLevelConfigDO.getUpdater());
memberUserLevelConfigBaseRespVO.setUpdater(updater);
return memberUserLevelConfigBaseRespVO;
}
@Override
public Boolean add(MemberUserLevelConfigUpdateVO query) {
validate(query);
MemberUserLevelConfigDO memberUserLevelConfigDO = BeanUtil.copyProperties(query, MemberUserLevelConfigDO.class);
return this.saveOrUpdate(memberUserLevelConfigDO);
//生成编号
String ruleNumber = menberUserLevelGenCodeUtils.generateMemberLevelCode();
memberUserLevelConfigDO.setRuleNumber(ruleNumber);
//是否传入状态
if (query.getStatus() != null && query.getStatus() == 1){
memberUserLevelConfigDO.setStatus(query.getStatus());
memberUserLevelConfigDO.setEnableDate(new Date());
}else {
memberUserLevelConfigDO.setStatus(0);
}
//插入日志
boolean updateStatus = this.saveOrUpdate(memberUserLevelConfigDO);
if (updateStatus){
createLog(memberUserLevelConfigDO,1);
}
return updateStatus;
}
private void validate(MemberUserLevelConfigUpdateVO query) {
......@@ -95,7 +148,12 @@ public class MemberUserLevelConfigServiceImpl extends AbstractService<MemberUser
public Boolean updateLevel(MemberUserLevelConfigUpdateVO query) {
validate(query);
MemberUserLevelConfigDO memberUserLevelConfigDO = BeanUtil.copyProperties(query, MemberUserLevelConfigDO.class);
return this.saveOrUpdate(memberUserLevelConfigDO);
//插入日志
boolean updateStatus = this.saveOrUpdate(memberUserLevelConfigDO);
if (updateStatus){
createLog(memberUserLevelConfigDO,2);
}
return updateStatus;
}
@Override
......@@ -108,4 +166,35 @@ public class MemberUserLevelConfigServiceImpl extends AbstractService<MemberUser
.findAny().orElse(sortLevelConfig.get(sortLevelConfig.size() - 1));
return BeanUtil.copyProperties(memberUserLevelConfigDO, MemberUserLevelConfigBaseRespVO.class);
}
@Override
public void updateStatus(MemberUserLevelStatusReqVO memberUserLevelStatusReqVO) {
MemberUserLevelConfigDO memberUserLevelConfigDO = memberUserLevelConfigMapper.selectById(memberUserLevelStatusReqVO.getId());
if (memberUserLevelConfigDO == null) {
throw exception(LEVEL_RULE_NOT_EXISTS);
}
Integer oldStatus = memberUserLevelConfigDO.getStatus();
MemberUserLevelConfigDO upMemberLevelConfigDO = new MemberUserLevelConfigDO();
upMemberLevelConfigDO.setId(memberUserLevelStatusReqVO.getId());
if (oldStatus == MemberLevelStatusEnum.ENABLED.getValue() && memberUserLevelStatusReqVO.getStatus() == MemberLevelStatusEnum.CLOSED.getValue()) {
upMemberLevelConfigDO.setStatus(memberUserLevelStatusReqVO.getStatus());
} else if (oldStatus == MemberLevelStatusEnum.DRAFT.getValue() && memberUserLevelStatusReqVO.getStatus() == MemberLevelStatusEnum.ENABLED.getValue()) {
upMemberLevelConfigDO.setStatus(memberUserLevelStatusReqVO.getStatus());
upMemberLevelConfigDO.setEnableDate(new Date());
} else {
throw exception(SCORE_RULE_STATUS_ERROR);
}
memberUserLevelConfigMapper.updateById(upMemberLevelConfigDO);
}
private void createLog(MemberUserLevelConfigDO memberUserLevelConfigDO,Integer operateType){
MemberUserLevelLogCreateReq memberUserLevelLogcreateReq = MemberUserLevelLogCreateReq
.builder().createTime(memberUserLevelConfigDO.getCreateTime())
.configId(memberUserLevelConfigDO.getId())
.operator(memberUserLevelConfigDO.getCreator())
.remarks(null)
.operateType(operateType)
.bpmProcessId(null)
.build();
logService.createLevelLog(memberUserLevelLogcreateReq);
}
}
package cn.iocoder.yudao.module.member.service.levelLog;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import cn.iocoder.yudao.module.member.dal.dataobject.levelLog.MemberUserLevelLogDO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogCreateReq;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogQueryVO;
/**
* 会员等级日志 Service 接口
*
* @author 系统管理员
*/
public interface MemberUserLevelLogService extends IService<MemberUserLevelLogDO> {
PageResult<MemberUserLevelLogBackVO> getPage(MemberUserLevelLogQueryVO query);
Long createLevelLog(MemberUserLevelLogCreateReq createReq);
}
package cn.iocoder.yudao.module.member.service.levelLog;
import cn.hutool.core.lang.generator.SnowflakeGenerator;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.member.dal.dataobject.levelLog.MemberUserLevelLogDO;
import cn.iocoder.yudao.module.member.dal.mysql.memberUserLevelLog.MemberUserLevelLogMapper;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogCreateReq;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogQueryVO;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.MEMBER_ID_IS_NULL;
/**
* 会员等级日志 Service 实现类
*
* @author 系统管理员
*/
@Service
@Validated
public class MemberUserLevelLogServiceImpl extends AbstractService<MemberUserLevelLogMapper, MemberUserLevelLogDO> implements MemberUserLevelLogService {
@Resource
private MemberUserLevelLogMapper userLevelLogMapper;
@Resource
private SnowflakeGenerator snowflakeGenerator;
@Override
public PageResult<MemberUserLevelLogBackVO> getPage(MemberUserLevelLogQueryVO query) {
int start = (query.getPageNo() - 1) * query.getPageSize();
int size = query.getPageSize();
List<MemberUserLevelLogBackVO> list = userLevelLogMapper.getPageRecordList(start, size, query);
int total = userLevelLogMapper.getPageCount(query);
return new PageResult<>(list, total, query.getPageSize(), query.getPageNo(), (total + query.getPageSize() - 1) / query.getPageSize());
}
@Override
public Long createLevelLog(MemberUserLevelLogCreateReq createReq) {
if (createReq.getConfigId() == null) {
throw exception(MEMBER_ID_IS_NULL);
}
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
MemberUserLevelLogDO userLevelLogDO = new MemberUserLevelLogDO();
userLevelLogDO.setId(snowflakeGenerator.next());
userLevelLogDO.setConfigId(createReq.getConfigId());
userLevelLogDO.setRemarks(createReq.getRemarks());
userLevelLogDO.setOperator(loginUser.getNickname());
userLevelLogDO.setOperateType(createReq.getOperateType());
userLevelLogDO.setBpmProcessId(createReq.getBpmProcessId());
this.saveOrUpdate(userLevelLogDO);
return userLevelLogDO.getId();
}
}
package cn.iocoder.yudao.module.member.service.levelOperateLog;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import cn.iocoder.yudao.module.member.dal.dataobject.levelOperatLog.MemberUserLevelOperateLogDO;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogCreateReq;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogQueryVO;
/**
* 会员等级日志 Service 接口
*
* @author 系统管理员
*/
public interface MemberUserLevelOperateLogService extends IService<MemberUserLevelOperateLogDO> {
PageResult<MemberUserLevelOperateLogBackVO> getPage(MemberUserLevelOperateLogQueryVO query);
// Long createLevelLog(MemberUserLevelOperateLogCreateReq createReq);
}
package cn.iocoder.yudao.module.member.service.levelOperateLog;
import cn.hutool.core.lang.generator.SnowflakeGenerator;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.member.dal.dataobject.levelLog.MemberUserLevelLogDO;
import cn.iocoder.yudao.module.member.dal.dataobject.levelOperatLog.MemberUserLevelOperateLogDO;
import cn.iocoder.yudao.module.member.dal.mysql.memberUserLevelLog.MemberUserLevelLogMapper;
import cn.iocoder.yudao.module.member.dal.mysql.memberUserLevelOperateLog.MemberUserLevelOperateLogMapper;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogCreateReq;
import cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogQueryVO;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogBackVO;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogCreateReq;
import cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogQueryVO;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.MEMBER_ID_IS_NULL;
/**
* 会员等级日志 Service 实现类
*
* @author 系统管理员
*/
@Service
@Validated
public class MemberUserLevelOperateLogServiceImpl extends AbstractService<MemberUserLevelOperateLogMapper, MemberUserLevelOperateLogDO> implements MemberUserLevelOperateLogService {
@Resource
private MemberUserLevelOperateLogMapper userLevelOperateLogMapper;
@Resource
private SnowflakeGenerator snowflakeGenerator;
@Override
public PageResult<MemberUserLevelOperateLogBackVO> getPage(MemberUserLevelOperateLogQueryVO query) {
int start = (query.getPageNo() - 1) * query.getPageSize();
int size = query.getPageSize();
List<MemberUserLevelOperateLogBackVO> list = userLevelOperateLogMapper.getPageRecordList(start, size, query);
int total = userLevelOperateLogMapper.getPageCount(query);
return new PageResult<>(list, total, query.getPageSize(), query.getPageNo(), (total + query.getPageSize() - 1) / query.getPageSize());
}
// @Override
// public Long createLevelLog(MemberUserLevelOperateLogCreateReq createReq) {
// if (createReq.getConfigId() == null) {
// throw exception(MEMBER_ID_IS_NULL);
// }
// LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
// MemberUserLevelLogDO userLevelLogDO = new MemberUserLevelLogDO();
// userLevelLogDO.setId(snowflakeGenerator.next());
// userLevelLogDO.setConfigId(createReq.getConfigId());
// userLevelLogDO.setRemarks(createReq.getRemarks());
// userLevelLogDO.setOperator(loginUser.getNickname());
// userLevelLogDO.setOperateType(createReq.getOperateType());
// userLevelLogDO.setBpmProcessId(createReq.getBpmProcessId());
// this.saveOrUpdate(userLevelLogDO);
// return userLevelLogDO.getId();
// }
}
......@@ -136,6 +136,7 @@ public class MemberUserScoreServiceImpl extends AbstractService<MemberUserScoreM
infoRespVO.setLowerCount(level.getLowerCount());
infoRespVO.setUpperCount(level.getUpperCount());
infoRespVO.setLevelIcon(level.getIcon());
infoRespVO.setLevel(level.getLevel());
}
return infoRespVO;
}
......
package cn.iocoder.yudao.module.member.util;
import cn.iocoder.yudao.framework.redis.helper.RedisHelper;
import cn.iocoder.yudao.module.member.dal.mysql.ScoreRuleShareRecord.ScoreRuleShareRecordMapper;
import cn.iocoder.yudao.module.member.dal.mysql.memberUserLevel.MemberUserLevelConfigMapper;
import cn.iocoder.yudao.module.member.dal.mysql.scoreRule.ScoreRuleMapper;
import com.alibaba.excel.util.DateUtils;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.GET_LOCK_FAILED;
/**
* 根据规则生成各种code
*/
@Component
public class MenberUserLevelGenCodeUtils {
@Resource
private RedisHelper redisHelper;
@Resource
private RedissonClient redissonClient;
@Resource
private MemberUserLevelConfigMapper memberUserLevelConfigMapper;
/**
* 生成积分规则编号
*/
public String generateMemberLevelCode() {
// 编号规则为MB+年份+5位数,例如MB2400001
String key = "memberLevel:max:number";
StringBuilder code = new StringBuilder();
code.append("MB");
code.append(DateUtils.format(new Date(), "yy"));
Long codeNum;
if (redisHelper.hasKey(key)) {
codeNum = redisHelper.incrBy(key, 1);
} else {
RLock lock = redissonClient.getLock("next:memberLevel:code:lock");
try {
boolean lockSuccess = lock.tryLock(2, 2, TimeUnit.SECONDS);
if (!lockSuccess) {
throw exception(GET_LOCK_FAILED);
}
String currentMaxMemberUserLevelRuleNumber = memberUserLevelConfigMapper.getCurrentMaxMemberUserLevelRuleNumber();
if (currentMaxMemberUserLevelRuleNumber == null){
codeNum = 1L;
} else {
codeNum = Long.parseLong(currentMaxMemberUserLevelRuleNumber.substring(4)) + 1;
}
redisHelper.set(key, String.valueOf(codeNum),10, TimeUnit.SECONDS);
} catch (InterruptedException e) {
throw exception(GET_LOCK_FAILED);
} finally {
lock.unlock();
}
}
// 获得5位序列号,不足位前面补0
codeNum = codeNum % 100000;
code.append(String.format("%05d", codeNum));
return code.toString();
}
}
package cn.iocoder.yudao.module.member.vo.userLevel;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Data
@ApiModel("管理后台 - 会员等级查询返回 VO")
......@@ -29,4 +35,78 @@ public class MemberUserLevelConfigBaseRespVO {
*/
@ApiModelProperty(value = "图标")
private String icon;
/**
* 等级(字典配置)
*/
@ApiModelProperty(value = "等级")
private Integer level;
/**
* 状态(0.未发布,1.已启用,2.已禁用,3.已过期)
*/
@ApiModelProperty(value = "状态")
private Integer status;
/**
* 规则编号
*/
@ApiModelProperty(value = "规则编号")
private String ruleNumber;
/**
* 等级有效期
*/
@ApiModelProperty(value = "等级有效期")
private Integer validityPeriod;
/**
* 积分累计周期
*/
@ApiModelProperty(value = "积分累计周期")
private Integer accumulationPeriod;
/**
* 积分累计开始日期
*/
@ApiModelProperty(value = "积分开始累计时间")
private Date startDate;
/**
* 启用日期
*/
@ApiModelProperty(value = "启用日期")
private Date enableDate;
/**
* 积分开始累计时间
*/
@ApiModelProperty(value = "等级规则有效期开始时间")
private Date startTime;
/**
* 等级规则有效期结束时间
*/
@ApiModelProperty(value = "等级规则有效期结束时间")
private Date endTime;
/**
* 等级说明
*/
@ApiModelProperty(value = "等级说明")
private String description;
/**
* 匹配顺序(限制为数字)
*/
@ApiModelProperty(value = "匹配顺序")
private Integer sort;
@ExcelProperty("创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
@ExcelProperty("更新时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "更新时间", required = true)
private Date updateTime;
@ExcelProperty("创建人")
@ApiModelProperty(value = "创建人", required = true)
private String creator;
@ExcelProperty("更新人")
@ApiModelProperty(value = "更新人", required = true)
private String updater;
}
......@@ -4,6 +4,11 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* @author zhaobiyan
......@@ -13,4 +18,32 @@ import lombok.Data;
public class MemberUserLevelConfigReqVO extends PageParam {
@ApiModelProperty(value = "id")
private Long id;
/**
* 名称
*/
@ApiModelProperty(value = "等级名称")
private String name;
/**
* 等级(字典配置)
*/
@ApiModelProperty(value = "等级")
private Integer level;
/**
* 状态(0.未发布,1.已启用,2.已禁用,3.已过期)
*/
@ApiModelProperty(value = "状态")
private Integer status;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始启用时间")
private Date beginCreateTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束启用时间")
private Date endCreateTime;
}
......@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
@ApiModel("管理后台 - 会员等级编辑 VO")
......@@ -35,4 +36,66 @@ public class MemberUserLevelConfigUpdateVO {
@ApiModelProperty(value = "图标")
@NotNull(message = "icon is null")
private String icon;
/**
* 等级(字典配置)
*/
@ApiModelProperty(value = "等级")
@NotNull(message = "等级不能为空")
private Integer level;
/**
* 状态(0.未发布,1.已启用,2.已禁用,3.已过期)
*/
@ApiModelProperty(value = "状态")
private Integer status;
/**
* 规则编号
*/
@ApiModelProperty(value = "规则编号")
private String ruleNumber;
/**
* 等级有效期
*/
@ApiModelProperty(value = "等级有效期")
private Integer validityPeriod;
/**
* 积分累计周期
*/
@ApiModelProperty(value = "积分累计周期")
@NotNull(message = "积分累计周期不能为空")
private Integer accumulationPeriod;
/**
* 积分累计开始日期
*/
@ApiModelProperty(value = "积分开始累计时间")
private Date startDate;
/**
* 启用日期
*/
@ApiModelProperty(value = "启用日期")
private Date enableDate;
/**
* 积分开始累计时间
*/
@ApiModelProperty(value = "等级规则有效期开始时间")
@NotNull(message = "等级规则有效期开始时间不能为空")
private Date startTime;
/**
* 等级规则有效期结束时间
*/
@ApiModelProperty(value = "等级规则有效期结束时间")
private Date endTime;
/**
* 等级说明
*/
@ApiModelProperty(value = "等级说明")
@NotNull(message = "等级说明不能为空")
private String description;
/**
* 匹配顺序(限制为数字)
*/
@ApiModelProperty(value = "匹配顺序")
@NotNull(message = "匹配顺序不能为空")
private Integer sort;
}
package cn.iocoder.yudao.module.member.vo.userLevel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
@ApiModel("管理后台 - 启用关闭规则 VO")
public class MemberUserLevelStatusReqVO {
@ApiModelProperty(value = "主键", required = true)
@NotNull(message = "主键不能为空")
private Long id;
@ApiModelProperty(value = "状态(1已启用,2未启用,3已关闭,4已过期)", required = true)
@NotNull(message = "状态不能为空")
private Integer status;
}
package cn.iocoder.yudao.module.member.vo.userLevelLog;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* @author Smile
*/
@Data
@ApiModel("管理后台 - 等级规则记录查询 VO")
public class MemberUserLevelLogBackVO {
@ApiModelProperty(value = "操作记录id")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
@ApiModelProperty(value = "会员等级配置id")
private Long configId;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "操作时间")
private Date createTime;
@ApiModelProperty(value = "操作人")
private String operator;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "操作类型,1-新增,2-编辑", required = true)
private Integer operateType;
@ExcelProperty("审批流程ID")
@ApiModelProperty(value = "审批流程ID")
private String bpmProcessId;
}
package cn.iocoder.yudao.module.member.vo.userLevelLog;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.Map;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* @author Smile
*/
@Data
@Builder
public class MemberUserLevelLogCreateReq {
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "操作时间")
private Date createTime;
@ApiModelProperty(value = "会员等级配置id")
private Long configId;
@ApiModelProperty(value = "操作人")
private String operator;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "操作类型,1-新增,2-编辑", required = true)
private Integer operateType;
@ApiModelProperty(value = "审批流程ID")
private Long bpmProcessId;
}
package cn.iocoder.yudao.module.member.vo.userLevelLog;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author zhaobiyan
*/
@Data
@ApiModel("管理后台 - 积分记录查询 VO")
public class MemberUserLevelLogQueryVO extends PageParam {
@ApiModelProperty(value = "会员等级配置id")
private Long configId;
}
package cn.iocoder.yudao.module.member.vo.userLevelOperateLog;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* @author Smile
*/
@Data
@ApiModel("管理后台 - 等级规则记录查询 VO")
public class MemberUserLevelOperateLogBackVO {
@ApiModelProperty(value = "操作记录id")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
@ApiModelProperty(value = "会员等级配置id")
private Long configId;
@ApiModelProperty(value = "会员id")
private Long memberId;
@ApiModelProperty(value = "操作人")
private String configName;
@ApiModelProperty(value = "操作人")
private String operator;
@ApiModelProperty(value = "备注")
private String remarks;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
@ApiModelProperty(value = "操作类型,1-升级 2-降级 3-修改", required = true)
private Integer operateType;
@ApiModelProperty(value = "等级")
private Integer level;
}
package cn.iocoder.yudao.module.member.vo.userLevelOperateLog;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
/**
* @author Smile
*/
@Data
@Builder
public class MemberUserLevelOperateLogCreateReq {
@ApiModelProperty(value = "会员等级配置id")
private Long configId;
@ApiModelProperty(value = "会员id")
private Long memberId;
@ApiModelProperty(value = "操作人")
private String configName;
@ApiModelProperty(value = "操作人")
private String operator;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "操作类型,1-升级 2-降级 3-修改", required = true)
private Integer operateType;
@ApiModelProperty(value = "等级")
private Integer level;
}
package cn.iocoder.yudao.module.member.vo.userLevelOperateLog;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhaobiyan
*/
@Data
@ApiModel("管理后台 - 会员等级操作记录查询 VO")
public class MemberUserLevelOperateLogQueryVO extends PageParam {
@ApiModelProperty(value = "会员id")
private Long memberId;
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.member.dal.mysql.memberUserLevelLog.MemberUserLevelLogMapper">
<select id="getPageRecordList"
resultType="cn.iocoder.yudao.module.member.vo.userLevelLog.MemberUserLevelLogBackVO">
select
mull.id as id,
mull.config_id as configId,
mull.operator as operator,
mull.create_time as createTime,
mull.operate_type as operateType,
mull.remarks as remarks,
mull.bpm_process_id as bpmProcessId
from member_user_level_log mull
where 1=1
and mull.config_id = #{query.configId}
order by mull.create_time desc
limit #{start}, #{size}
</select>
<select id="getPageCount" resultType="java.lang.Integer">
select count(*)
from member_user_level_log mull
where 1=1
and mull.config_id = #{query.configId}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.member.dal.mysql.memberUserLevelOperateLog.MemberUserLevelOperateLogMapper">
<select id="getPageRecordList"
resultType="cn.iocoder.yudao.module.member.vo.userLevelOperateLog.MemberUserLevelOperateLogBackVO">
SELECT
mulol.id as id,
mulol.config_id as configId,
mulol.config_name as configName,
mulol.member_id as memberId,
mulol.operator as operator,
mulol.remarks as remarks,
mulol.create_time as createTime,
mulol.`level` as level,
mulol.operate_type as operateType
FROM member_user_level_operate_log mulol
where 1=1
and mulol.member_id = #{query.memberId}
order by mulol.create_time desc
limit #{start}, #{size}
</select>
<select id="getPageCount" resultType="java.lang.Integer">
select count(*)
from member_user_level_operate_log mulol
where 1=1
and mulol.member_id = #{query.memberId}
</select>
</mapper>
......@@ -581,7 +581,7 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
if (result == ApprovalResultStatusEnum.reject.getValue()) {
LambdaUpdateWrapper<OrderFeeApplicationDO> lambdaUpdateWrapper = new LambdaUpdateWrapper();
lambdaUpdateWrapper.eq(OrderFeeApplicationDO::getOrderId, orderApprovalDO.getOrderId());
lambdaUpdateWrapper.eq(OrderFeeApplicationDO::getBatchBpmBusinessId, orderApprovalDO.getOrderApprovalId());
lambdaUpdateWrapper.eq(OrderFeeApplicationDO::getBatchBpmBusinessId, orderApprovalDO.getFormId());
lambdaUpdateWrapper.set(OrderFeeApplicationDO::getStatus, ApprovalResultStatusEnum.reject.getValue());
this.update(lambdaUpdateWrapper);
orderService.updateStatus(orderApprovalDO.getOrderId(), null, null, null, null, null, 0, OrderApprovalTypeResultEnum.expense_apply_reject.getDesc());
......@@ -590,7 +590,7 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
if (result == ApprovalResultStatusEnum.cancel.getValue()) {
LambdaQueryWrapper<OrderFeeApplicationDO> lambdaQueryWrapper = new LambdaQueryWrapper();
lambdaQueryWrapper.eq(OrderFeeApplicationDO::getOrderId, orderApprovalDO.getOrderId());
lambdaQueryWrapper.eq(OrderFeeApplicationDO::getBatchBpmBusinessId, orderApprovalDO.getOrderApprovalId());
lambdaQueryWrapper.eq(OrderFeeApplicationDO::getBatchBpmBusinessId, orderApprovalDO.getFormId());
this.remove(lambdaQueryWrapper);
orderService.updateStatus(orderApprovalDO.getOrderId(), null, null, null, null, null, 0, OrderApprovalTypeResultEnum.expense_apply_cancel.getDesc());
}
......
......@@ -57,7 +57,7 @@ public interface BoxApprovalMapper extends AbstractMapper<BoxApprovalDO> {
"from ecw_box_approval a",
"where ",
"a.shipment_id = #{shipmentId}",
"a.status = 0",
"and a.approval_status = 0",
"and (a.order_id is null or (a.order_id is not null and a.order_id = #{orderId}) )",
"order by a.id desc",
"</script>"
......
......@@ -387,10 +387,9 @@ public class SmsSendServiceImpl implements SmsSendService {
throw exception(SMS_CHANNEL_NOT_EXISTS);
}
//根据debug配置决定是否发送短信
// if ((Objects.isNull(businessProperties) || !businessProperties.isDebug()) && smsChannel.getStatus() == 0) {
// smsProducer.sendSmsSendMessageV2(smsSendMessage);
// }
if ((Objects.isNull(businessProperties) || !businessProperties.isDebug()) && smsChannel.getStatus() == 0) {
smsProducer.sendSmsSendMessageV2(smsSendMessage);
}
return sendLogId;
}
......
......@@ -1059,6 +1059,7 @@ date.format.error = \u65E5\u671F\u683C\u5F0F\u4E0D\u6B63\u786E, \u6B63\u786E\u68
redeem.cancel.status.error = \u5151\u6362\u4E2D\u72B6\u6001\u7684\u8BB0\u5F55\u624D\u80FD\u64A4\u9500
level.bound.range.error = \u4E0A\u754C\u6570\u503C\u5FC5\u987B\u5927\u4E8E\u4E0B\u754C\u6570\u503C
level.bound.range.conflict = \u79EF\u5206\u8303\u56F4\u5B58\u5728\u51B2\u7A81
level.rule.not.exists = \u4F1A\u5458\u7B49\u7EA7\u89C4\u5219\u4E0D\u5B58\u5728
score.operate.idempotent.error = \u5E42\u7B49key\u51B2\u7A81
score.rule.not.exists = \u79EF\u5206\u89C4\u5219\u4E0D\u5B58\u5728
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment