class ClientServiceImpl extends SuperServiceImpl<ClientMapper, Client> implements IClientService {
    private final static String LOCK_KEY_CLIENTID = "clientId:";

    private final PasswordEncoder passwordEncoder;

    private final DistributedLock lock;

    @Override
    public void saveClient(Client client) throws Exception {<FILL_FUNCTION_BODY>}

    @Override
    public PageResult<Client> listClient(Map<String, Object> params, boolean isPage) {
        Page<Client> page;
        if (isPage) {
            page = new Page<>(MapUtils.getInteger(params, "page"), MapUtils.getInteger(params, "limit"));
        } else {
            page = new Page<>(1, -1);
        }
        List<Client> list = baseMapper.findList(page, params);
        page.setRecords(list);
        return PageResult.<Client>builder().data(list).code(0).count(page.getTotal()).build();
    }

    @Override
    public void delClient(long id) {
        baseMapper.deleteById(id);
    }

    @Override
    public Client loadClientByClientId(String clientId) {
        QueryWrapper<Client> wrapper = Wrappers.query();
        wrapper.eq("client_id", clientId);
        return this.getOne(wrapper);
    }
}

        client.setClientSecret(passwordEncoder.encode(client.getClientSecretStr()));
        String clientId = client.getClientId();
        if (client.getId() == null) {
            client.setCreatorId(LoginUserContextHolder.getUser().getId());
        }
        super.saveOrUpdateIdempotency(client, lock
                , LOCK_KEY_CLIENTID+clientId
                , new QueryWrapper<Client>().eq("client_id", clientId)
                , clientId + "已存在");
    
<methods>public non-sealed void <init>() ,public boolean saveIdempotency(com.central.oauth.model.Client, com.central.common.lock.DistributedLock, java.lang.String, Wrapper<com.central.oauth.model.Client>, java.lang.String) throws java.lang.Exception,public boolean saveIdempotency(com.central.oauth.model.Client, com.central.common.lock.DistributedLock, java.lang.String, Wrapper<com.central.oauth.model.Client>) throws java.lang.Exception,public boolean saveOrUpdateIdempotency(com.central.oauth.model.Client, com.central.common.lock.DistributedLock, java.lang.String, Wrapper<com.central.oauth.model.Client>, java.lang.String) throws java.lang.Exception,public boolean saveOrUpdateIdempotency(com.central.oauth.model.Client, com.central.common.lock.DistributedLock, java.lang.String, Wrapper<com.central.oauth.model.Client>) throws java.lang.Exception<variables>