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.0 KiB
Go

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package model
import (
"cu-helper/cus-eng-con-sys/cryptokit"
"reflect"
)
/*
/zjgd/frm/acceptanceComfirmController/goAccDeliveryEdit?businessKey=GRNd813lMc5xouGwqRPf7OJtFi2VoRa91V0vs2R7wHAZXvuFFHppwhcX5huFVrN3&processInstanceId=R5xOyY/6RHNkvnBAhuM2ng==&taskDefinitionKey=5LZPb0vNSm2PgEmBIHWeaQ==&taskId=gbXnKZwFUpB3HaRgHukedg==&startLink=DuAb1TXHvyGSasSql6BmZw==&endLink=DuAb1TXHvyGSasSql6BmZw==&taskflag=vROIUK5V0hGnD6kIyfnQBA==&ranstr=rWoHhc1OImhN1akYk0kyjhbJXpY6vUlP7dhw4pIMErI=&timestamp=07I1MQdK8OJUh8R5uzl0RQ==&_=1723698475861
*/
/*
用途
1、jfPushProcess时入参使用,和ToAcceptanceConfirm其实就相差一个字段的值后期看看能否合并 todo
*/
type GoAccDeliveryEdit 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 NewGoAccDeliveryEdit(businessKey, processInstId, taskId string) *GoAccDeliveryEdit {
goAccDeliveryEdit := new(GoAccDeliveryEdit)
goAccDeliveryEdit.BusinessKey = businessKey
goAccDeliveryEdit.ProcessInstanceId = processInstId
goAccDeliveryEdit.TaskDefinitionKey = "JFSQ"
goAccDeliveryEdit.TaskId = taskId //等于id
goAccDeliveryEdit.StartLink = "false"
goAccDeliveryEdit.EndLink = "false"
goAccDeliveryEdit.TaskFlag = "db"
goAccDeliveryEdit.Ranstr = cryptokit.RandomStr(true, 10, 32)
goAccDeliveryEdit.Timestamp = cryptokit.GetTimeStamp()
goAccDeliveryEdit.encrypt()
//这个最终不加密
goAccDeliveryEdit.TimestampPro = cryptokit.GetTimeStamp()
return goAccDeliveryEdit
}
func (th *GoAccDeliveryEdit) 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()))
}
}
}