上传周长任务bug

This commit is contained in:
liwei 2023-07-19 19:30:46 +08:00
parent 3d50e2551a
commit ba468ff392
6 changed files with 100 additions and 66 deletions

View File

@ -24195,7 +24195,7 @@
"key": "buried_buried_condi_tasktxt_852", "key": "buried_buried_condi_tasktxt_852",
"text": "本周累计经验副本消耗300体力" "text": "本周累计经验副本消耗300体力"
}, },
"type": 130, "type": 201,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24217,7 +24217,7 @@
"key": "buried_buried_condi_tasktxt_853", "key": "buried_buried_condi_tasktxt_853",
"text": "本周累计经验副本消耗600体力" "text": "本周累计经验副本消耗600体力"
}, },
"type": 130, "type": 201,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24239,7 +24239,7 @@
"key": "buried_buried_condi_tasktxt_854", "key": "buried_buried_condi_tasktxt_854",
"text": "本周累计经验副本消耗1000体力" "text": "本周累计经验副本消耗1000体力"
}, },
"type": 130, "type": 201,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24261,7 +24261,7 @@
"key": "buried_buried_condi_tasktxt_855", "key": "buried_buried_condi_tasktxt_855",
"text": "本周累计消耗3000000点金币" "text": "本周累计消耗3000000点金币"
}, },
"type": 130, "type": 68,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24283,7 +24283,7 @@
"key": "buried_buried_condi_tasktxt_856", "key": "buried_buried_condi_tasktxt_856",
"text": "本周累计消耗6000000点金币" "text": "本周累计消耗6000000点金币"
}, },
"type": 130, "type": 68,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24305,7 +24305,7 @@
"key": "buried_buried_condi_tasktxt_857", "key": "buried_buried_condi_tasktxt_857",
"text": "本周累计消耗10000000点金币" "text": "本周累计消耗10000000点金币"
}, },
"type": 130, "type": 68,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24327,7 +24327,7 @@
"key": "buried_buried_condi_tasktxt_858", "key": "buried_buried_condi_tasktxt_858",
"text": "本周累计装备副本消耗300体力" "text": "本周累计装备副本消耗300体力"
}, },
"type": 130, "type": 201,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24349,7 +24349,7 @@
"key": "buried_buried_condi_tasktxt_859", "key": "buried_buried_condi_tasktxt_859",
"text": "本周累计装备副本消耗600体力" "text": "本周累计装备副本消耗600体力"
}, },
"type": 130, "type": 201,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24371,7 +24371,7 @@
"key": "buried_buried_condi_tasktxt_860", "key": "buried_buried_condi_tasktxt_860",
"text": "本周累计装备副本消耗1000体力" "text": "本周累计装备副本消耗1000体力"
}, },
"type": 130, "type": 201,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24393,7 +24393,7 @@
"key": "buried_buried_condi_tasktxt_861", "key": "buried_buried_condi_tasktxt_861",
"text": "本周累计回响副本消耗300体力" "text": "本周累计回响副本消耗300体力"
}, },
"type": 130, "type": 202,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24415,7 +24415,7 @@
"key": "buried_buried_condi_tasktxt_862", "key": "buried_buried_condi_tasktxt_862",
"text": "本周累计回响副本消耗600体力" "text": "本周累计回响副本消耗600体力"
}, },
"type": 130, "type": 202,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24437,7 +24437,7 @@
"key": "buried_buried_condi_tasktxt_863", "key": "buried_buried_condi_tasktxt_863",
"text": "本周累计回响副本消耗1000体力" "text": "本周累计回响副本消耗1000体力"
}, },
"type": 130, "type": 202,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -24459,7 +24459,7 @@
"key": "buried_buried_condi_tasktxt_864", "key": "buried_buried_condi_tasktxt_864",
"text": "备用埋点" "text": "备用埋点"
}, },
"type": 130, "type": 43,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",

View File

