@ApiOperation( value = "/user/getUserList",httpMethod ="post",notes = "查询用户列表") @ApiImplicitParams({ @ApiImplicitParam(paramType="query", name = "pageNumber", value = "页数",dataType="int"), @ApiImplicitParam(paramType="query", name = "pageSize", value = "每页大小",dataType="int"), @ApiImplicitParam(paramType="query", name = "token", value = "token",dataType="string"), }) @ApiResponses({ @ApiResponse(code = 200, message = "Success",response = UserDto.class)})//无效 public void getUserList(@Para("") User user, @Para(value = "pageNumber", defaultValue = "1") int pageNumber, @Para(value = "pageSize", defaultValue = "10") int pageSize,String token) { Result result = userService.getUserList(user, pageNumber, pageSize,getRequest(),token); out(result); }
效果:
怎么把创建数据库时候写的备注 用上呢?
自动生成的 model:
BaseUser<BaseUser<>> Model<> IBean { (java.lang.String id) { set(id)()} java.lang.String () { getStr()} (java.lang.String username) { set(username)()} java.lang.String () { getStr()} (java.lang.String password) { set(password)()} java.lang.String () { getStr()} (java.util.Date createTime) { set(createTime)()} java.util.Date () { get()} (java.util.Date updateTime) { set(updateTime)()} java.util.Date () { get()} (java.lang.Integer deleted) { set(deleted)()} java.lang.Integer () { getInt()} (java.lang.Integer enable) { set(enable)()} java.lang.Integer () { getInt()} (java.lang.String realName) { set(realName)()} java.lang.String () { getStr()} (java.lang.String idNumber) { set(idNumber)()} java.lang.String () { getStr()} (java.lang.String employeeId) { set(employeeId)()} java.lang.String () { getStr()} (java.lang.Integer isPolice) { set(isPolice)()} java.lang.Integer () { getInt()} (java.lang.String checkCode) { set(checkCode)()} java.lang.String () { getStr()} (java.util.Date userExpires) { set(userExpires)()} java.util.Date () { get()} (java.util.Date passwordExpires) { set(passwordExpires)()} java.util.Date () { get()} (java.lang.String ipAddr) { set(ipAddr)()} java.lang.String () { getStr()} (java.lang.Integer isNeedChangePassword) { set(isNeedChangePassword)()} java.lang.Integer () { getInt()} }
请教论讨的各位大神,生成api文档的时候,返回一个实体类呢,怎么才能方便的返回值的意思给前端呢?
像这样:
项目:jfinal注解扫描
generate.setGenerateRemarkers(true);