wang-hao-jie
2021-12-27 76e9e8e05cbe7dafeba51a235386f20ebf986e25
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);
@@ -139,6 +143,12 @@
            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);
        }