@ -18,7 +18,7 @@
} }
], ],
"min_exp": 60, "min_exp": 60,
"placement_duration": 180, "placement_duration": 10,
"prop_position": 0, "prop_position": 0,
"photo_guide_unlocking": [ "photo_guide_unlocking": [
{ {
@ -48,7 +48,7 @@
} }
], ],
"min_exp": 70, "min_exp": 70,
"placement_duration": 210, "placement_duration": 10,
"prop_position": 1, "prop_position": 1,
"photo_guide_unlocking": [ "photo_guide_unlocking": [
{ {
@ -78,7 +78,7 @@
} }
], ],
"min_exp": 80, "min_exp": 80,
"placement_duration": 240, "placement_duration": 10,
"prop_position": 1, "prop_position": 1,
"photo_guide_unlocking": [ "photo_guide_unlocking": [
{ {
@ -108,7 +108,7 @@
} }
], ],
"min_exp": 90, "min_exp": 90,
"placement_duration": 270, "placement_duration": 10,
"prop_position": 1, "prop_position": 1,
"photo_guide_unlocking": [ "photo_guide_unlocking": [
{ {
@ -132,7 +132,7 @@
}, },
"up_lv_consume": [], "up_lv_consume": [],
"min_exp": 100, "min_exp": 100,
"placement_duration": 300, "placement_duration": 10,
"prop_position": 1, "prop_position": 1,
"photo_guide_unlocking": [ "photo_guide_unlocking": [
{ {

View File

@ -195,7 +195,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 80, "cops_ps_ceiling": 80,
"hero_lv": 30 "hero_lv": 20
}, },
{ {
"lv": 12, "lv": 12,
@ -214,7 +214,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 82, "cops_ps_ceiling": 82,
"hero_lv": 30 "hero_lv": 20
}, },
{ {
"lv": 13, "lv": 13,
@ -233,7 +233,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 84, "cops_ps_ceiling": 84,
"hero_lv": 30 "hero_lv": 20
}, },
{ {
"lv": 14, "lv": 14,
@ -252,7 +252,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 86, "cops_ps_ceiling": 86,
"hero_lv": 30 "hero_lv": 20
}, },
{ {
"lv": 15, "lv": 15,
@ -271,7 +271,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 88, "cops_ps_ceiling": 88,
"hero_lv": 30 "hero_lv": 25
}, },
{ {
"lv": 16, "lv": 16,
@ -290,7 +290,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 90, "cops_ps_ceiling": 90,
"hero_lv": 30 "hero_lv": 25
}, },
{ {
"lv": 17, "lv": 17,
@ -309,7 +309,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 92, "cops_ps_ceiling": 92,
"hero_lv": 30 "hero_lv": 25
}, },
{ {
"lv": 18, "lv": 18,
@ -328,7 +328,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 94, "cops_ps_ceiling": 94,
"hero_lv": 30 "hero_lv": 25
}, },
{ {
"lv": 19, "lv": 19,
@ -347,7 +347,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 96, "cops_ps_ceiling": 96,
"hero_lv": 30 "hero_lv": 25
}, },
{ {
"lv": 20, "lv": 20,
@ -366,7 +366,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 98, "cops_ps_ceiling": 98,
"hero_lv": 30 "hero_lv": 25
}, },
{ {
"lv": 21, "lv": 21,
@ -385,7 +385,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 100, "cops_ps_ceiling": 100,
"hero_lv": 40 "hero_lv": 30
}, },
{ {
"lv": 22, "lv": 22,
@ -404,7 +404,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 102, "cops_ps_ceiling": 102,
"hero_lv": 40 "hero_lv": 30
}, },
{ {
"lv": 23, "lv": 23,
@ -423,7 +423,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 104, "cops_ps_ceiling": 104,
"hero_lv": 40 "hero_lv": 30
}, },
{ {
"lv": 24, "lv": 24,
@ -442,7 +442,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 106, "cops_ps_ceiling": 106,
"hero_lv": 40 "hero_lv": 30
}, },
{ {
"lv": 25, "lv": 25,
@ -461,7 +461,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 108, "cops_ps_ceiling": 108,
"hero_lv": 40 "hero_lv": 30
}, },
{ {
"lv": 26, "lv": 26,
@ -480,7 +480,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 110, "cops_ps_ceiling": 110,
"hero_lv": 40 "hero_lv": 35
}, },
{ {
"lv": 27, "lv": 27,
@ -499,7 +499,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 112, "cops_ps_ceiling": 112,
"hero_lv": 40 "hero_lv": 35
}, },
{ {
"lv": 28, "lv": 28,
@ -518,7 +518,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 114, "cops_ps_ceiling": 114,
"hero_lv": 40 "hero_lv": 35
}, },
{ {
"lv": 29, "lv": 29,
@ -537,7 +537,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 116, "cops_ps_ceiling": 116,
"hero_lv": 40 "hero_lv": 35
}, },
{ {
"lv": 30, "lv": 30,
@ -556,7 +556,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 118, "cops_ps_ceiling": 118,
"hero_lv": 40 "hero_lv": 35
}, },
{ {
"lv": 31, "lv": 31,
@ -575,7 +575,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 120, "cops_ps_ceiling": 120,
"hero_lv": 50 "hero_lv": 40
}, },
{ {
"lv": 32, "lv": 32,
@ -594,7 +594,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 122, "cops_ps_ceiling": 122,
"hero_lv": 50 "hero_lv": 40
}, },
{ {
"lv": 33, "lv": 33,
@ -613,7 +613,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 124, "cops_ps_ceiling": 124,
"hero_lv": 50 "hero_lv": 40
}, },
{ {
"lv": 34, "lv": 34,
@ -632,7 +632,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 126, "cops_ps_ceiling": 126,
"hero_lv": 50 "hero_lv": 40
}, },
{ {
"lv": 35, "lv": 35,
@ -651,7 +651,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 128, "cops_ps_ceiling": 128,
"hero_lv": 50 "hero_lv": 40
}, },
{ {
"lv": 36, "lv": 36,
@ -670,7 +670,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 130, "cops_ps_ceiling": 130,
"hero_lv": 50 "hero_lv": 45
}, },
{ {
"lv": 37, "lv": 37,
@ -689,7 +689,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 132, "cops_ps_ceiling": 132,
"hero_lv": 50 "hero_lv": 45
}, },
{ {
"lv": 38, "lv": 38,
@ -708,7 +708,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 134, "cops_ps_ceiling": 134,
"hero_lv": 50 "hero_lv": 45
}, },
{ {
"lv": 39, "lv": 39,
@ -727,7 +727,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 136, "cops_ps_ceiling": 136,
"hero_lv": 50 "hero_lv": 45
}, },
{ {
"lv": 40, "lv": 40,
@ -746,7 +746,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 138, "cops_ps_ceiling": 138,
"hero_lv": 50 "hero_lv": 45
}, },
{ {
"lv": 41, "lv": 41,
@ -765,7 +765,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 140, "cops_ps_ceiling": 140,
"hero_lv": 60 "hero_lv": 50
}, },
{ {
"lv": 42, "lv": 42,
@ -784,7 +784,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 142, "cops_ps_ceiling": 142,
"hero_lv": 60 "hero_lv": 50
}, },
{ {
"lv": 43, "lv": 43,
@ -803,7 +803,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 144, "cops_ps_ceiling": 144,
"hero_lv": 60 "hero_lv": 50
}, },
{ {
"lv": 44, "lv": 44,
@ -822,7 +822,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 146, "cops_ps_ceiling": 146,
"hero_lv": 60 "hero_lv": 50
}, },
{ {
"lv": 45, "lv": 45,
@ -841,7 +841,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 148, "cops_ps_ceiling": 148,
"hero_lv": 60 "hero_lv": 50
}, },
{ {
"lv": 46, "lv": 46,
@ -860,7 +860,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 150, "cops_ps_ceiling": 150,
"hero_lv": 60 "hero_lv": 55
}, },
{ {
"lv": 47, "lv": 47,
@ -879,7 +879,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 152, "cops_ps_ceiling": 152,
"hero_lv": 60 "hero_lv": 55
}, },
{ {
"lv": 48, "lv": 48,
@ -898,7 +898,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 154, "cops_ps_ceiling": 154,
"hero_lv": 60 "hero_lv": 55
}, },
{ {
"lv": 49, "lv": 49,
@ -917,7 +917,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 156, "cops_ps_ceiling": 156,
"hero_lv": 60 "hero_lv": 55
}, },
{ {
"lv": 50, "lv": 50,
@ -936,7 +936,7 @@
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
"cops_ps_ceiling": 158, "cops_ps_ceiling": 158,
"hero_lv": 60 "hero_lv": 55
}, },
{ {
"lv": 51, "lv": 51,

View File

@ -493,5 +493,16 @@
"key": "ruledesc_ruledesc_content_45", "key": "ruledesc_ruledesc_content_45",
"text": "这里可以使用食材烹饪出各种各样的食物。<br>食材组合的不同,烹饪出来的食物也完全不同。<br>添加的食物越多,能煮出好食物的概率越高,但要小心错误的食材组合会完全烹饪不出好的食物。只有正确的食材组合才能烹饪出美味佳肴。" "text": "这里可以使用食材烹饪出各种各样的食物。<br>食材组合的不同,烹饪出来的食物也完全不同。<br>添加的食物越多,能煮出好食物的概率越高,但要小心错误的食材组合会完全烹饪不出好的食物。只有正确的食材组合才能烹饪出美味佳肴。"
} }
},
{
"id": 10046,
"title": {
"key": "ruledesc_ruledesc_title_46",
"text": "护符水晶说明"
},
"content": {
"key": "ruledesc_ruledesc_content_46",
"text": "这里可以使用主角月光与水晶的力量,迅速提升守护者的等级。<br>水晶会挑选你等级最高的5位守护者为核心在右侧上阵守护者将会把等级提升至五位最高的守护者中等级最低的那一位。<br>上阵守护者槽位由玩家等级解锁,每一个槽位只能上阵相应品质的守护者。<br>卸下守护者后槽位会进入不稳定状态稳定槽位需要24小时或者200钻石迅速稳定。"
}
} }
] ]

