12345678910111213141516171819202122232425262728293031323334353637 |
- package main
- import (
- "context"
- "fmt"
- "testing"
- "youngee_b_api/config"
- "youngee_b_api/model/http_model"
- "youngee_b_api/service"
- "youngee_b_api/util"
- )
- func TestGormUser(t *testing.T) {
- pa := "17695725591"
- r := util.MD5(pa)
- r2 := service.LoginAuth.TestEncryptPassword(pa)
- fmt.Println(r)
- fmt.Println(r2)
- }
- func TestDbCreateEnterprise(t *testing.T) {
- ctx := context.Background()
- config.Init()
- newEnterprise := http_model.CreateEnterpriseRequest{
- Industry: 2,
- BusinessName: "Test公司",
- RealName: "测试员",
- Phone: "13010101010",
- Email: "test@younggee.com",
- }
- res := service.CreateEnterprise.CreateEnterpriseUser(ctx, newEnterprise)
- if res != nil {
- fmt.Printf("%+v\n", res)
- } else {
- fmt.Printf("error\n")
- }
- }
|