|
|
|
@ -42,7 +42,7 @@ public class ${entityName}Controller extends BaseController {
|
|
|
|
|
private I${entityName}Service ${entityName?uncap_first}Service;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 分页列表查询
|
|
|
|
|
* 分页
|
|
|
|
|
*
|
|
|
|
|
* @param ${entityName?uncap_first}
|
|
|
|
|
* @param pageNo
|
|
|
|
@ -50,7 +50,7 @@ public class ${entityName}Controller extends BaseController {
|
|
|
|
|
* @param req
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询")
|
|
|
|
|
@ApiOperation(value="分页", notes="分页")
|
|
|
|
|
@ApiImplicitParams({
|
|
|
|
|
@ApiImplicitParam(name = "pageNo", value = "分页参数:当前页", dataType = "String", paramType = "query"),
|
|
|
|
|
@ApiImplicitParam(name = "pageSize", value = "分页参数:每页数量", dataType = "String", paramType = "query")
|
|
|
|
@ -66,9 +66,9 @@ public class ${entityName}Controller extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ${tableVo.ftlDescription}-查询所有数据
|
|
|
|
|
* 查询所有数据
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("${tableVo.ftlDescription}-查询所有数据")
|
|
|
|
|
@ApiOperation("查询所有数据")
|
|
|
|
|
@GetMapping("/listAll")
|
|
|
|
|
public AjaxResult listAll() {
|
|
|
|
|
return AjaxResult.success(${entityName?uncap_first}Service.list());
|
|
|
|
@ -89,9 +89,9 @@ public class ${entityName}Controller extends BaseController {
|
|
|
|
|
* @param ${entityName?uncap_first}
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
|
|
|
|
@Log(title = "${tableVo.ftlDescription}-添加", businessType = BusinessType.INSERT)
|
|
|
|
|
@PostMapping(value = "/add")
|
|
|
|
|
@ApiOperation(value="添加", notes="添加")
|
|
|
|
|
@Log(title = "添加", businessType = BusinessType.INSERT)
|
|
|
|
|
@PostMapping
|
|
|
|
|
public AjaxResult add(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
|
|
|
|
${entityName?uncap_first}Service.save(${entityName?uncap_first});
|
|
|
|
|
return AjaxResult.success("添加成功");
|
|
|
|
@ -103,9 +103,9 @@ public class ${entityName}Controller extends BaseController {
|
|
|
|
|
* @param ${entityName?uncap_first}
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Log(title = "${tableVo.ftlDescription}-编辑", businessType = BusinessType.UPDATE)
|
|
|
|
|
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
|
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
|
|
|
@Log(title = "编辑", businessType = BusinessType.UPDATE)
|
|
|
|
|
@ApiOperation(value="编辑", notes="编辑")
|
|
|
|
|
@PutMapping
|
|
|
|
|
public AjaxResult edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
|
|
|
|
${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
|
|
|
|
|
return AjaxResult.success("编辑成功!");
|
|
|
|
@ -117,8 +117,8 @@ public class ${entityName}Controller extends BaseController {
|
|
|
|
|
* @param id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Log(title = "${tableVo.ftlDescription}-通过id删除", businessType = BusinessType.DELETE)
|
|
|
|
|
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
|
|
|
|
@Log(title = "通过id删除", businessType = BusinessType.DELETE)
|
|
|
|
|
@ApiOperation(value="通过id删除", notes="通过id删除")
|
|
|
|
|
@DeleteMapping(value = "/delete")
|
|
|
|
|
public AjaxResult delete(@RequestParam(name="id",required=true) String id) {
|
|
|
|
|
${entityName?uncap_first}Service.removeById(id);
|
|
|
|
@ -131,12 +131,12 @@ public class ${entityName}Controller extends BaseController {
|
|
|
|
|
* @param ids
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Log(title = "${tableVo.ftlDescription}-批量删除", businessType = BusinessType.DELETE)
|
|
|
|
|
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
|
|
|
|
@Log(title = "批量删除", businessType = BusinessType.DELETE)
|
|
|
|
|
@ApiOperation(value="批量删除", notes="批量删除")
|
|
|
|
|
@DeleteMapping(value = "/deleteBatch")
|
|
|
|
|
public AjaxResult deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
|
|
|
this.${entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
|
|
return AjaxResult.success("批量删除成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|