- /delete/{id} 对应 @PathVariable("enterpriseId") Long enterpriseId
@RequestMapping(value = "/delete/{Id}", method = {RequestMethod.GET})
public ResponseEntity<Object> deleteDebtorEnterpriseByID(@PathVariable("Id") Long enterpriseId) {
debtorEnterpriseService.deleteDebtorEnterpriseByID(new RequestContext(), enterpriseId);
return new ResponseEntity(new HttpResponse<>(), HttpStatus.OK);
}
- /delete 对应 @RequestParam(value = "id", request = true) Long id
@RequestMapping(value = "/joinenterprise", method = {RequestMethod.GET})
public ResponseEntity<Object> joinDebtor(@RequestParam(value = "userId", required = true) Long userId,
@RequestParam(value = "enterpriseId", required = true) Long enterpriseId) {
debtorEnterpriseService.joinDebtorEnterprise(new RequestContext(), userId, enterpriseId);
return new ResponseEntity(new HttpResponse<>(), HttpStatus.OK);
}
@RequestMapping(value = "/modify", method = {RequestMethod.POST})
public ResponseEntity<Object> modifyDebtorEnterpriseInfo(@RequestBody DebtorEnterpriseInfoRequest debtorEnterpriseInfoRequest) {
List<DebtorPropertyValueBO> debtorPropertyValueBOList = BeanUtils.convert(debtorEnterpriseInfoRequest.getDebtorPropertyValueRequestList(),DebtorPropertyValueBO.class);
DebtorEnterpriseInfoBO debtorEnterpriseInfoBO = BeanUtils.convert(debtorEnterpriseInfoRequest, DebtorEnterpriseInfoBO.class);
debtorEnterpriseInfoBO.setDebtorPropertyValueListBO(debtorPropertyValueBOList);
debtorEnterpriseService.modifyDebtorEnterpriseInfo(new RequestContext(), debtorEnterpriseInfoBO);
return new ResponseEntity(new HttpResponse<>(), HttpStatus.OK);
}