package com.zhongshu.card.server.core.service;

import com.github.microservice.net.ResultContent;
import com.zhongshu.card.client.service.org.OrganizationService;
import com.zhongshu.card.server.core.service.base.RedisService;
import com.zhongshu.card.server.core.util.wx.WechatCUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author TRX
 * @date 2024/6/3
 */
@Slf4j
@Service
public class TestService {
    @Autowired
    OrganizationService organizationService;

    @Autowired
    RedisService redisService;

    @Autowired
    WechatCUtil wechatCUtil;

    public ResultContent text() {
        try {
            wechatCUtil.init();
            redisService.setValueSecond("a", "123", 1);
            log.info("a: {}", redisService.getValue("a"));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return organizationService.initSuperOrganization();
    }
}
