Skip to content

Commit f6536ad

Browse files
committed
update: fixed bug and update api
1 parent d4b314a commit f6536ad

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

.github/workflows/release.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
tag_name:
1212
description: 'Tag name for the release'
1313
required: true
14-
default: 'v2.0.1-beta.1' # Default tag name
14+
default: 'v2.0.1-beta.2' # Default tag name
1515

1616
permissions:
1717
contents: write # Allow writing to GitHub releases
@@ -23,8 +23,8 @@ env:
2323
VERSION: ${{ github.ref_name }} # Dynamic version based on the tag name
2424
RELEASE_DIR: release
2525
RELEASE_NOTICES: |
26-
- [👏] 更新支持新平台重庆工程学院CQIE
27-
- [👏] 更新平台重庆工程学院CQIE支持秒刷(使用暴力模式即可)
26+
- [‍🔧] 优化平台重庆工程学院CQIE
27+
- [‍🔧] 优化英华mooc平台提交学时逻辑
2828
2929
3030
注:等GO版本追平Java版本功能后Java版本将不再进行维护,后续将主要针对GO版本进行维护,Java将不会更新新功能和适配新平台。

config/logo.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
: \ \; : .' \ | , / `----' ---' ; : ;
1414
\ ' ;| , .-./ ---`-' | , /
1515
`--` `--`---' ---`-'
16-
Yatori-go-console v2.0.1-Beta.1
16+
Yatori-go-console v2.0.1-Beta.2
1717
仅用于学习交流,请勿用于违法和商业用途!!!
1818
GitHub开源地址:https://github.com/yatori-dev/yatori-go-console
1919
个人博客:https://blogs.changbaiqi.top

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
1313
)
1414

15-
require github.com/yatori-dev/yatori-go-core v1.0.5
15+
require github.com/yatori-dev/yatori-go-core v1.0.6
1616

1717
require (
1818
github.com/fsnotify/fsnotify v1.8.0 // indirect

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho=
116116
github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE=
117117
github.com/yalue/onnxruntime_go v1.12.1 h1:joCCmBnNjHy04jK9EMP/UV6oPPqySXlRgf3gcUcnI/g=
118118
github.com/yalue/onnxruntime_go v1.12.1/go.mod h1:b4X26A8pekNb1ACJ58wAXgNKeUCGEAQ9dmACut9Sm/4=
119-
github.com/yatori-dev/yatori-go-core v1.0.5 h1:9UitulFo4c2u7oe5NYeNJQoZ8o+cxOHcAgoIcVr2aSw=
120-
github.com/yatori-dev/yatori-go-core v1.0.5/go.mod h1:55fPqQnCunl9jMqP7XzFUJrDPjzyI2Z9PWZPLwBlL3k=
119+
github.com/yatori-dev/yatori-go-core v1.0.6 h1:Lq6Ie1JsP1JkdboT9hLPtrzoHDdn+7ji6H/DXM7h814=
120+
github.com/yatori-dev/yatori-go-core v1.0.6/go.mod h1:55fPqQnCunl9jMqP7XzFUJrDPjzyI2Z9PWZPLwBlL3k=
121121
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
122122
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
123123
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=

logic/cqie/CqiePart.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,9 @@ func videoAction(setting config.Setting, user *config.Users, UserCache *cqieApi.
137137
if stopPos >= maxPos {
138138
maxPos = startPos + 3
139139
}
140-
fmt.Println(startPos, stopPos, maxPos)
141140
err := cqie.SubmitStudyTimeAction(UserCache, &node, nowTime, startPos, stopPos, maxPos)
142141
if err != nil {
143-
fmt.Println(err)
142+
lg.Print(lg.INFO, "[", lg.Green, UserCache.Account, lg.Default, "] ", "【"+node.VideoName+"】", lg.BoldRed, "提交学时异常:", err.Error())
144143
}
145144
modelLog.ModelPrint(setting.BasicSetting.LogModel == 0, lg.INFO, "[", lg.Green, UserCache.Account, lg.Default, "] ", "【"+node.VideoName+"】 >>> ", "提交状态:", "成功", lg.Default, " ", "观看进度:", fmt.Sprintf("%.2f", float32(node.StudyTime)/float32(node.TimeLength)), "%")
146145
startPos = startPos + 3
@@ -169,7 +168,7 @@ func videoActionSecondBrush(setting config.Setting, user *config.Users, UserCach
169168
}
170169
err1 := cqie.SubmitStudyTimeAction(UserCache, &node, nowTime, startPos, stopPos, maxPos)
171170
if err1 != nil {
172-
fmt.Println(err)
171+
lg.Print(lg.INFO, "[", lg.Green, UserCache.Account, lg.Default, "] ", "【"+node.VideoName+"】", lg.BoldRed, "提交学时异常:", err.Error())
173172
}
174173
err = cqie.SaveVideoStudyTimeAction(UserCache, &node, startPos, stopPos) //学完之后保存学习点
175174
if err != nil {

logic/yinghua/YinghuaPart.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func videoAction(setting config.Setting, user *config.Users, UserCache *yinghuaA
145145
break //如果看完了,也就是进度为100那么直接跳过
146146
}
147147
//提交学时
148-
sub, err := yinghua.SubmitStudyTimeAction(UserCache, node.Id, studyId, time, 6, nil)
148+
sub, err := yinghua.SubmitStudyTimeAction(UserCache, node.Id, studyId, time)
149149
if err != nil {
150150
lg.Print(lg.INFO, `[`, UserCache.Account, `] `, lg.BoldRed, "提交学时接口访问异常,返回信息:", err.Error())
151151
}

0 commit comments

Comments
 (0)