From 602bb92d63137912a7c90c4ed1ca81aba988c7b8 Mon Sep 17 00:00:00 2001 From: lige <bestlige@outlook.com> Date: 星期五, 22 十二月 2023 10:25:24 +0800 Subject: [PATCH] 取消加密 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java | 40 +++++++++++++++++++++++++++++++++++----- 1 files changed, 35 insertions(+), 5 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 f605a18..40e10f2 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 @@ -4,11 +4,14 @@ import javax.servlet.http.HttpServletResponse; import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.ltkj.common.enums.DataSourceType; import com.ltkj.common.utils.bean.BeanUtils; import com.ltkj.framework.config.MatchUtils; +import com.ltkj.framework.datasource.DynamicDataSourceContextHolder; import com.ltkj.hosp.domain.TjReservation; import com.ltkj.hosp.mapper.TestMapper; import com.ltkj.hosp.service.ITjReservationService; +import com.ltkj.hosp.service.TjvLtkjvtjpatService; import com.ltkj.hosp.sqlDomain.LtkjTjPat; import com.ltkj.system.service.ISysConfigService; import io.swagger.annotations.Api; @@ -52,6 +55,8 @@ @Resource private TestMapper testMapper; + @Resource + private TjvLtkjvtjpatService tjvLtkjvtjpatService; @@ -60,7 +65,7 @@ */ @PostMapping(value = "/cusIdcard") @ApiOperation(value = "鏍规嵁韬唤璇佸彿鑾峰彇鐢ㄦ埛淇℃伅") - @Log(title = "瀹㈡埛韬唤淇℃伅", businessType = BusinessType.EXPORT) +// @Log(title = "瀹㈡埛韬唤淇℃伅", businessType = BusinessType.EXPORT) public AjaxResult getInfoByIdCard(@RequestParam @ApiParam(value = "瀹㈡埛韬唤璇佸彿") String cusIdcard) { if (!"".equals(cusIdcard) && cusIdcard != null) { //鍒ゆ柇韬唤璇佸彿鏍煎紡鏄惁姝g‘ @@ -78,10 +83,36 @@ //鏍规嵁閰嶇疆璋冨彇瀛樺偍杩囩▼ 灏嗕复鏃惰〃鏁版嵁瀛樺叆棰勭害琛�2023.12.12 final String getInfoFromSqlData = sysConfigService.selectConfigByKey("getInfoFromSqlData"); if ("Y".equals(getInfoFromSqlData)){ -// LtkjTjPat tjPatByIdCard = testMapper.getTjPatByIdCard(cusIdcard); - testMapper.getTjPatByCusId(cusIdcard); + //鏍规嵁韬唤璇佸ソ鏌ヤ俊鎭� + LtkjTjPat tjPatByIdCard = testMapper.getTjPatByIdCard(cusIdcard); + if(null != tjPatByIdCard){ + String fcardNo = tjPatByIdCard.getFcardNo(); + if(null !=fcardNo){ + fcardNo=fcardNo.trim(); + tjPatByIdCard.setFcardNo(fcardNo); + } + LtkjTjPat ltkjTjPat = tjvLtkjvtjpatService.getLtkjTjPatByCusIdCard(cusIdcard); + if(null==ltkjTjPat){ + tjvLtkjvtjpatService.save(tjPatByIdCard); + } + } + DynamicDataSourceContextHolder.clearDataSourceType(); + //鍐嶆牴鎹韩浠借瘉鍙峰啓customer琛� + TjCustomer tjCustomer = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard); + if(null == tjCustomer){ + testMapper.getTjPatByCusId(cusIdcard); + LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>(); + qw.eq(TjCustomer::getCusIdcard, cusIdcard); + TjCustomer customer = tjCustomerService.getOne(qw); + customer.setReservationId(customer.getCardId()); + return success(customer); + }else { + tjCustomer.setReservationId(tjCustomer.getCardId()); + return success(tjCustomer); + } + } - //end2023.12.12 + //end====2023.12.12 LambdaQueryWrapper<TjReservation> wq = new LambdaQueryWrapper<>(); wq.eq(TjReservation::getIdCard, cusIdcard); wq.eq(TjReservation::getIsExpire, 2); @@ -120,7 +151,6 @@ tjCustomer1.setReservationId(tjReservation.getId()); tjCustomer1.setDiscount(tjReservation.getDiscount()); tjCustomer1.setGroupingId(tjReservation.getGroupingId()); - return success(tjCustomer1); } -- Gitblit v1.8.0