|
@@ -3,7 +3,6 @@ package cn.cslg.pas.common.utils;
|
|
|
import cn.cslg.pas.common.dto.DomainFieldDTO;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import org.apache.commons.beanutils.BeanUtils;
|
|
|
import org.springframework.cglib.beans.BeanGenerator;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -14,7 +13,7 @@ import java.util.Map;
|
|
|
@Component
|
|
|
public class GenerateObjectUtil {
|
|
|
|
|
|
- public static Object generateObjectByField(List<DomainFieldDTO> domainFieldDTOS) throws Exception {
|
|
|
+ /*public static Object generateObjectByField(List<DomainFieldDTO> domainFieldDTOS) throws Exception {
|
|
|
BeanGenerator generator = new BeanGenerator();
|
|
|
for (DomainFieldDTO domainFieldDTO : domainFieldDTOS) {
|
|
|
generator.addProperty(domainFieldDTO.getField(), java.lang.String.class);
|
|
@@ -30,7 +29,7 @@ public class GenerateObjectUtil {
|
|
|
String gsonString = JSONObject.toJSONString(obj).replace("$cglib_prop_", "");
|
|
|
return JSON.parseObject(gsonString, Object.class);
|
|
|
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
public static void setObjectProperty(Object obj, String propertyName, Object value) throws Exception {
|
|
|
String setMethodName = "set" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
|