Search in sources :

Example 1 with UserInfo

use of com.hsn.epic4j.core.bean.UserInfo in project epic4j by huisunan.

the class EpicStarter method start.

protected void start() {
    checkForUpdate();
    // 获取周免游戏
    List<Item> weekFreeItems = iStart.getFreeItems().stream().peek(i -> {
        if (StrUtil.endWith(i.getProductSlug(), "/home")) {
            i.setProductSlug(i.getProductSlug().replace("/home", ""));
        }
    }).collect(Collectors.toList());
    // 处理 productSlug带/home的清空
    for (UserInfo info : userInfos) {
        doStart(info, weekFreeItems);
    }
}
Also used : DateUtil(cn.hutool.core.date.DateUtil) Proxy(java.lang.reflect.Proxy) ConsoleNotify(com.hsn.epic4j.core.notify.ConsoleNotify) ArrayList(java.util.ArrayList) JSONUtil(cn.hutool.json.JSONUtil) Item(com.hsn.epic4j.core.bean.Item) INotify(com.hsn.epic4j.core.notify.INotify) DateTime(cn.hutool.core.date.DateTime) FileUrlResource(org.springframework.core.io.FileUrlResource) ThreadPoolTaskScheduler(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler) EpicConfig(com.hsn.epic4j.core.config.EpicConfig) PageUtil(com.hsn.epic4j.core.util.PageUtil) Browser(com.ruiyun.jvppeteer.core.browser.Browser) IoUtil(cn.hutool.core.io.IoUtil) ScreenShootUtil(com.hsn.epic4j.core.util.ScreenShootUtil) Collectors(java.util.stream.Collectors) File(java.io.File) CronTrigger(org.springframework.scheduling.support.CronTrigger) Page(com.ruiyun.jvppeteer.core.page.Page) TypeReference(cn.hutool.core.lang.TypeReference) StrUtil(cn.hutool.core.util.StrUtil) Slf4j(lombok.extern.slf4j.Slf4j) List(java.util.List) CookieParam(com.ruiyun.jvppeteer.protocol.network.CookieParam) DateField(cn.hutool.core.date.DateField) Data(lombok.Data) FileUtil(cn.hutool.core.io.FileUtil) FileReader(java.io.FileReader) UserInfo(com.hsn.epic4j.core.bean.UserInfo) Item(com.hsn.epic4j.core.bean.Item) UserInfo(com.hsn.epic4j.core.bean.UserInfo)

Aggregations

DateField (cn.hutool.core.date.DateField)1 DateTime (cn.hutool.core.date.DateTime)1 DateUtil (cn.hutool.core.date.DateUtil)1 FileUtil (cn.hutool.core.io.FileUtil)1 IoUtil (cn.hutool.core.io.IoUtil)1 TypeReference (cn.hutool.core.lang.TypeReference)1 StrUtil (cn.hutool.core.util.StrUtil)1 JSONUtil (cn.hutool.json.JSONUtil)1 Item (com.hsn.epic4j.core.bean.Item)1 UserInfo (com.hsn.epic4j.core.bean.UserInfo)1 EpicConfig (com.hsn.epic4j.core.config.EpicConfig)1 ConsoleNotify (com.hsn.epic4j.core.notify.ConsoleNotify)1 INotify (com.hsn.epic4j.core.notify.INotify)1 PageUtil (com.hsn.epic4j.core.util.PageUtil)1 ScreenShootUtil (com.hsn.epic4j.core.util.ScreenShootUtil)1 Browser (com.ruiyun.jvppeteer.core.browser.Browser)1 Page (com.ruiyun.jvppeteer.core.page.Page)1 CookieParam (com.ruiyun.jvppeteer.protocol.network.CookieParam)1 File (java.io.File)1 FileReader (java.io.FileReader)1