fix:1.去除无用excel注解2.添加Quartz框架在pg数据库中的boolean和int转换脚本
This commit is contained in:
parent
bac24c87fe
commit
204df4954e
|
|
@ -42,19 +42,14 @@ public class QuartzJob implements Serializable {
|
|||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateTime;
|
||||
/**任务类名*/
|
||||
@Excel(name="任务类名",width=40)
|
||||
private String jobClassName;
|
||||
/**cron表达式*/
|
||||
@Excel(name="cron表达式",width=30)
|
||||
private String cronExpression;
|
||||
/**参数*/
|
||||
@Excel(name="参数",width=15)
|
||||
private String parameter;
|
||||
/**描述*/
|
||||
@Excel(name="描述",width=40)
|
||||
private String description;
|
||||
/**状态 0正常 -1停止*/
|
||||
@Excel(name="状态",width=15,dicCode="quartz_status")
|
||||
@Dict(dicCode = "quartz_status")
|
||||
private Integer status;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,37 +46,24 @@ public class StasDataSource implements Serializable {
|
|||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**实例名称*/
|
||||
@Excel(name = "数据库名称", width = 15)
|
||||
private String instanceName;
|
||||
/**数据库类型*/
|
||||
@Excel(name = "数据库类型", width = 15)
|
||||
private Integer type;
|
||||
/**数据库端口*/
|
||||
@Excel(name = "数据库端口", width = 15)
|
||||
private Integer port;
|
||||
/**服务名*/
|
||||
@Excel(name = "服务名", width = 15)
|
||||
private String serveId;
|
||||
/**DBLink*/
|
||||
@Excel(name = "DBLink", width = 15)
|
||||
private String dbLink;
|
||||
/**数据库用户名*/
|
||||
@Excel(name = "数据库用户名", width = 15)
|
||||
private String username;
|
||||
/**数据库密码*/
|
||||
@Excel(name = "数据库密码", width = 15)
|
||||
private String password;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
private String remark;
|
||||
/**删除状态*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**Ip地址*/
|
||||
@Excel(name = "数据源地址", width = 15)
|
||||
private String ipAddress;
|
||||
/**描述*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
private String description;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
--需登录posgres用户,打开stas数据库窗口执行脚本
|
||||
|
||||
-- 布尔转int
|
||||
CREATE OR REPLACE FUNCTION "boolean_to_smallint"("b" bool)
|
||||
RETURNS "pg_catalog"."int2" AS $BODY$
|
||||
BEGIN
|
||||
RETURN (b::boolean)::bool::int;
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
-- int转布尔
|
||||
CREATE OR REPLACE FUNCTION "smallint_to_boolean"("i" int2)
|
||||
RETURNS "pg_catalog"."bool" AS $BODY$
|
||||
BEGIN
|
||||
RETURN (i::int2)::integer::bool;
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
-- 在 PostgreSQL 数据库中创建自定义的数据类型转换规则
|
||||
CREATE CAST (BOOLEAN AS SMALLINT) WITH FUNCTION boolean_to_smallint AS IMPLICIT;
|
||||
CREATE CAST (SMALLINT AS BOOLEAN) WITH FUNCTION smallint_to_boolean AS ASSIGNMENT;
|
||||
|
||||
-- 测试
|
||||
SELECT true::smallint;
|
||||
Loading…
Reference in New Issue
Block a user