maven
昨天 6047f24edc72a13b71813c3fb6cc0d087c0f6cd7
basic-server/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
@@ -72,21 +72,21 @@
    public int addOrEditCustomer(CustomerDto customerDto) {
        Customer customer = new Customer();
        BeanUtils.copyProperties(customerDto, customer);
        if (customerDto.getBids().size() != 3) {
            throw new RuntimeException("请选择经营地址省市区");
        }
        if (customerDto.getCids().size() != 3) {
            throw new RuntimeException("请选择联系地址省市区");
        }
        if (customerDto.getBids() != null && customerDto.getBids().size() == 3) {
        customer.setBusinessProvinceId(customerDto.getBids().get(0));
        customer.setBusinessCityId(customerDto.getBids().get(1));
        customer.setBusinessDistrictId(customerDto.getBids().get(2));
        }
        if (customerDto.getCids() != null && customerDto.getCids().size() == 3) {
        customer.setProvinceId(customerDto.getCids().get(0));
        customer.setCityId(customerDto.getCids().get(1));
        customer.setDistrictId(customerDto.getCids().get(2));
        }
        if (Objects.isNull(customerDto.getId())) {
            return customerMapper.insert(customer);