You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.1 KiB
Go
56 lines
2.1 KiB
Go
package model
|
|
|
|
import (
|
|
"cu-helper/cus-eng-con-sys/cryptokit"
|
|
"reflect"
|
|
)
|
|
|
|
/*
|
|
http://10.202.2.108:8086/zjgd/frm/acceptanceComfirmController/toAcceptanceComfirm?businessKey=ig0+wuJz1ydtzu4VbmlXigelzjrHpK2M95FWj1QqFZhIXAPC/wQsSLtbQzJMombk&processInstanceId=hOVgJWbcGMSpwlAyOahXOQ==&taskDefinitionKey=TbtfJ6chgqzgSldk3ONCqQ==&taskId=RjahQdQO070+0msrB5z0rQ==&startLink=Jy0nsEWMSdJA3lqME93vgA==&endLink=Jy0nsEWMSdJA3lqME93vgA==&taskflag=facpUhYPtTztlU3uwUpNpA==&ranstr=4rUNDFPWHZwTW36OfKVg1jT7bnoF1dg4/dR2wgtzWnQ=×tamp=1RhySb/bDJGzULZTDF2g4Q==&_=1720262226902
|
|
*/
|
|
|
|
/*
|
|
用途
|
|
1、/zjgd/frm/acceptanceController/udpateAccInfo.action时入参使用
|
|
*/
|
|
|
|
type ToAcceptanceConfirm struct {
|
|
BusinessKey string `map:"businessKey"`
|
|
ProcessInstanceId string `map:"processInstanceId"`
|
|
TaskDefinitionKey string `map:"taskDefinitionKey"`
|
|
TaskId string `map:"taskId"`
|
|
StartLink string `map:"startLink"`
|
|
EndLink string `map:"endLink"`
|
|
TaskFlag string `map:"taskflag"`
|
|
Ranstr string `map:"ranstr"`
|
|
Timestamp string `map:"timestamp"`
|
|
TimestampPro string `map:"_"` //工建原始请求key就这样
|
|
}
|
|
|
|
func NewToAcceptanceConfirm(businessKey, processInstId, taskId string) *ToAcceptanceConfirm {
|
|
toAcceptanceConfirm := new(ToAcceptanceConfirm)
|
|
toAcceptanceConfirm.BusinessKey = businessKey
|
|
toAcceptanceConfirm.ProcessInstanceId = processInstId
|
|
toAcceptanceConfirm.TaskDefinitionKey = "YSQR"
|
|
toAcceptanceConfirm.TaskId = taskId //等于id
|
|
toAcceptanceConfirm.StartLink = "false"
|
|
toAcceptanceConfirm.EndLink = "false"
|
|
toAcceptanceConfirm.TaskFlag = "db"
|
|
toAcceptanceConfirm.Ranstr = cryptokit.RandomStr(true, 10, 32)
|
|
toAcceptanceConfirm.Timestamp = cryptokit.GetTimeStamp()
|
|
toAcceptanceConfirm.encrypt()
|
|
//这个最终不加密
|
|
toAcceptanceConfirm.TimestampPro = cryptokit.GetTimeStamp()
|
|
return toAcceptanceConfirm
|
|
}
|
|
|
|
func (th *ToAcceptanceConfirm) 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()))
|
|
}
|
|
}
|
|
}
|