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 package cmd
import ( import (
"encoding/base64" "encoding/base64"
"fmt" "fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
"time"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/mizuki1412/go-core-kit/class/exception" "github.com/mizuki1412/go-core-kit/class/exception"
"github.com/mizuki1412/go-core-kit/init/initkit" "github.com/mizuki1412/go-core-kit/init/initkit"
@ -10,12 +22,6 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"github.com/xuri/excelize/v2" "github.com/xuri/excelize/v2"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
"time"
) )
func init() { 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 package cmd
import ( import (
"cu-helper/wms/cryptokit" "cu-helper/internal/deprecated/wms/cryptokit"
"cu-helper/wms/model" model2 "cu-helper/internal/deprecated/wms/model"
"strings"
"time"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/mizuki1412/go-core-kit/class/exception" "github.com/mizuki1412/go-core-kit/class/exception"
"github.com/mizuki1412/go-core-kit/init/initkit" "github.com/mizuki1412/go-core-kit/init/initkit"
@ -14,8 +22,6 @@ import (
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"github.com/xuri/excelize/v2" "github.com/xuri/excelize/v2"
"golang.org/x/net/html" "golang.org/x/net/html"
"strings"
"time"
) )
func init() { func init() {
@ -53,7 +59,7 @@ func handleDfb() {
if err != nil { if err != nil {
panic(exception.New(err.Error())) panic(exception.New(err.Error()))
} }
h := model.NewHeader() h := model2.NewHeader()
header := h.GenReqParam() header := h.GenReqParam()
for rowIndex, row := range rows { for rowIndex, row := range rows {
if rowIndex <= 1 { if rowIndex <= 1 {
@ -61,7 +67,7 @@ func handleDfb() {
} }
_ = commonkit.RecoverFuncWrapper(func() { _ = commonkit.RecoverFuncWrapper(func() {
no := row[8] //宽带编号 I列 no := row[8] //宽带编号 I列
fo := model.NewGetOrderQueryList(no) fo := model2.NewGetOrderQueryList(no)
form := fo.GenReqParam() form := fo.GenReqParam()
logkit.Info("***开始请求*** " + no) logkit.Info("***开始请求*** " + no)
resp, err := dfbClient.R(). resp, err := dfbClient.R().

@ -42,6 +42,7 @@ func defFlagsGco(cmd *cobra.Command) {
func handleGcoLx() { func handleGcoLx() {
templatePath := configkit.GetString("gco.template", "/Users/leo/Desktop/归档/集客零星/模板.xlsx") templatePath := configkit.GetString("gco.template", "/Users/leo/Desktop/归档/集客零星/模板.xlsx")
filePath := configkit.GetString("gco.file", "/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") //templatePath := configkit.GetString("gco.template", "D:\\backup\\desktop\\lx\\模板.xlsx")
//filePath := configkit.GetString("gco.file", "D:\\backup\\desktop\\lx\\集客零星资源归档.xlsx") //filePath := configkit.GetString("gco.file", "D:\\backup\\desktop\\lx\\集客零星资源归档.xlsx")
src, err := excelize.OpenFile(filePath) src, err := excelize.OpenFile(filePath)
@ -50,9 +51,9 @@ func handleGcoLx() {
} }
defer src.Close() defer src.Close()
rows, err := src.GetRows("施工单2026年") // todo 每年修改 rows, err := src.GetRows("施工单" + thisYear + "年")
if err != nil { 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 package cmd
import ( import (
"fmt" "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" "regexp"
"strconv" "strconv"
"strings" "strings"
"time" "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() { 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 package cmd
import ( import (
"cu-helper/wms/common" "cu-helper/internal/deprecated/wms/common"
"cu-helper/wms/service" "cu-helper/internal/deprecated/wms/service"
"github.com/mizuki1412/go-core-kit/init/initkit" "github.com/mizuki1412/go-core-kit/init/initkit"
"github.com/mizuki1412/go-core-kit/service/logkit" "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 package cmd
import ( import (
"net/url"
"strings"
"time"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/mizuki1412/go-core-kit/class/exception" "github.com/mizuki1412/go-core-kit/class/exception"
"github.com/mizuki1412/go-core-kit/init/initkit" "github.com/mizuki1412/go-core-kit/init/initkit"
@ -9,9 +18,6 @@ import (
"github.com/spf13/cast" "github.com/spf13/cast"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"net/url"
"strings"
"time"
) )
//法治在沃 //法治在沃

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

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

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

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

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