update:修复bgmId为空时的异常
This commit is contained in:
parent
6b8932c86f
commit
25730638a3
@ -71,10 +71,13 @@ public class BangumiServiceImpl implements BangumiService {
|
||||
example.createCriteria().andBidEqualTo(type);
|
||||
List<BangumiItem> items = itemDao.selectByExample(example);
|
||||
for (BangumiItem item : items) {
|
||||
if(item.getEnable()==0){
|
||||
if(item.getEnable()==0||item.getBgmid()==0){
|
||||
continue;
|
||||
}
|
||||
JSONObject bangumi=BangumiTools.getBangumiInfoSmall(item.getBgmid());
|
||||
if(bangumi.getInteger("code")==404){
|
||||
continue;
|
||||
}
|
||||
int day=Tools.getWeekDay();
|
||||
if (day == 0) {
|
||||
day = 7;
|
||||
|
Loading…
Reference in New Issue
Block a user