zhaowenxuan
6 天以前 696d71cdc4eefa49951b7e14556fe56072714edd
ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java
@@ -2,6 +2,7 @@
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
@@ -92,7 +93,7 @@
        wq.eq(TjCustomer::getCusPhone, tjCustomer.getCusPhone());
        wq.eq(TjCustomer::getCusName, tjCustomer.getCusName());
        final TjCustomer one = customerService.getOne(wq);
        one.setConnect("");
        one.setConnect(null);
        final boolean b = customerService.updateById(one);
        if (b) {
            return AjaxResult.success();
@@ -132,14 +133,18 @@
//            }
//        }
        LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>();
        wq.eq(TjCustomer::getCusIdcard, cusIdcard);
        TjCustomer customer = customerService.getOne(wq);
        String cusName = tjCustomer.getCusName();
        TjCustomer customer = customerService.getTjCustomerByCusIdCard(cusIdcard);
        if (StrUtil.isNotBlank(cusName)){
            customer.setCusName(cusName);
        }
        String key = sysConfigService.selectConfigByKey("sfkqdyhis");
        if (customer != null) {
            customer.setConnect(tjCustomer.getConnect());
            customer.setCusPhone(tjCustomer.getCusPhone());
            customer.setCusMarryStatus(tjCustomer.getCusMarryStatus());
            customerService.updateById(customer);
            return AjaxResult.success(customer);
        }
@@ -261,7 +266,7 @@
            LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>();
            qw.eq(TjCustomer::getCusPhone, phone);
            List<TjCustomer> tjCustomer1 = customerService.list(qw);
            if (tjCustomer1 != null && tjCustomer1.size() > 0) {
            if (tjCustomer1 != null && !tjCustomer1.isEmpty()) {
                List<String> num = new ArrayList<>();
                for (TjCustomer tjCustomer : tjCustomer1) {
                    num.add(tjCustomer.getCusIdcard());