package home import ( "testing" "dashoo.cn/micro/app/model/contract" "github.com/gogf/gf/frame/g" "github.com/gogf/gf/os/gtime" ) func TestInsertGoal(t *testing.T) { for _, goalType := range []string{"10", "20"} { for _, productLine := range []string{"10", "20", "30", "40", "50", "90"} { for _, quarter := range []int{1, 2, 3, 4} { g.DB().Insert("ctr_contract_goal", contract.CtrContractGoal{ GoalType: goalType, Year: 2023, Quarter: quarter, ProductLine: productLine, Amount: float64(quarter) * 100, Remark: "", CreatedBy: 1000, CreatedName: "大数华创", CreatedTime: gtime.Now(), UpdatedBy: 1000, UpdatedName: "大数华创", UpdatedTime: gtime.Now(), }) } } } }