package model import ( "cu-helper/cus-eng-con-sys/cryptokit" "reflect" ) /* http://10.202.2.108:8086/zjgd/frm/remandInfoController/toRemandShowCommon?remandId=ig0+wuJz1ydtzu4VbmlXigelzjrHpK2M95FWj1QqFZhIXAPC/wQsSLtbQzJMombk&ranstr=mznnQuAwNjevJzeRmS9e+w==×tamp=ecHR+9BmUnGwxYVYyQgkuQ==&_=1720262226904 */ /* 用途 1、/zjgd/frm/acceptanceController/udpateAccInfo.action时入参使用 */ type ToRemandShowCommon struct { RemandId string `map:"remandId"` Ranstr string `map:"ranstr"` Timestamp string `map:"timestamp"` TimestampPro string `map:"_"` //工建原始请求key就这样 } // NewToRemandShowCommon remandId=businessKey func NewToRemandShowCommon(remandId string) *ToRemandShowCommon { toRemandShowCommon := new(ToRemandShowCommon) toRemandShowCommon.RemandId = remandId toRemandShowCommon.Ranstr = cryptokit.RandomStr(true, 10, 32) toRemandShowCommon.Timestamp = cryptokit.GetTimeStamp() toRemandShowCommon.encrypt() toRemandShowCommon.TimestampPro = cryptokit.GetTimeStamp() return toRemandShowCommon } func (th *ToRemandShowCommon) encrypt() { v := reflect.ValueOf(th).Elem() for i := 0; i < v.NumField(); i++ { field := v.Field(i) if field.CanSet() { field.SetString(cryptokit.Encrypt(field.String())) } } }