| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- package postgre
- import (
- "sportfitness/base/assembly/base/repository"
- "sportfitness/base/errors"
- "testing"
- "git.beswell.com/gframe/application"
- )
- func init() {
- application.NewDefault()
- repository.Init()
- Init()
- }
- func TestAdd(t *testing.T) {
- err := FuncTest{}.TestAdd(1, "{\"user_name\":\"王一\", \"usercode\": \"wang1\", \"shopid\": 1}", "XX")
- println(err)
- }
- func TestQuery32(t *testing.T) {
- str, err := FuncTest{}.TestQuery32(1, "{\"user_name\": \"王\"}", "XX")
- //if err != nil{
- // e := errors.PGError
- // errJson, e_ := json.Marshal(e)
- //
- // if e_ != nil {
- // println(e_)
- // }
- // ej := string(errJson)
- // println(ej)
- //}
- if err != nil {
- panic(errors.PGError)
- }
- println(str)
- }
|