| 
					
				 | 
			
			
				@@ -8,6 +8,7 @@ import net.chenlin.dp.modules.api.service.CustomerService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import net.chenlin.dp.modules.api.vo.ICustomer; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import net.chenlin.dp.modules.api.vo.ICustomerEdit; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.HashMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 public class CustomerController { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -49,11 +50,14 @@ public class CustomerController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         DynamicDataSource.setDataSource(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (iCustomerEdits!=null&&iCustomerEdits.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (ICustomerEdit i:iCustomerEdits){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                String s = customerService.editCustomer(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (s.equals("0")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    DynamicDataSource.setDataSource("last-data-source"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    customerMapper.UpdateCustomer(i.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    DynamicDataSource.setDataSource(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                HashMap customer = customerService.getCustomer(i.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (customer!=null&&customer.size()>0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    String s = customerService.editCustomer(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (s.equals("0")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        DynamicDataSource.setDataSource("last-data-source"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        customerMapper.UpdateCustomer(i.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        DynamicDataSource.setDataSource(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 |