jiangping
2023-12-08 7edf9a7c98fadade6cfd439083337634e7b80019
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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;
//    }
}