diff --git a/jeecg-boot-module/jeecg-module-service/src/main/java/org/jeecg/modules/service/controller/AuthUserController.java b/jeecg-boot-module/jeecg-module-service/src/main/java/org/jeecg/modules/service/controller/AuthUserController.java index ee4344d..b7ee1bf 100644 --- a/jeecg-boot-module/jeecg-module-service/src/main/java/org/jeecg/modules/service/controller/AuthUserController.java +++ b/jeecg-boot-module/jeecg-module-service/src/main/java/org/jeecg/modules/service/controller/AuthUserController.java @@ -22,12 +22,15 @@ import lombok.extern.slf4j.Slf4j; import org.jeecg.modules.service.dto.AuthUserUpdateDTO; +import org.jeecg.modules.service.dto.CardApplicationDTO; import org.jeecg.modules.service.entity.AuthUser; import org.jeecg.modules.service.service.IAuthUserService; import org.jeecg.modules.service.vo.DispatchDetailVO; import org.jeecg.modules.service.vo.DispatchUserVO; import org.jeecg.modules.service.vo.MyGroupMemberVO; import org.jeecg.modules.service.vo.RecommendUserVO; +import org.jeecg.modules.system.entity.CardApplicationCustomers; +import org.jeecg.modules.system.service.ICardApplicationCustomersService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -58,6 +61,9 @@ @Autowired private IAuthUserService authUserService; + @Autowired + private ICardApplicationCustomersService cardApplicationCustomersService; + /** *我的-推荐用户列表 */ @@ -127,4 +133,23 @@ DispatchDetailVO vo = authUserService.dispatchUserDetail(id); return Result.OK(vo); } + + /** + * 办卡 + */ + @RequestMapping(value = "/cardApplication", method = RequestMethod.POST) + public Result cardApplication(@RequestBody CardApplicationDTO cardApplicationDTO) { + CardApplicationCustomers cardApplicationCustomers = cardApplicationCustomersService.getById(cardApplicationDTO.getId()); + if (cardApplicationCustomers == null){ + return Result.error("预约单不存在"); + } + if (cardApplicationCustomers.getStatus().equals("2")){ + return Result.error("该预约单已处理"); + } + cardApplicationCustomers.setStatus("2"); + cardApplicationCustomers.setTransactionPhone(cardApplicationDTO.getTransactionPhone()); + cardApplicationCustomers.setAmount(cardApplicationDTO.getAmount()); + cardApplicationCustomersService.updateById(cardApplicationCustomers); + return Result.OK("提交办卡成功"); + } }