View File

@ -18,15 +18,20 @@ func IsToday(d int64) bool {
// 判断是否是出于同一周 // 判断是否是出于同一周
func IsSameWeek(d int64) bool { func IsSameWeek(d int64) bool {
// 将时间戳转换成一个 time.Time 对象 // 将时间戳转换为 time.Time 类型
t1 := time.Unix(d, 0) time1 := time.Unix(d, 0)
t2 := configure.Now() time2 := configure.Now()
// 获取 t1 所在的周的第一天和 t2 所在的周的第一天 // 获取时间戳所属的年份和周数
t1FirstDay := t1.AddDate(0, 0, -int(t1.Weekday())+1) year1, week1 := time1.ISOWeek()
t2FirstDay := t2.AddDate(0, 0, -int(t2.Weekday())+1) year2, week2 := time2.ISOWeek()
// 判断两个时间所在的周的第一天是否相同
return t1FirstDay.Equal(t2FirstDay) // 判断是否同一年同一周
if year1 == year2 && week1 == week2 {
return true
} else {
return false
}
} }
// 判断是否大于1周 // 判断是否大于1周

View File

@ -100,6 +100,24 @@ func BenchmarkRandNumbers(b *testing.B) {
} }
} }
func TestIsSameWeek(t *testing.T) {
// 将时间戳转换为 time.Time 类型
time1 := time.Now()
time2 := time.Now()
// 获取时间戳所属的年份和周数
year1, week1 := time1.ISOWeek()
year2, week2 := time2.ISOWeek()
// 判断是否同一年同一周
if year1 == year2 && week1 == week2 {
fmt.Println("两个时间戳属于同一周")
} else {
fmt.Println("两个时间戳不属于同一周")
}
}
func TestWeekIntervalTime(t *testing.T) { func TestWeekIntervalTime(t *testing.T) {
ti := utils.WeekIntervalTime(0) ti := utils.WeekIntervalTime(0)
format := "2006-01-02 15:04:05" format := "2006-01-02 15:04:05"