mybatis-plus解析实体数据库字段

public class PlusColumnResolver {

 public static  <T> ColumnResolver<T> create() {
     return new ColumnResolver<>();
 }

 public static class ColumnResolver<T> extends AbstractLambdaWrapper<T, ColumnResolver<T>> {

     @Override
     protected ColumnResolver<T> instance() {
         return null;
     }

     @SafeVarargs
     @Override
     public final String columnsToString(SFunction<T, ?>... columns) {
         return super.columnsToString(columns);
     }

     @SafeVarargs
     @Override
     public final String columnsToString(boolean onlyColumn, SFunction<T, ?>... columns) {
         return super.columnsToString(onlyColumn, columns);
     }

     @Override 
     public String columnToString(SFunction<T, ?> column) {
         return super.columnToString(column);
     }

     @Override 
     public String columnToString(SFunction<T, ?> column, boolean onlyColumn) {
         return super.columnToString(column, onlyColumn);
     }
 }
}

使用

PlusColumnResolver.<SchSyncSchedule>create().columnToString(SchSyncSchedule::getScheduleDate)

你可能感兴趣的:(mybatis-plus,java排坑之路,数据库,mybatis,java,mybatis-plus)