BinaryBatchSignRequest.go 2.4 KB

123456789101112131415161718192021222324252627282930313233
  1. package binary_request
  2. import (
  3. "encoding/json"
  4. "git.sxidc.com/student-physical-examination/contract_lock_sdk/http"
  5. "git.sxidc.com/student-physical-examination/contract_lock_sdk/model/common"
  6. )
  7. type BinaryBatchSignRequest struct {
  8. // <ext>core:true</ext> 【数据签名内容】数据签名内容 【作用】 传入签署的数据签名内容
  9. DataSignList []*common.BinaryDataBatchSignContent `json:"dataSignList"`
  10. // <ext>core:true</ext> 【签署方式】签署方式 【作用】 1、使用印章签署:使用接口指定的印章签署数据 2、使用签名签署 :使用接口指定的签名签署数据,此时Signatory中的operator不能为空 【传参】 取值范围:COMPANY(使用印章签署),PERSONAL(使用签名签署);不传值默认为:COMPANY(使用印章签署)。
  11. TenantType string `json:"tenantType,omitempty"`
  12. Seal *common.BinarySealRequest `json:"seal,omitempty"`
  13. Company *common.CompanyRequest `json:"company,omitempty"`
  14. PersonSealRange *common.DataSignPersonSealRange `json:"personSealRange,omitempty"`
  15. Operator *common.NameUserInfoRequest `json:"operator,omitempty"`
  16. // <ext>core:true</ext> 【签名算法】签名算法 【作用】 指定签署使用的签名算法 1、RSA国际算法:即使用RSA数字证书进行数据签名 2、SM2国密算法:即使用SM2数字证书进行数据签名 3、RSA国际+SM2国密双算法:需使用RSA+SM2两种数字证书进行数据签名 4、不传值时以电子签章管理后台【签署管理-电子用印设置-用印设置-签名算法配置 】为准 【传参】 取值范围:RSA(RSA国际算法),SM2(SM2国密算法),SM2WithRSA(RSA+SM2两种数字证书);不传值默认为:电子签章管理后台配置。
  17. DigestSigAlgType string `json:"digestSigAlgType,omitempty"`
  18. // <ext>core:true</ext> 【是否添加时间戳】是否添加时间戳 【作用】 用户是否使用时间戳签署 【传参】 1、取值范围:true(可添加),false(不可添加);不传值默认为:false(不可添加)。
  19. NeedTsa *bool `json:"needTsa,omitempty"`
  20. }
  21. func (obj BinaryBatchSignRequest) GetUrl() string {
  22. return "/binary/batch/sign"
  23. }
  24. func (obj BinaryBatchSignRequest) GetHttpParameter() *http.HttpParameter {
  25. parameter := http.NewPostHttpParameter()
  26. jsonBytes, _ := json.Marshal(obj)
  27. parameter.SetJsonParamer(string(jsonBytes))
  28. return parameter
  29. }