style(项目管理产品需求重构): 完善产品里程碑
优化接口命名 Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
parent
0e71af317b
commit
56fc58cf3b
|
|
@ -21,83 +21,77 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 产品计划Controller
|
||||
* 产品里程碑Controller
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2023-10-10
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "项目管理-产品计划相关接口")
|
||||
@Api(tags = "项目管理-产品里程碑相关接口")
|
||||
@RequestMapping("/{enterpriseIdentifier}/pmsProductPlan")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "enterpriseIdentifier", value = "企业标识", paramType = "path", dataType = "String")
|
||||
})
|
||||
public class PmsProductPlanController extends BaseController
|
||||
{
|
||||
public class PmsProductPlanController extends BaseController {
|
||||
@Autowired
|
||||
private IPmsProductPlanService pmsProductPlanService;
|
||||
|
||||
/**
|
||||
* 查询产品计划列表
|
||||
* 查询产品里程碑列表
|
||||
*/
|
||||
@RequiresPermissions("pms:pmsProduct:show")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value = "查询产品计划列表")
|
||||
@ApiOperation(value = "查询产品里程碑列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNum", value = "当前记录起始索引", paramType = "query", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示记录数", paramType = "query", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "orderByColumn", value = "排序列(开始时间:startTime,结束时间:endTime,产品需求数:productRequirementCount,优先级:priorityId)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "isAsc", value = "排序的方向desc或者asc,默认asc", paramType = "query", dataType = "String")
|
||||
})
|
||||
public GenericsTableDataInfo<PmsProductPlanDataVo> list(@Validated PmsProductPlanSearchVo pmsProductPlanSearchVo)
|
||||
{
|
||||
public GenericsTableDataInfo<PmsProductPlanDataVo> list(@Validated PmsProductPlanSearchVo pmsProductPlanSearchVo) {
|
||||
return pmsProductPlanService.selectPmsProductPlanList(pmsProductPlanSearchVo.toPmsProductPlan());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品计划详细信息
|
||||
* 获取产品里程碑详细信息
|
||||
*/
|
||||
@RequiresPermissions("pms:pmsProduct:show")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation(value = "获取产品计划详细信息")
|
||||
public GenericsAjaxResult<PmsProductPlanDataVo> getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
@ApiOperation(value = "获取产品里程碑详细信息")
|
||||
public GenericsAjaxResult<PmsProductPlanDataVo> getInfo(@PathVariable("id") Long id) {
|
||||
return genericsSuccess(pmsProductPlanService.selectPmsProductPlanDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品计划
|
||||
* 新增产品里程碑
|
||||
*/
|
||||
@RequiresPermissions("pms:pmsProductPlan:add")
|
||||
@Log(title = "产品计划", businessType = BusinessType.INSERT)
|
||||
@Log(title = "产品里程碑", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增产品计划")
|
||||
public AjaxResult add(@RequestBody @Validated PmsProductPlanInputVo pmsProductPlanInputVo)
|
||||
{
|
||||
@ApiOperation(value = "新增产品里程碑")
|
||||
public AjaxResult add(@RequestBody @Validated PmsProductPlanInputVo pmsProductPlanInputVo) {
|
||||
return success(pmsProductPlanService.insertPmsProductPlan(pmsProductPlanInputVo.toPmsProductPlan()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品计划
|
||||
* 修改产品里程碑
|
||||
*/
|
||||
@RequiresPermissions("pms:pmsProductPlan:edit")
|
||||
@Log(title = "产品计划", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "产品里程碑", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改产品计划")
|
||||
public AjaxResult edit(@RequestBody @Validated PmsProductPlanUpdateVo pmsProductPlanUpdateVo)
|
||||
{
|
||||
@ApiOperation(value = "修改产品里程碑")
|
||||
public AjaxResult edit(@RequestBody @Validated PmsProductPlanUpdateVo pmsProductPlanUpdateVo) {
|
||||
return toAjax(pmsProductPlanService.updatePmsProductPlan(pmsProductPlanUpdateVo.toPmsProductPlan()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品计划
|
||||
* 删除产品里程碑
|
||||
*/
|
||||
@RequiresPermissions("pms:pmsProductPlan:remove")
|
||||
@Log(title = "产品计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation(value = "删除产品计划")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
@Log(title = "产品里程碑", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation(value = "删除产品里程碑")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(pmsProductPlanService.deletePmsProductPlanByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue