admin
2020-11-09 2147d023563a7c9d05d97547c00d6b0162c0644c
fanli/src/main/java/com/yeshi/fanli/job/PushJob.java
@@ -7,7 +7,10 @@
import javax.annotation.Resource;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.yeshi.fanli.entity.SystemEnum;
import com.yeshi.fanli.util.StringUtil;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -112,4 +115,23 @@
    }
    @XxlJob("pushJob-pushById")
    public ReturnT<String> pushById(String param) throws Exception {
        if (!StringUtil.isNullOrEmpty(param)) {
            Long id = Long.parseLong(param);
            PushInfo info = pushInfoService.selectByPrimaryKey(id);
            if (info == null)
                return ReturnT.FAIL;
            PushInfo update=new PushInfo();
            update.setId(info.getId());
            update.setState(PushInfo.STATE_INIT);
            pushInfoService.updateSelectiveByPrimaryKey(update);
            Thread.sleep(100);
            pushInfoService.handPush(Long.parseLong(param));
        }
        return ReturnT.SUCCESS;
    }
}