使用coneyEdit 快速建立枚举类
枚举示例
package com.beiming.nonlitigation.business.common.enums;
/**
* Desc:案件主状态枚举类
* @author JACKR
*
*/
public enum CaseStatusEnum {
DRAFT("草稿", 1),
REGISTERED("已经登记", 2),
REGISTRATION_WAS_RETURNED("登记被退回", 3);
private String value;
private Integer order;
private CaseStatusEnum(String value, Integer order) {
this.value = value;
this.order = order;
}
public String getValue() {
return value;
}
public Integer getOrder() {
return order;
}
}
EXCEL数据示例
01 简单纠纷
02 一般纠纷
03 重大纠纷
04 疑难纠纷
1复制数据然后使用coneyEdit
// $tx.1 代表说明 $tx.2 代表排序 以此类推
demo("$tx.2", $tx.1)
cc.p
复制粘贴使conneyedit生效后的结果
demo("简单纠纷", 01)
demo("一般纠纷", 02)
demo("重大纠纷", 03)
demo("疑难纠纷", 04)
2翻译 ,然后删除空行 添加下划线 替换空格,然后转大写
unsophisticated dispute
General disputes
Major disputes
Difficult Disputes
cc.dbl //删除空行
unsophisticated dispute
General disputes
Major disputes
Difficult Disputes
cc.aac 1v _ // 添加
unsophisticated_ dispute
General_ disputes
Major_ disputes
Difficult_ Disputes
cc.rs @b //替换空格
unsophisticated_dispute
General_disputes
Major_disputes
Difficult_Disputes
cc.ml up // 然后转大写
UNSOPHISTICATED_DISPUTE
GENERAL_DISPUTES
MAJOR_DISPUTES
DIFFICULT_DISPUTES
3使用VSCODE的批量编辑合并代码 或者使用coney也可以
UNSOPHISTICATED_DISPUTEdemo(“简单纠纷”, 01)
GENERAL_DISPUTESdemo(“一般纠纷”, 02)
MAJOR_DISPUTESdemo(“重大纠纷”, 03)
DIFFICULT_DISPUTESdemo(“疑难纠纷”, 04)
4得到所有枚举类型和英文大写显示
提取数据库表设计信息
数据库表DDL数据模板一份
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增',
`login_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户登录名',
`mobile_phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手机号',
`user_type` varchar(255) NOT NULL COMMENT '用户类型',
`id_card` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '身份证',
`card_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '证件种类',
`user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户姓名',
`head_portrait_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
`password` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '密码',
`is_real_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '是否实名',
`is_facial_verify` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '是否完成人脸识别',
`last_login_time` datetime DEFAULT NULL COMMENT '最后登录时间',
`status` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '0' COMMENT '状态 0 正常 1 删除',
`remark` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
`create_user` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改人',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`version` int(11) DEFAULT '0' COMMENT '版本号',
cc.gc ^-1q // 获取备注
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `uk_user_mobilePhone` (`mobile_phone`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=202384 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户表';
总结
conyEdit可以做很多方便开发的事情,不管是开发在简单的数据处理上更加方便。