接口优化

This commit is contained in:
xy
2025-07-15 18:03:50 +08:00
parent 6782b19b7d
commit ffb6ead753
4 changed files with 14 additions and 2 deletions

View File

@@ -84,7 +84,7 @@ public class AppProjectController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/updateProject")
@ApiOperation("web修改项目信息")
public HttpResult<Boolean> updateProject(@RequestBody AppProjectAuditParm appProjectAuditParm){
public HttpResult<Boolean> updateProject(@RequestBody @Validated AppProjectAuditParm appProjectAuditParm){
String methodDescribe = getMethodDescribe("updateProject");
Boolean flag = appProjectService.updateProject(appProjectAuditParm);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);

View File

@@ -253,13 +253,21 @@ class AppProjectServiceImpl extends ServiceImpl<AppProjectMapper, AppProjectPO>
}
@Override
@Transactional(rollbackFor = BusinessException.class)
public Boolean updateProject(AppProjectAuditParm appProjectAuditParm) {
return this.lambdaUpdate().set(AppProjectPO::getName,appProjectAuditParm.getName())
//修改项目表
this.lambdaUpdate().set(AppProjectPO::getName,appProjectAuditParm.getName())
.set(AppProjectPO::getArea,appProjectAuditParm.getArea())
.set(AppProjectPO::getDescription,appProjectAuditParm.getDescription())
.eq(AppProjectPO::getId,appProjectAuditParm.getId())
.eq(AppProjectPO::getStatus,"1")
.update();
//修改台账表
CsLedger csLedger = new CsLedger();
csLedger.setId(appProjectAuditParm.getId());
csLedger.setName(appProjectAuditParm.getName());
csLedgerMapper.updateById(csLedger);
return true;
}
@Override