Skip to content

Commit

Permalink
update: fixed bug and update api
Browse files Browse the repository at this point in the history
  • Loading branch information
Changbaiqi committed Dec 3, 2024
1 parent d4b314a commit f6536ad
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
tag_name:
description: 'Tag name for the release'
required: true
default: 'v2.0.1-beta.1' # Default tag name
default: 'v2.0.1-beta.2' # Default tag name

permissions:
contents: write # Allow writing to GitHub releases
Expand All @@ -23,8 +23,8 @@ env:
VERSION: ${{ github.ref_name }} # Dynamic version based on the tag name
RELEASE_DIR: release
RELEASE_NOTICES: |
- [👏] 更新支持新平台重庆工程学院CQIE
- [👏] 更新平台重庆工程学院CQIE支持秒刷(使用暴力模式即可)
- [‍🔧] 优化平台重庆工程学院CQIE
- [‍🔧] 优化英华mooc平台提交学时逻辑
注:等GO版本追平Java版本功能后Java版本将不再进行维护,后续将主要针对GO版本进行维护,Java将不会更新新功能和适配新平台。
Expand Down
2 changes: 1 addition & 1 deletion config/logo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
: \ \; : .' \ | , / `----' ---' ; : ;
\ ' ;| , .-./ ---`-' | , /
`--` `--`---' ---`-'
Yatori-go-console v2.0.1-Beta.1
Yatori-go-console v2.0.1-Beta.2
仅用于学习交流,请勿用于违法和商业用途!!!
GitHub开源地址:https://github.com/yatori-dev/yatori-go-console
个人博客:https://blogs.changbaiqi.top
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
)

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

require (
github.com/fsnotify/fsnotify v1.8.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho=
github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE=
github.com/yalue/onnxruntime_go v1.12.1 h1:joCCmBnNjHy04jK9EMP/UV6oPPqySXlRgf3gcUcnI/g=
github.com/yalue/onnxruntime_go v1.12.1/go.mod h1:b4X26A8pekNb1ACJ58wAXgNKeUCGEAQ9dmACut9Sm/4=
github.com/yatori-dev/yatori-go-core v1.0.5 h1:9UitulFo4c2u7oe5NYeNJQoZ8o+cxOHcAgoIcVr2aSw=
github.com/yatori-dev/yatori-go-core v1.0.5/go.mod h1:55fPqQnCunl9jMqP7XzFUJrDPjzyI2Z9PWZPLwBlL3k=
github.com/yatori-dev/yatori-go-core v1.0.6 h1:Lq6Ie1JsP1JkdboT9hLPtrzoHDdn+7ji6H/DXM7h814=
github.com/yatori-dev/yatori-go-core v1.0.6/go.mod h1:55fPqQnCunl9jMqP7XzFUJrDPjzyI2Z9PWZPLwBlL3k=
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
Expand Down
5 changes: 2 additions & 3 deletions logic/cqie/CqiePart.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,9 @@ func videoAction(setting config.Setting, user *config.Users, UserCache *cqieApi.
if stopPos >= maxPos {
maxPos = startPos + 3
}
fmt.Println(startPos, stopPos, maxPos)
err := cqie.SubmitStudyTimeAction(UserCache, &node, nowTime, startPos, stopPos, maxPos)
if err != nil {
fmt.Println(err)
lg.Print(lg.INFO, "[", lg.Green, UserCache.Account, lg.Default, "] ", "【"+node.VideoName+"】", lg.BoldRed, "提交学时异常:", err.Error())
}
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)), "%")
startPos = startPos + 3
Expand Down Expand Up @@ -169,7 +168,7 @@ func videoActionSecondBrush(setting config.Setting, user *config.Users, UserCach
}
err1 := cqie.SubmitStudyTimeAction(UserCache, &node, nowTime, startPos, stopPos, maxPos)
if err1 != nil {
fmt.Println(err)
lg.Print(lg.INFO, "[", lg.Green, UserCache.Account, lg.Default, "] ", "【"+node.VideoName+"】", lg.BoldRed, "提交学时异常:", err.Error())
}
err = cqie.SaveVideoStudyTimeAction(UserCache, &node, startPos, stopPos) //学完之后保存学习点
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion logic/yinghua/YinghuaPart.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func videoAction(setting config.Setting, user *config.Users, UserCache *yinghuaA
break //如果看完了,也就是进度为100那么直接跳过
}
//提交学时
sub, err := yinghua.SubmitStudyTimeAction(UserCache, node.Id, studyId, time, 6, nil)
sub, err := yinghua.SubmitStudyTimeAction(UserCache, node.Id, studyId, time)
if err != nil {
lg.Print(lg.INFO, `[`, UserCache.Account, `] `, lg.BoldRed, "提交学时接口访问异常,返回信息:", err.Error())
}
Expand Down

0 comments on commit f6536ad

Please sign in to comment.