package com.doumee.dao.admin.request;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
|
import java.io.IOException;
|
|
|
/**
|
* @author T14
|
*/
|
@Data
|
@ApiModel("劳务来访配置")
|
public class VisitConfigDTO {
|
|
@ApiModelProperty(value = "来访预约方式")
|
private String reservationWay = "";
|
|
@ApiModelProperty(value = "被访人校验方式")
|
private String checkVisit = "";
|
|
@ApiModelProperty(value = "健康证是否必填")
|
private String healthCard = "";
|
|
@ApiModelProperty(value = "劳务是否答题")
|
private String isAnswer = "";
|
|
@ApiModelProperty(value = "劳务答题主题")
|
private String theme = "";
|
|
@ApiModelProperty(value = "劳务答题说明")
|
private String description = "";
|
|
// /**
|
// * 对象驼峰属性转下划线
|
// * @param object
|
// * @return
|
// * @throws JsonProcessingException
|
// */
|
// public static String toUnderlineJSONString(Object object) throws JsonProcessingException {
|
// ObjectMapper mapper = new ObjectMapper();
|
// mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
|
// mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
// String reqJson = mapper.writeValueAsString(object);
|
// return reqJson;
|
// }
|
//
|
//
|
// public static <T> T toSnakeObject(String json, Class<T> clazz) throws IOException {
|
// ObjectMapper mapper = new ObjectMapper();
|
// mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
|
// T reqJson = mapper.readValue(json, clazz);
|
// return reqJson;
|
// }
|
}
|