|
|
@ -87,27 +87,27 @@ public class ${entityName}Controller extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 新增
|
|
|
|
* 新增
|
|
|
|
* @param ${entityName?uncap_first}
|
|
|
|
* @param add${entityName}PVO
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ApiOperation(value="新增", notes="新增")
|
|
|
|
@ApiOperation(value="新增", notes="新增")
|
|
|
|
@Log(title = "新增", businessType = BusinessType.INSERT)
|
|
|
|
@Log(title = "新增", businessType = BusinessType.INSERT)
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody Add${entityName}PVO ${entityName?uncap_first}) {
|
|
|
|
public AjaxResult add(@RequestBody Add${entityName}PVO add${entityName}PVO) {
|
|
|
|
${entityName?uncap_first}Service.save(${entityName?uncap_first});
|
|
|
|
${entityName?uncap_first}Service.save(add${entityName}PVO);
|
|
|
|
return AjaxResult.success("新增成功");
|
|
|
|
return AjaxResult.success("新增成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 编辑
|
|
|
|
* 编辑
|
|
|
|
* @param ${entityName?uncap_first}
|
|
|
|
* @param edit${entityName}PVO
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Log(title = "编辑", businessType = BusinessType.UPDATE)
|
|
|
|
@Log(title = "编辑", businessType = BusinessType.UPDATE)
|
|
|
|
@ApiOperation(value="编辑", notes="编辑")
|
|
|
|
@ApiOperation(value="编辑", notes="编辑")
|
|
|
|
@PutMapping
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@RequestBody Edit${entityName}PVO ${entityName?uncap_first}) {
|
|
|
|
public AjaxResult edit(@RequestBody Edit${entityName}PVO edit${entityName}PVO) {
|
|
|
|
${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
|
|
|
|
${entityName?uncap_first}Service.updateById(edit${entityName}PVO);
|
|
|
|
return AjaxResult.success("编辑成功!");
|
|
|
|
return AjaxResult.success("编辑成功!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|