|
@@ -2471,6 +2471,27 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
|
}
|
|
|
}
|
|
|
// tempInfo.setId(IdGeneratorUtils.getObjectId());
|
|
|
+ // 检索自定义字段值
|
|
|
+ Class clazz = vo.getClass();
|
|
|
+ Field[] fields = clazz.getDeclaredFields();
|
|
|
+ StringBuilder paramList = new StringBuilder();
|
|
|
+ paramList.append("[");
|
|
|
+ for (Field field : fields) {
|
|
|
+ Method requestMethod = clazz.getMethod(getGetMethod(field.getName()));
|
|
|
+ Object requestVal = requestMethod.invoke(vo);
|
|
|
+ Excel excel = field.getAnnotation(Excel.class);
|
|
|
+ if (excel != null && excel.styleType() == 1 && requestVal != null) {
|
|
|
+ // 拼接自定义字符串
|
|
|
+ paramList.append("{\"name\":\"").append(excel.name()).append("\",");
|
|
|
+ paramList.append("\"content\":\"").append(requestVal).append("\"},");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String param = paramList.toString();
|
|
|
+ if (param.length() > 1) {
|
|
|
+ param = param.substring(0, param.length() - 1);
|
|
|
+ }
|
|
|
+ param += "]";
|
|
|
+ tempInfo.setParamList(param);
|
|
|
tempInfo.setUpdateUserName(SecurityUtils.getUserInfo().getUsername());
|
|
|
tempInfo.setUpdateUserId(SecurityUtils.getUserInfo().getUserId());
|
|
|
tempInfo.setUpdateTime(LocalDateTime.now());
|