Merge branch 'feature-scriptApproval-daiyb' into dev

This commit is contained in:
戴育兵 2026-02-09 14:16:28 +08:00
commit 4aded4cbd3

View File

@ -14,6 +14,7 @@ import (
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
serverCast "fonchain-fiee/pkg/service/cast"
"fonchain-fiee/pkg/utils/stime"
"log"
"math/rand"
"strconv"
@ -108,9 +109,11 @@ func RefreshScriptApprovalStatusTask() {
if err != nil {
return
}
for _, v := range data {
for approvalID, v := range data {
var scriptReq cast.UpdateScriptStatusReq
if v.Status == 2 {
scriptReq.ApprovalID = fmt.Sprint(approvalID)
uTimes, _ := stime.DatetimeToTimes(v.UpdatedAt, "2006-01-02 15:04:05")
if v.Status == 2 && int64(uTimes) <= time.Now().Unix() {
scriptReq.WorkAction = cast.WorkActionENUM_APPROVAL_PASS
}
if v.Status == 3 {