初始化第一版influxORM

This commit is contained in:
2023-04-21 13:23:33 +08:00
parent 00731b674f
commit 8aeb21265c
18 changed files with 730 additions and 22 deletions

View File

@@ -0,0 +1,27 @@
package com.njcn.influx.ano;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 删除记录注解
* @author hongawen
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Delete {
/**
* 用于传参
* @return String 参数内容
*/
String value();
/***
* 数据库名
* todo... 处理成获取配置文件内的,减少开发人员编码输出
*/
String database();
}

View File

@@ -0,0 +1,15 @@
package com.njcn.influx.ano;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 插入注解
* @author hongawen
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Insert {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.influx.ano;
import java.lang.annotation.*;
/**
* 便于将方法中的参数赋值进注解内容中,通过#{paramName}
* @author hongawen
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER})
public @interface Param {
String value();
}

View File

@@ -0,0 +1,25 @@
package com.njcn.influx.ano;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 查询记录
* @author hongawen
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Select {
/***
* 查询sql
*/
String value();
/***
* 返回映射的实体对象
*/
Class resultType();
}