spawpaw / mybatis-generator-gui-extension

图形化MBG,内置丰富插件,可生成Service、Controller、View,配置简单。 A powerful GUI tool for MyBatisGenerator(MBG)
Other
642 stars 233 forks source link

生成的controller接收的主键参数类型不对 #41

Closed jasonsuzhou closed 5 years ago

jasonsuzhou commented 5 years ago

I'm submitting a...

Current behavior

数据库主键字段类型是bigint,对应生成的dao层代码类型是Long,但是controller生成的类型是Integer

Expected behavior

controller也应该生成Long类型的

Minimal reproduction of the problem with instructions

@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;
    }

Environment

JDK Version:

Database:

Others: N/A

spawpaw commented 5 years ago

提供的模版仅供参考使用,如果要生成controller、service,建议自己编写模版