Problem solving process encountered in the project 3

Supplier change module: Modify multiple fields in the table, save them, and update them to the corresponding franinfo records. The normal way to do the code is very long.

First time using reflection to solve the problem. Each field is a dictionary. When taking out a franinfo record, reflection is used to obtain the record value of the corresponding column and match it with the corresponding column one by one into a Map, in which the column name is stored in an array. Very little code is written this way. The front desk obtains all dictionary values, and the front desk matches the corresponding values ​​by category and column during conversion.

 

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326192993&siteId=291194637