test_controller.go 1.0 KB
package controllers

import (
	"github.com/linmadan/egglib-go/web/beego"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/application/syncdata"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/domainService"
)

type TestController struct {
	beego.BaseController
}

func (c *TestController) InvokPullMaterialNewest() {
	srv := syncdata.PullDataK3CloudService{}
	err := srv.PullMaterialNewest()
	c.Response(nil, err)
}

func (c *TestController) InvokPullMaterialGroup() {
	srv := syncdata.PullDataK3CloudService{}
	err := srv.PullMaterialGroup()
	c.Response(nil, err)
}

func (c *TestController) InvokPullPrdMoNewest() {
	srv := syncdata.PullDataK3CloudService{}
	err := srv.PullPrdMoNewest()
	c.Response(nil, err)
}

func (c *TestController) CreateDeviceCollection() {
	data := &domain.DeviceCollection{}
	Must(c.Unmarshal(data))
	domainService.SendWorkshopDeviceData(data)
	c.Response(nil, nil)
}