|
@@ -14,36 +14,36 @@ var (
|
|
|
func getRewardFakeData(users []*eventmodels.UserBasic) []*eventmodels.UserRewardEventContent {
|
|
|
datas := make([]*eventmodels.UserRewardEventContent, 0, 8)
|
|
|
|
|
|
- source := rand.Intn(12) + 1
|
|
|
-
|
|
|
- addRewards := make([]eventmodels.ItemReward, 0, 8)
|
|
|
- addRewards = append(addRewards, eventmodels.ItemReward{
|
|
|
- ItemBaseType: rand.Intn(5) + 1,
|
|
|
- ItemID: rand.Intn(10) + 1,
|
|
|
- Amount: rand.Intn(100) + 1,
|
|
|
- })
|
|
|
-
|
|
|
- desc := ""
|
|
|
- switch source {
|
|
|
- case 11: // SourceDraw
|
|
|
- descDraw := eventmodels.DescDraw{
|
|
|
- ID: rand.Intn(12) + 1,
|
|
|
- CurID: rand.Intn(12) + 1,
|
|
|
- Reward: addRewards,
|
|
|
- }
|
|
|
+ for i := 0; i < count; i++ {
|
|
|
+ source := rand.Intn(7) + 1
|
|
|
|
|
|
- bytes, err := json.Marshal(descDraw)
|
|
|
- if err != nil {
|
|
|
- panic(err)
|
|
|
- }
|
|
|
+ addRewards := make([]eventmodels.ItemReward, 0, 8)
|
|
|
+ addRewards = append(addRewards, eventmodels.ItemReward{
|
|
|
+ ItemBaseType: rand.Intn(5) + 1,
|
|
|
+ ItemID: rand.Intn(10) + 1,
|
|
|
+ Amount: rand.Intn(100) + 1,
|
|
|
+ })
|
|
|
|
|
|
- desc = string(bytes)
|
|
|
+ desc := ""
|
|
|
+ switch source {
|
|
|
+ case 11: // SourceDraw
|
|
|
+ descDraw := eventmodels.DescDraw{
|
|
|
+ ID: rand.Intn(12) + 1,
|
|
|
+ CurID: rand.Intn(12) + 1,
|
|
|
+ Reward: addRewards,
|
|
|
+ }
|
|
|
|
|
|
- default:
|
|
|
- desc = ""
|
|
|
- }
|
|
|
+ bytes, err := json.Marshal(descDraw)
|
|
|
+ if err != nil {
|
|
|
+ panic(err)
|
|
|
+ }
|
|
|
+
|
|
|
+ desc = string(bytes)
|
|
|
+
|
|
|
+ default:
|
|
|
+ desc = ""
|
|
|
+ }
|
|
|
|
|
|
- for i := 0; i < count; i++ {
|
|
|
userBasic := getUserBasic(users)
|
|
|
eventBasic := getEventBasic()
|
|
|
|