Skip to content

wqcsimple/java-api-base

Repository files navigation

JAVA Api Base

java Api 基础库,会把一些常用的方法和最佳实例进行封装

20180608

add pagination helper: val (offset, length) = Pagination.config(page) or Pagination.config(page, 20)

生成uid方法

String uid = uidService.get(new UIDRunner() {
    @Override
    public String generate() {
        return RandomStringUtils.randomAlphanumeric(9);
    }
    
    @Override
    public Boolean exists(String uid) {
        return userMapper.getUserByUid(uid) != null;
    }
    
    @Override
    public String lockKey(String uid) {
        return Const.getKeyOfUserUidLock(uid);
    }
});

About

java-api-base

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published