Closed jasonsuzhou closed 5 years ago
数据库主键字段类型是bigint,对应生成的dao层代码类型是Long,但是controller生成的类型是Integer
controller也应该生成Long类型的
@RequestMapping(path = "", method = RequestMethod.DELETE) @Transactional public long deleteBatch(@RequestParam("id") List<Integer> ids) {//这里是integer long count = 0; for (Integer id : ids) { count += mapper.deleteByPrimaryKey(id);//这里接受的Long } return count; }
JDK Version:
Database:
Others: N/A
提供的模版仅供参考使用,如果要生成controller、service,建议自己编写模版
I'm submitting a...
Current behavior
数据库主键字段类型是bigint,对应生成的dao层代码类型是Long,但是controller生成的类型是Integer
Expected behavior
controller也应该生成Long类型的
Minimal reproduction of the problem with instructions
Environment
JDK Version:
Database:
Others: N/A