From 6901d54eeb093a4b94f0630ae88bda7936f16919 Mon Sep 17 00:00:00 2001
From: wang-hao-jie <1550036656@qq.com>
Date: 星期三, 05 一月 2022 09:30:09 +0800
Subject: [PATCH] 违章记录
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
index f2773d2..0bbfb16 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
@@ -105,7 +105,11 @@
QueryWrapper<Fingerprint> wrapper = new QueryWrapper<>();
wrapper.eq("code",code);
wrapper.eq("area_id",c.getAreaId());
+ wrapper.eq("customer_id",customerId);
Fingerprint one = iFingerprintService.getOne(wrapper);
+ if(one==null){
+ return ResultUtil.error("鎸囩汗涓庡晢鎴蜂笉鍖归厤");
+ }
CustomerReceive customerReceive = iCustomerReceiveService.getById(one.getCustomerReceiveId());
return new ResultUtil<Object>().setData(customerReceive);
@@ -135,6 +139,16 @@
fingerprint.setPassword(user.getDescription());
fingerprint.setType(user.getType2());
}
+ if(StrUtil.isNotEmpty(fingerprint.getCustomerId())){
+ Customer byId = iCustomerService.getById(fingerprint.getCustomerId());
+ fingerprint.setAreaId(byId.getAreaId());
+ }
+
+ if(StrUtil.isNotEmpty(fingerprint.getCustomerReceiveId())){
+ CustomerReceive byId = iCustomerReceiveService.getById(fingerprint.getCustomerReceiveId());
+ byId.setFstatus(1);
+ iCustomerReceiveService.saveOrUpdate(byId);
+ }
if (iFingerprintService.saveOrUpdate(fingerprint)) {
return new ResultUtil<Fingerprint>().setData(fingerprint);
}
--
Gitblit v1.9.1