123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- //InitOss(false)
- //redis.InitRedis1("qyxy_id=127.0.0.1:8379", 1)
- //redis.InitRedis1("qyxy_id=192.168.3.166:4379", 1)
- //rootCmd := &cobra.Command{Use: "my cmd"}
- //rootCmd.AddCommand(bidding())
- //rootCmd.AddCommand(project())
- //rootCmd.AddCommand(projectAdd())
- //if err := rootCmd.Execute(); err != nil {
- // fmt.Println("rootCmd.Execute failed", err.Error())
- //}
- //UdpClient = udp.UdpClient{Local: config.Conf.Udp.LocPort, BufSize: 1024}
- //UdpClient.Listen(processUdpMsg)
- //log.Info("Udp服务监听", zap.String("port:", config.Conf.Udp.LocPort))
- // @Description 项目数据
- // @Author J 2022/9/20 17:52
- func project() *cobra.Command {
- cmdClient := &cobra.Command{
- Use: "project",
- Short: "Start processing project data",
- Run: func(cmd *cobra.Command, args []string) {
- //go SaveProFunc()
- //go SaveProTagFunc()
- //go SaveProbFunc()
- //go SaveRelationFunc()
- taskP()
- },
- }
- //cmdClient.Flags().StringVarP(&cfg, "conf", "c", "", "server config [toml]")
- return cmdClient
- }
- // @Description 项目数据
- // @Author J 2022/9/20 17:52
- func projectAdd() *cobra.Command {
- var pici int64
- cmdClient := &cobra.Command{
- Use: "project",
- Short: "Start processing project data",
- Run: func(cmd *cobra.Command, args []string) {
- //go SaveProFunc()
- //go SaveProTagFunc()
- //go SaveProbFunc()
- //go SaveRelationFunc()
- taskPAdd(pici)
- },
- }
- cmdClient.Flags().Int64VarP(&pici, "pici", "p", 0, "")
- return cmdClient
- }
|