From 4fa1c90953a94911a145a18857df2abfccad5d55 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期五, 25 七月 2025 10:01:08 +0800 Subject: [PATCH] zjh20250725 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java | 36 ++++++++++-------------------------- 1 files changed, 10 insertions(+), 26 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java index 7244ec4..4b108b7 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java @@ -163,11 +163,6 @@ return AjaxResult.error("韬唤璇佸彿鐮侀敊璇�"); } } -// if(cusIdcard.length()==9){ -// if (!MatchUtils.cardValidates(cusIdcard)) { -// return AjaxResult.error("韬唤璇佸彿鐮侀敊璇�"); -// } -// } } @@ -330,18 +325,16 @@ } } } else if(null != s && s.equalsIgnoreCase("Y")) { - TjCustomer requestCommonHisApi = isRequestCommonHisApi(tjCustomer); - if (null !=requestCommonHisApi){ - tjCustomerService.save(requestCommonHisApi); - } - }else { - tjCustomerService.save(tjCustomer); + tjCustomer = isRequestCommonHisApi(tjCustomer); } - tjCustomer.setTeamNo(tjReservation.getTeamNo()); - tjCustomer.setCompId(tjReservation.getCompanyId()); - tjCustomer.setReservationId(tjReservation.getId()); - tjCustomer.setDiscount(tjReservation.getDiscount()); - tjCustomer.setGroupingId(tjReservation.getGroupingId()); + if(null != tjCustomer){ + tjCustomerService.save(tjCustomer); + tjCustomer.setTeamNo(tjReservation.getTeamNo()); + tjCustomer.setCompId(tjReservation.getCompanyId()); + tjCustomer.setReservationId(tjReservation.getId()); + tjCustomer.setDiscount(tjReservation.getDiscount()); + tjCustomer.setGroupingId(tjReservation.getGroupingId()); + } return success(tjCustomer); } @@ -354,16 +347,7 @@ if (null == tjCustomerServiceOne) { return AjaxResult.error("璇ヤ汉鍛樹俊鎭笉瀛樺湪璇峰厛杩涜鐧昏!!!"); } -// if (null != key && key.equals("Y")) { - String cardId = tjCustomerServiceOne.getCardId(); - if (null != cardId && !cardId.equals("0")) { -// int i = tjOrderService.selectTjOrderByCardId(cardId); -// if (i > 0) { -// return AjaxResult.error("涓嶅彲閲嶅绛惧埌"); -// } - } -// } if(!tjCustomerServiceOne.getAge().equals(String.valueOf(DateUtil.ageOfNow(tjCustomerServiceOne.getCusBrithday())))){ tjCustomerServiceOne.setAge(String.valueOf(DateUtil.ageOfNow(tjCustomerServiceOne.getCusBrithday()))); tjCustomerService.updateById(tjCustomerServiceOne); @@ -472,7 +456,7 @@ @PostMapping @ApiOperation(value = "鏂板瀹㈡埛") @Transactional - @RepeatSubmit +// @RepeatSubmit @Log(title = "鏂板瀹㈡埛淇℃伅", businessType = BusinessType.INSERT) public AjaxResult add(@RequestBody @ApiParam(value = "瀹㈡埛瀵硅薄淇℃伅") TjCustomer tjCustomer) { if (null == tjCustomer.getCusIdcard() || null == tjCustomer.getCusPhone()) { -- Gitblit v1.8.0