Antiloveg лет назад: 8
Родитель
Сommit
a76b050786
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      src/main/java/com/goafanti/star/service/impl/StarServiceImpl.java

+ 8 - 2
src/main/java/com/goafanti/star/service/impl/StarServiceImpl.java

@@ -1,6 +1,5 @@
 package com.goafanti.star.service.impl;
 
-import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -11,6 +10,7 @@ import org.springframework.stereotype.Service;
 
 import com.goafanti.common.dao.StarMapper;
 import com.goafanti.common.enums.StarHotType;
+import com.goafanti.common.enums.StarType;
 import com.goafanti.common.model.Star;
 import com.goafanti.star.bo.HotStarListBo;
 import com.goafanti.star.service.StarService;
@@ -41,8 +41,14 @@ public class StarServiceImpl implements StarService {
 				}
 			}
 		}
+		Star star = null;
 		for (String s : set){
-			
+			star = new Star();
+			star.setId(UUID.randomUUID().toString());
+			star.setUid(s);
+			star.setHot(StarHotType.HOT.getCode());
+			star.setStar(StarType.UNSTAR.getCode());
+			startList.add(star);
 		}
 		starMapper.insertBatch(startList);
 	}