refactor: deprecated many cmd

main
Leo 6 days ago
parent ec1b0521b2
commit f5df476cf4

@ -1,8 +1,20 @@
//go:build legacy_au_sim
// Deprecated: This file is no longer used.
// Retained temporarily for rollback.
// Planned removal: 2026-06-23.
package cmd
import (
"encoding/base64"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
"time"
"github.com/go-resty/resty/v2"
"github.com/mizuki1412/go-core-kit/class/exception"
"github.com/mizuki1412/go-core-kit/init/initkit"
@ -10,12 +22,6 @@ import (
"github.com/spf13/cobra"
"github.com/tidwall/gjson"
"github.com/xuri/excelize/v2"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
"time"
)
func init() {

@ -1,8 +1,16 @@
//go:build legacy_dfb
// Deprecated: This file is no longer used.
// Retained temporarily for rollback.
// Planned removal: 2026-06-23.
package cmd
import (
"cu-helper/wms/cryptokit"
"cu-helper/wms/model"
"cu-helper/internal/deprecated/wms/cryptokit"
model2 "cu-helper/internal/deprecated/wms/model"
"strings"
"time"
"github.com/go-resty/resty/v2"
"github.com/mizuki1412/go-core-kit/class/exception"
"github.com/mizuki1412/go-core-kit/init/initkit"
@ -14,8 +22,6 @@ import (
"github.com/tidwall/gjson"
"github.com/xuri/excelize/v2"
"golang.org/x/net/html"
"strings"
"time"
)
func init() {
@ -53,7 +59,7 @@ func handleDfb() {
if err != nil {
panic(exception.New(err.Error()))
}
h := model.NewHeader()
h := model2.NewHeader()
header := h.GenReqParam()
for rowIndex, row := range rows {
if rowIndex <= 1 {
@ -61,7 +67,7 @@ func handleDfb() {
}
_ = commonkit.RecoverFuncWrapper(func() {
no := row[8] //宽带编号 I列
fo := model.NewGetOrderQueryList(no)
fo := model2.NewGetOrderQueryList(no)
form := fo.GenReqParam()
logkit.Info("***开始请求*** " + no)
resp, err := dfbClient.R().

@ -42,6 +42,7 @@ func defFlagsGco(cmd *cobra.Command) {
func handleGcoLx() {
templatePath := configkit.GetString("gco.template", "/Users/leo/Desktop/归档/集客零星/模板.xlsx")
filePath := configkit.GetString("gco.file", "/Users/leo/Desktop/归档/集客零星/集客零星资源归档.xlsx")
thisYear := time.Now().Format("2006")
//templatePath := configkit.GetString("gco.template", "D:\\backup\\desktop\\lx\\模板.xlsx")
//filePath := configkit.GetString("gco.file", "D:\\backup\\desktop\\lx\\集客零星资源归档.xlsx")
src, err := excelize.OpenFile(filePath)
@ -50,9 +51,9 @@ func handleGcoLx() {
}
defer src.Close()
rows, err := src.GetRows("施工单2026年") // todo 每年修改
rows, err := src.GetRows("施工单" + thisYear + "年")
if err != nil {
panic(exception.New("缺少 Sheet施工单2026年")) // todo 每年修改
panic(exception.New("缺少 Sheet" + "施工单" + thisYear + "年"))
}
// 跳过表头

@ -1,15 +1,21 @@
//go:build legacy_gco
// Deprecated: This file is no longer used.
// Retained temporarily for rollback.
// Planned removal: 2026-06-23.
package cmd
import (
"fmt"
"github.com/mizuki1412/go-core-kit/init/initkit"
"github.com/mizuki1412/go-core-kit/service/configkit"
"github.com/spf13/cobra"
"github.com/xuri/excelize/v2"
"regexp"
"strconv"
"strings"
"time"
"github.com/mizuki1412/go-core-kit/init/initkit"
"github.com/mizuki1412/go-core-kit/service/configkit"
"github.com/spf13/cobra"
"github.com/xuri/excelize/v2"
)
func init() {

@ -1,8 +1,13 @@
//go:build legacy_loss
// Deprecated: This file is no longer used.
// Retained temporarily for rollback.
// Planned removal: 2026-06-23.
package cmd
import (
"cu-helper/wms/common"
"cu-helper/wms/service"
"cu-helper/internal/deprecated/wms/common"
"cu-helper/internal/deprecated/wms/service"
"github.com/mizuki1412/go-core-kit/init/initkit"
"github.com/mizuki1412/go-core-kit/service/logkit"

@ -1,6 +1,15 @@
//go:build legacy_law
// Deprecated: This file is no longer used.
// Retained temporarily for rollback.
// Planned removal: 2026-06-23.
package cmd
import (
"net/url"
"strings"
"time"
"github.com/go-resty/resty/v2"
"github.com/mizuki1412/go-core-kit/class/exception"
"github.com/mizuki1412/go-core-kit/init/initkit"
@ -9,9 +18,6 @@ import (
"github.com/spf13/cast"
"github.com/spf13/cobra"
"github.com/tidwall/gjson"
"net/url"
"strings"
"time"
)
//法治在沃

@ -1,6 +1,9 @@
package cmd
import (
"strconv"
"time"
"github.com/go-resty/resty/v2"
"github.com/mizuki1412/go-core-kit/class/exception"
"github.com/mizuki1412/go-core-kit/init/initkit"
@ -11,8 +14,6 @@ import (
"github.com/spf13/cobra"
"github.com/tidwall/gjson"
"github.com/xuri/excelize/v2"
"strconv"
"time"
)
func init() {

@ -1,7 +1,7 @@
package common
import (
"cu-helper/wms/service"
"cu-helper/internal/deprecated/wms/service"
"fmt"
"path/filepath"
"strconv"

@ -5,6 +5,7 @@ import (
"crypto/aes"
"crypto/cipher"
"encoding/base64"
"github.com/mizuki1412/go-core-kit/class/exception"
)

@ -1,8 +1,9 @@
package model
import (
"github.com/mizuki1412/go-core-kit/service/configkit"
"reflect"
"github.com/mizuki1412/go-core-kit/service/configkit"
)
// Header WMS-ZJ通用Header

@ -1,7 +1,7 @@
package service
import (
"cu-helper/wms/model"
model2 "cu-helper/internal/deprecated/wms/model"
"time"
"github.com/go-resty/resty/v2"
@ -23,9 +23,9 @@ type HighOptLossUnder struct {
// ReqGetHighOptLossUnderList 查询在途光衰单(包含施工中、人工回访、综合调度等全部未归档状态)
func ReqGetHighOptLossUnderList() map[string]*HighOptLossUnder {
h := model.NewHeader()
h := model2.NewHeader()
header := h.GenReqParam()
f := model.NewGetHighOptLossUnderList()
f := model2.NewGetHighOptLossUnderList()
form := f.GenReqParam()
client := resty.New().SetRetryCount(5).SetRetryWaitTime(10 * time.Second)
resp, err := client.R().
Loading…
Cancel
Save