Преглед на файлове

Fix CompanyAuthStatus JSON mapping and refresh go.sum.

Co-authored-by: Cursor <cursoragent@cursor.com>
郭铭泽 преди 19 часа
родител
ревизия
04beec54fa
променени са 2 файла, в които са добавени 17 реда и са изтрити 8 реда
  1. 2 0
      go.mod
  2. 15 8
      types.go

+ 2 - 0
go.mod

@@ -8,3 +8,5 @@ require (
 )
 
 require github.com/tjfoc/gmsm v1.4.1 // indirect
+
+replace git.sxidc.com/student-physical-examination/contract_lock_sdk => ../contract_lock_sdk

+ 15 - 8
types.go

@@ -12,14 +12,21 @@ type OrgCertParams struct {
 
 // CompanyAuthStatus 法人单位认证状态查询结果。
 type CompanyAuthStatus struct {
-	CompanyName string
-	RegisterNo  string
-	LegalPerson string
-	Charger     string
-	Mobile      string
-	AuthEndTime string
-	Status      string // result.status,AUTH_PASSED 表示认证成功
-	Reason      string
+	CompanyName string            `json:"companyName"`
+	Mobile      string            `json:"mobile"`
+	RegisterNo  string            `json:"registerNo"`
+	Result      CompanyAuthResult `json:"result"`
+}
+
+// CompanyAuthResult 认证审核结果。
+type CompanyAuthResult struct {
+	Status string `json:"status"`
+	Reason string `json:"reason"`
+}
+
+// AuthPassed 是否认证成功。
+func (s *CompanyAuthStatus) AuthPassed() bool {
+	return s.Result.Status == "AUTH_PASSED"
 }
 
 // CreateUserParams 在契约锁创建内部用户(医生等需个人签名的成员)。