下面是生成模板时 java的报错信息,错误指向ftl模板中pkColumnType解析错误:
2020-12-14 15:55:28.000 DEBUG 38589 --- [http-nio-8001-exec-5] .m.m.a.ExceptionHandlerExceptionResolver : Using @TwistZz public org.springframework.http.ResponseEntity<co.yixiang.handler.ApiError> co.yixiang.handler.GlobalExceptionHandler.handleException(java.lang.Throwable)
2020-12-14 15:55:28.000 ERROR 38589 --- [http-nio-8001-exec-5] c.y.handler.GlobalExceptionHandler : java.lang.RuntimeException: cn.hutool.extra.template.TemplateException: InvalidReferenceException: The following has evaluated to null or missing:
==> pkColumnType [in template "generator/admin/DtoP.ftl" at line 19, column 15]
附表结构
create table yshopb2c.b_auction_product
(
id bigint(32) auto_increment
primary key,
name varchar(100) null comment '商品名称',
type int not null comment '所属分类 1-房产,2-机动车,3-土地,4-股权债券,5-文物艺术品,6-生活品,7-其他资产',
price_start decimal(30, 2) not null comment '起拍价',
method int not null comment '拍卖方式 1-线下,2-加价,3-降价',
auction_id bigint(32) null comment '拍卖会id',
price_bail decimal(30, 2) not null comment '保证金',
price_range decimal(30, 2) not null comment '价格幅度 根据method,1线下-加价,2加价,3降价',
is_qualify int not null comment '资质要求 1-需要,0不需要',
start_time datetime not null comment '起拍时间',
detail text null comment '拍品详情',
document text null comment '文件资料 url,多个用“,”隔开',
code varchar(100) not null comment '拍品编号',
state int null comment '状态 0-暂未拍卖,1-已被拍卖,-1-流拍',
shot_uid bigint(32) null comment '获得者uid',
create_time datetime null,
update_time datetime null,
is_del int null,
province varchar(100) null comment '省',
city varchar(100) null comment '市',
district varchar(100) null comment '区',
bidding_cycle int null comment '竞标周期(单位:分钟)加价拍,降价拍才有',
price_reserve decimal(30, 2) not null comment '底价 降价拍才有'
)
comment '拍品';