| | |
| | |
|
| | | 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;
|
| | |
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @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;
|
| | | }
|
| | |
|
| | |
|
| | | }
|