package sync import ( "context" "encoding/json" "github.com/gogf/gf/os/glog" "github.com/gogf/gf/util/gconv" "testing" ) func TestSyncUserInfo(t *testing.T) { SyncService.SyncUserInfo(context.Background()) } func TestSyncOrganize(t *testing.T) { SyncService.SyncOrganize(context.Background(), "1995-01-01 00:00:00") } func TestSyncPost(t *testing.T) { SyncService.SyncPost(context.Background(), "1995-01-01 00:00:00") } func TestName(t *testing.T) { str := `{"accountNo":"zhangbofu","accountName":"张博夫","requestFlag":"0","requestTime":"2022-12-20 17:26:43","sourceType":"NEWHR","appPwd":"0e68fd720a45c39c75c5e116ad7965306d9c50ce6d96b1d5cc676eacd0d9cc53","requestLogId":"40683557062511940","userName":"张博夫","uid":"zhangbofu","prWorkNo":"GS7092","status":"1","weChatId":"zhangbofu","parentUserNo":"H1187","parentUserNo1":"","extAttr":{"zwmc":"","zwbm":"","zwlbmc":"","zjbm":"","zjmc":"","zdbm":"","zdmc":""},"jobId":"GSYF055F004","jobCode":"GSYF055F004","jobName":"体内药效研究员","orgId":"0001GSYF055","orgCode":"GSYF055","companyId":"0001","userJobAttr":[{"prName":"体内药效研究员","prCode":"GSYF055F004","status":"1","supPosCode":"","orgCode":"GSYF055","orgId":"0001GSYF055","prLevel":""}]}` reply := AccountEntity{} err := json.Unmarshal(gconv.Bytes(str), &reply) glog.Info(err) glog.Info(reply) }