吉安感知网项目-后端
xiebin
2026-01-13 9141000ac2626521db1767e44ffab099d915a74b
add-工单管理
2 files added
68 ■■■■■ changed files
drone-service/drone-gd/src/main/java/org/sxkj/gd/common/GenericConverter.java 28 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/common/IdParam.java 40 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/common/GenericConverter.java
New file
@@ -0,0 +1,28 @@
package org.sxkj.gd.common;
import org.springblade.core.tool.utils.BeanUtil;
import java.io.Serializable;
/**
 * @Description 通用转换工具类
 * @Author AIX
 * @Date 2026/1/12 10:22
 * @Version 1.0
 */
public class GenericConverter implements Serializable {
    private static final long serialVersionUID = 1L;
    public static <S, T> T convert(S source, Class<T> targetType) {
        T target = BeanUtil.newInstance(targetType);
        BeanUtil.copy(source, target);
        return target;
    }
    public static <S, T> T copy(S source, T target) {
        BeanUtil.copy(source, target);
        return target;
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/common/IdParam.java
New file
@@ -0,0 +1,40 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.sxkj.gd.common;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
/**
 * 设备跟踪流转表 数据传输对象实体类
 *
 * @author aix
 * @since 2026-01-08
 */
@Data
public class IdParam implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键", required = true)
    @NotEmpty
    private    Long id;
}