report_test.go 784 B

1234567891011121314151617181920212223242526272829303132
  1. package home
  2. import (
  3. "testing"
  4. "dashoo.cn/micro/app/model/contract"
  5. "github.com/gogf/gf/frame/g"
  6. "github.com/gogf/gf/os/gtime"
  7. )
  8. func TestInsertGoal(t *testing.T) {
  9. for _, goalType := range []string{"10", "20"} {
  10. for _, productLine := range []string{"10", "20", "30", "40", "50", "90"} {
  11. for _, quarter := range []int{1, 2, 3, 4} {
  12. g.DB().Insert("ctr_contract_goal", contract.CtrContractGoal{
  13. GoalType: goalType,
  14. Year: 2023,
  15. Quarter: quarter,
  16. ProductLine: productLine,
  17. Amount: float64(quarter) * 100,
  18. Remark: "",
  19. CreatedBy: 1000,
  20. CreatedName: "大数华创",
  21. CreatedTime: gtime.Now(),
  22. UpdatedBy: 1000,
  23. UpdatedName: "大数华创",
  24. UpdatedTime: gtime.Now(),
  25. })
  26. }
  27. }
  28. }
  29. }